/* ---------- CSS变量定义 ---------- */
:root {
    /* 品牌色彩 */
    --primary: #C10B00;      /* 峰林阁主红色 */
    --primary-dark: #a0181e;     /* 深红色 */
    --primary-light: #e8b4b7;    /* 浅红色 */
    --gold: #d4a574;             /* 金色/棕色点缀 */
    
    /* 中性色 */
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border-color: #e5e5e5;
    --bg-gray: #f5f5f5;
    --bg-white: #ffffff;
    
    /* 布局 */
    --pc-max-width: 1200px;
    --mobile-padding: 15px;
    --border-radius: 8px;
    
    /* 字体 */
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 
                   "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", 
                   "Microsoft YaHei", sans-serif;
}

/* ---------- 基础重置 ---------- */
* {
     transition: all 0.24s cubic-bezier(0.25, 0.8, 0.25, 1);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 在 body 样式中添加 */
body {
    font-family: var(--font-family);
    color: var(--text-primary);
    line-height: 1.6;
    background-color: var(--bg-white);
    overflow-x: hidden;
    min-height: 100vh;  /* 确保 body 至少占满一屏，但可以超出 */
}

/* 确保 html 也允许滚动 */
html {
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
    height: auto;  /* 不要固定高度 */
    overflow-y: auto;  /* 允许垂直滚动 */
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

button {
    border: none;
    outline: none;
    cursor: pointer;
    font-family: inherit;
}

input, textarea, select {
    font-family: inherit;
    outline: none;
}

/* ---------- 公共布局容器 ---------- */
.container {
    width: 100%;
    max-width: var(--pc-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- 公共按钮组件 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
}

.btn-large {
    padding: 14px 32px;
    font-size: 16px;
}

/* ---------- 卡片组件 ---------- */
.card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid #f7f7f7;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
}

.card-title {
    font-size: 14px;
    color: var(--text-primary);
    padding: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- 标签/筛选器组件 ---------- */
.filter-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 50px;
    font-size: 14px;
    margin-right: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-tag.active,
.filter-tag:hover {
    background-color: var(--primary);
    color: white;
}

.filter-tag::after {
    content: "▼";
    font-size: 10px;
    margin-left: 6px;
}

/* ---------- 底部固定栏（移动端） ---------- */
.mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 10px 15px;
    display: flex;
    gap: 10px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 100;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
}

.mobile-bottom-bar .btn {
    flex: 1;
    font-size: 14px;
    padding: 12px;
}

/* ---------- 页面标题栏（移动端二级页） ---------- */
.mobile-header {
    position: sticky;
    top: 0;
    z-index: 99;
    background: white;
    border-bottom: 1px solid var(--border-color);
}

.mobile-header-top {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    gap: 10px;
}

.mobile-header-top .back-btn {
    font-size: 20px;
    color: var(--text-primary);
    padding: 5px;
}

.mobile-header-top .search-box {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--bg-gray);
    border-radius: 20px;
    padding: 8px 15px;
}

.mobile-header-top .search-box input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    margin-left: 8px;
}

.mobile-header-top .search-btn {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ---------- 移动端导航（二级页文字导航） ---------- */
.mobile-nav-text {
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav-text a {
    font-size: 15px;
    color: var(--text-secondary);
    padding: 5px 10px;
    position: relative;
}

.mobile-nav-text a.active {
    color: var(--primary);
    font-weight: 600;
}

.mobile-nav-text a.active::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--primary);
}

/* ---------- 工具类 ---------- */
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.mt-2 { margin-top: 8px; }
.mb-2 { margin-bottom: 8px; }
.p-2 { padding: 8px; }
.hidden { display: none !important; }

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* 二级导航 */
.global-nav-text{
    display:flex;
    overflow-x:auto;
    overflow-y:hidden;
    /* 隐藏滚动条 */
    scrollbar-width:none;
    background:#fff;
}
.global-nav-text::-webkit-scrollbar{
    display:none;
}
.global-nav-text a{
    flex:0 0 auto;
    padding:10px;
    font-size:16px;
    color:#333;
    white-space:nowrap;
    border-bottom:3px solid transparent;
    transition:0.2s;
}
.global-nav-text a.active{
    color:#007aff;
    border-bottom-color:#007aff;
}
.global-nav-text a:hover{
    color:#007aff;
}
.active a::after{
    content: "";
  position: absolute;
  bottom: 0;       /* 永远贴a的底边 */
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: #C10B00;
  border-radius: 1px;
}