/* ============================================
   传世智慧录 - 主样式表
   设计理念：中式典雅 + 现代简洁
   ============================================ */

:root {
    --gold: #c9a96e;
    --gold-dark: #a6843f;
    --gold-light: #e8d5b0;
    --dark: #1a1a2e;
    --dark-secondary: #16213e;
    --accent: #0f3460;
    --cream: #faf7f2;
    --text: #333;
    --text-light: #666;
    --text-muted: #999;
    --border: #e8e3dd;
    --shadow: 0 2px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

/* ========== 基础样式 ========== */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: #fff;
    line-height: 1.7;
}

a { color: var(--accent); transition: var(--transition); }
a:hover { color: var(--gold-dark); }

.text-gold { color: var(--gold) !important; }
.bg-gold { background: var(--gold) !important; }

/* ========== 按钮 ========== */
.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #fff !important;
    border: none;
    font-weight: 500;
    transition: var(--transition);
}
.btn-gold:hover {
    background: linear-gradient(135deg, var(--gold-dark), #8b6914);
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(201,169,110,0.4);
}

.btn-outline-gold {
    border: 1.5px solid var(--gold);
    color: var(--gold-dark);
    background: transparent;
}
.btn-outline-gold:hover {
    background: var(--gold);
    color: #fff;
}

/* ========== 导航栏 ========== */
#mainNav {
    background: rgba(26,26,46,0.97) !important;
    backdrop-filter: blur(10px);
    padding: 0.6rem 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
    transition: var(--transition);
}

.navbar-brand { font-weight: 700; font-size: 1.25rem; }
.brand-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1rem; margin-right: 10px;
}
.brand-text {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    letter-spacing: 1px;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: var(--transition);
}
.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: var(--gold-light);
}

.avatar-sm { object-fit: cover; border: 2px solid var(--gold-light); }

/* 搜索框 */
.search-form .form-control {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 0.85rem;
    width: 180px;
}
.search-form .form-control::placeholder { color: rgba(255,255,255,0.5); }
.search-form .form-control:focus {
    background: rgba(255,255,255,0.2);
    border-color: var(--gold);
    box-shadow: none;
    color: #fff;
}

.main-content { padding-top: 66px; }

/* ========== Hero Section ========== */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-secondary) 50%, var(--accent) 100%);
    min-height: 500px;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(201,169,110,0.15) 0%, transparent 70%);
    border-radius: 50%;
}
.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%; left: -10%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(201,169,110,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content { position: relative; z-index: 1; padding: 3rem 0; }

.hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}
.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.7);
    font-weight: 300;
    letter-spacing: 3px;
}

.search-box .input-group { border-radius: 50px; overflow: hidden; box-shadow: 0 8px 30px rgba(0,0,0,0.3); }
.search-box .form-control { padding: 0.8rem 1.2rem; font-size: 1rem; }
.search-box .btn { border-radius: 0 50px 50px 0; }

.hero-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.tag-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
    border-radius: 20px;
    font-size: 0.8rem;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.15);
    transition: var(--transition);
}
.tag-badge:hover { background: var(--gold); color: #fff; border-color: var(--gold); }
.tag-badge.active { background: var(--gold); color: #fff; border-color: var(--gold); }
.badge-news {
    background: #ff4757; color: #fff; font-size: 0.6rem;
    padding: 0.1rem 0.3rem; border-radius: 3px; margin-left: 4px;
}
.badge-go {
    background: #2ed573; color: #fff; font-size: 0.6rem;
    padding: 0.1rem 0.3rem; border-radius: 3px; margin-left: 4px;
}

.min-vh-60 { min-height: 60vh; }

/* ========== 名人名言 ========== */
.quote-section { background: var(--cream); }
.quote-card {
    position: relative;
    padding: 2rem;
}
.quote-icon-start, .quote-icon-end {
    font-size: 2rem;
    color: var(--gold);
    opacity: 0.3;
}
.quote-text {
    font-size: 1.15rem;
    line-height: 2;
    color: var(--text);
    font-style: italic;
    margin: 1rem 0;
}

.figure-avatars {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.figure-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
    cursor: default;
}
.figure-avatar:hover { transform: translateY(-3px); box-shadow: 0 4px 15px rgba(201,169,110,0.5); }

/* ========== 公告 ========== */
.alert-announcement {
    background: linear-gradient(135deg, #fff8e1, #fff3cd);
    border: 1px solid var(--gold-light);
    border-radius: var(--radius-sm);
    color: var(--text);
}

/* ========== 分类卡片 ========== */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    position: relative;
    display: inline-block;
}
.section-title::after {
    content: '';
    display: block;
    width: 50px; height: 3px;
    background: var(--gold);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}
.section-desc { font-size: 1rem; }

.cat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    border: 2px solid transparent;
    transition: var(--transition);
    box-shadow: var(--shadow);
    height: 100%;
}
.cat-card:hover {
    border-color: var(--gold);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.cat-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.cat-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}
.cat-desc { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.8rem; }
.cat-count {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    background: var(--cream);
    color: var(--gold-dark);
    border-radius: 20px;
    font-size: 0.8rem;
}

/* ========== 文章卡片 ========== */
.article-card {
    border: none;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.article-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.card-img-wrapper {
    height: 160px;
    overflow: hidden;
}
.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.article-card:hover .card-img-wrapper img { transform: scale(1.05); }
.article-title {
    font-size: 0.95rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 500;
}

/* 置顶卡片 */
.pinned-card {
    border: none;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #fff, #fdf8f0);
    border-left: 4px solid var(--gold);
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.pinned-card:hover { box-shadow: var(--shadow-lg); }

/* 文章列表 */
.list-article-item {
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--border);
    font-size: 0.92rem;
}
.list-article-item:hover { color: var(--gold-dark); }

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12) !important;
}
.text-white-50 { color: rgba(255,255,255,0.5) !important; }

.article-list-card {
    border: none;
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: var(--transition);
}
.article-list-card:hover { box-shadow: var(--shadow); background: #fefef9; }

/* ========== 文章详情 ========== */
.article-detail .article-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.4;
}
/* 文章信息条 */
.article-info-bar {
    font-size: 0.85rem;
    color: var(--text-light);
    padding: 0.8rem 0;
}
.article-info-item {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0;
    white-space: nowrap;
}
.article-info-item i { margin-right: 0.3rem; }
.article-info-item.like-btn {
    cursor: pointer;
    user-select: none;
    transition: transform 0.2s ease;
    color: var(--text);
}
.article-info-item.like-btn:hover {
    transform: scale(1.08);
}
.article-info-item.like-btn.liked i {
    animation: heartBeat 0.6s ease;
}
@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(0.95); }
    75% { transform: scale(1.15); }
}
.article-content {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text);
}
.article-content h2 { font-size: 1.5rem; margin: 2rem 0 1rem; color: var(--dark); }
.article-content h3 { font-size: 1.25rem; margin: 1.5rem 0 0.8rem; color: var(--dark); }
.article-content p { margin-bottom: 1rem; }
.article-content blockquote {
    border-left: 4px solid var(--gold);
    padding: 1rem 1.5rem;
    background: var(--cream);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-light);
    font-style: italic;
    margin: 1.5rem 0;
}
.article-content ul, .article-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.article-content li { margin-bottom: 0.3rem; }

.article-cover img { width: 100%; max-height: 400px; object-fit: cover; border-radius: var(--radius); }

/* ========== CTA Section ========== */
.cta-section {
    background: linear-gradient(135deg, var(--dark), var(--accent));
    color: #fff;
}

/* ========== 会员页面 ========== */
.membership-hero {
    background: linear-gradient(135deg, var(--dark) 0%, var(--accent) 100%);
    color: #fff;
}

.benefit-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}
.benefit-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.plan-card {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.plan-card:hover { border-color: var(--gold); transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.plan-recommended {
    border-color: var(--gold);
    box-shadow: 0 0 0 1px var(--gold);
}
.plan-badge {
    position: absolute;
    top: 15px; right: -30px;
    background: var(--gold);
    color: #fff;
    padding: 0.2rem 2.5rem;
    transform: rotate(45deg);
    font-size: 0.8rem;
    font-weight: 600;
}
.plan-price { margin: 1rem 0; }
.price-number { font-size: 2.5rem; font-weight: 700; color: var(--dark); }
.original-price { color: var(--text-muted); text-decoration: line-through; font-size: 0.9rem; }
.plan-features { font-size: 0.85rem; }
.feature-item { padding: 0.3rem 0; color: var(--text-light); }

/* ========== 登录/注册页面 ========== */
.auth-container {
    min-height: calc(100vh - 66px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    background: linear-gradient(135deg, var(--cream), #f0ebe1);
}
.auth-card {
    width: 100%;
    max-width: 450px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
}
.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark);
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: var(--cream);
    border-radius: var(--radius-sm);
}
.auth-logo i { color: var(--gold); }
.auth-logo:hover { color: var(--dark); }

.auth-tabs { border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; }
.auth-tabs .nav-link {
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    font-weight: 500;
}
.auth-tabs .nav-link.active {
    color: var(--gold-dark);
    border-bottom: 2px solid var(--gold);
    background: transparent;
    margin-bottom: -2px;
}

.auth-form .input-group-text {
    background: var(--cream);
    border-color: var(--border);
}

/* ========== 用户中心 ========== */
.user-info-card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.user-avatar-lg {
    border: 3px solid var(--gold-light);
}
.stat-card {
    border: none;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.stat-card:hover { transform: translateY(-2px); }
.stat-icon { font-size: 1.5rem; display: block; margin-bottom: 0.3rem; }

/* ========== 页脚 ========== */
.site-footer {
    background: var(--dark);
    color: rgba(255,255,255,0.7);
    padding: 4rem 0 2rem;
    margin-top: 3rem;
}
.footer-brand {
    color: var(--gold-light);
    font-weight: 700;
    font-size: 1.3rem;
}
.footer-desc { font-size: 0.9rem; line-height: 1.8; }
.footer-title {
    color: #fff;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}
.footer-links a:hover { color: var(--gold-light); padding-left: 5px; }

.footer-social { display: flex; gap: 0.8rem; }
.social-icon {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition);
}
.social-icon:hover { background: var(--gold); color: #fff; }

.footer-divider { border-color: rgba(255,255,255,0.1); margin: 2rem 0; }
.footer-contact p { font-size: 0.85rem; margin-bottom: 0.3rem; }

/* ========== 搜索页面 ========== */
.search-form-large .form-control { padding: 0.8rem 1.5rem; font-size: 1rem; }
.search-form-large .btn { padding: 0.5rem 2rem; }

/* ========== 响应式设计 ========== */

/* ---- 平板 (768px - 1024px) ---- */
@media (max-width: 1024px) {
    .container { max-width: 100%; padding-left: 1.2rem; padding-right: 1.2rem; }
    .hero-title { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1rem; letter-spacing: 1px; }
    .hero-section { min-height: 380px; }
    .hero-desc { font-size: 0.9rem; }
    .section-title { font-size: 1.5rem; }
    .article-detail .article-title { font-size: 1.5rem; }
    .cat-card { padding: 1.5rem 1rem; }
    .card-img-wrapper { height: 140px; }
    .navbar-brand { font-size: 1.1rem; }
    .brand-icon { width: 32px; height: 32px; font-size: 0.85rem; }
    .footer-col { margin-bottom: 1.5rem; }
    .plan-price .price-number { font-size: 2rem; }
    .auth-card { max-width: 400px; }
    .article-content h2 { font-size: 1.3rem; }
    .article-content h3 { font-size: 1.15rem; }
    .hero-tags .tag-badge { padding: 0.25rem 0.8rem; font-size: 0.78rem; }
}

/* ---- 手机横屏 / 小平板 (576px - 768px) ---- */
@media (max-width: 768px) {
    /* 基础排版 */
    body { font-size: 15px; }
    .container { padding-left: 1rem; padding-right: 1rem; }
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.3rem; }
    h3 { font-size: 1.15rem; }
    h4 { font-size: 1.05rem; }
    h5 { font-size: 1rem; }

    /* Hero区域 */
    .hero-title { font-size: 1.6rem; letter-spacing: 1px; margin-bottom: 0.5rem; }
    .hero-subtitle { font-size: 0.9rem; letter-spacing: 0.5px; }
    .hero-desc { font-size: 0.82rem; margin-bottom: 1rem; }
    .hero-section { min-height: 300px; padding: 2.5rem 0; }
    .hero-content { padding: 1rem 0; }
    .search-box .input-group { max-width: 100%; }
    .search-box .form-control { padding: 0.6rem 0.8rem; }
    .hero-tags { flex-wrap: wrap; gap: 0.4rem; justify-content: center; }
    .hero-tags .tag-badge { padding: 0.3rem 0.8rem; font-size: 0.76rem; }

    /* 导航栏 */
    #mainNav { padding: 0.3rem 0; }
    .navbar-brand { font-size: 1rem; }
    .brand-icon { width: 28px; height: 28px; font-size: 0.75rem; margin-right: 6px; }
    .navbar-toggler { padding: 0.3rem 0.6rem; border: 1px solid rgba(255,255,255,0.3); }
    .navbar-nav { padding-top: 0.5rem; }
    .navbar-dark .navbar-nav .nav-link { padding: 0.6rem 0.8rem; font-size: 0.9rem; border-radius: 6px; margin: 2px 0; }

    /* 板块标题 */
    .section-title { font-size: 1.25rem; margin-bottom: 0.8rem; }
    .section-header { flex-direction: column; align-items: flex-start !important; gap: 0.5rem; }
    .section-header .btn { align-self: flex-start; }
    .section-desc { font-size: 0.85rem; margin-bottom: 0.5rem; }

    /* 置顶卡片 */
    .pinned-card .card-body { padding: 1rem; }
    .pinned-card .card-title { font-size: 1rem; }

    /* 分类卡片 */
    .cat-card { padding: 1.2rem 0.8rem; border-radius: 10px; }
    .cat-icon { font-size: 2rem; margin-bottom: 0.5rem; }
    .cat-name { font-size: 0.95rem; margin-bottom: 0.3rem; }
    .cat-desc { font-size: 0.78rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .cat-count { font-size: 0.72rem; }
    .categories-section .row.g-4 { --bs-gutter-y: 0.75rem; --bs-gutter-x: 0.75rem; }

    /* 文章卡片 */
    .card-img-wrapper { height: 140px; }
    .article-title { font-size: 0.9rem; line-height: 1.4; }
    .article-card .card-body { padding: 0.8rem; }
    .recent-section .row.g-4, .featured-section .row.g-4 { --bs-gutter-y: 0.75rem; --bs-gutter-x: 0.75rem; }

    /* 文章内容页 */
    .article-content { font-size: 1rem; line-height: 1.8; }
    .article-content h2 { font-size: 1.2rem; margin: 1.5rem 0 0.8rem; }
    .article-content h3 { font-size: 1.05rem; }
    .article-content blockquote { padding: 0.8rem 1rem; margin: 1rem 0; font-size: 0.95rem; }
    .article-content img { max-width: 100%; height: auto; border-radius: 8px; }
    .article-content table { display: block; overflow-x: auto; }
    .article-cover img { max-height: 200px; border-radius: 8px; }
    .article-detail .article-title { font-size: 1.25rem; }
    .article-meta { font-size: 0.8rem; flex-wrap: wrap; }
    .article-info-bar { font-size: 0.78rem; gap: 0.8rem !important; }
    .article-info-item { padding: 0.1rem 0; }

    /* 会员页 */
    .plan-card { margin-bottom: 1rem; border-radius: 12px; }
    .plan-price .price-number { font-size: 1.8rem; }
    .plan-features { font-size: 0.82rem; }
    .benefit-card { padding: 1rem; border-radius: 10px; }
    .plan-badge { font-size: 0.7rem; padding: 0.15rem 2.5rem; top: 10px; right: -40px; }

    /* 认证页 */
    .auth-card { max-width: 100%; padding: 1.5rem; margin: 0 0.5rem; border-radius: 12px; }
    .auth-logo { font-size: 1.2rem; }

    /* 用户中心 */
    .stat-card { padding: 0.8rem; border-radius: 10px; }
    .stat-icon { font-size: 1.2rem; }
    .user-sidebar { margin-bottom: 1rem; }

    /* 页脚 */
    .site-footer { padding: 2rem 0 1rem; margin-top: 2rem; }
    .footer-title { font-size: 0.9rem; }
    .footer-desc { font-size: 0.82rem; line-height: 1.6; }
    .footer-links a { font-size: 0.8rem; padding: 0.3rem 0; display: inline-block; }
    .social-icon { width: 34px; height: 34px; }
    .footer-bottom { font-size: 0.75rem; padding: 0.8rem 0; }

    /* 支付弹窗 */
    .payment-modal-card { padding: 1.2rem; width: 98%; border-radius: 12px; max-height: 90vh; overflow-y: auto; }
    .qr-code-img { max-width: 160px; border-radius: 8px; }
    .payment-modal-close { top: 8px; right: 12px; font-size: 1.5rem; }
    .payment-order-info { font-size: 0.85rem; padding: 0.6rem; }
    .payment-custom-text { font-size: 0.85rem; line-height: 1.7; }

    /* 名言卡片 */
    .quote-card { padding: 1.5rem; border-radius: 12px; }
    .quote-text { font-size: 1.1rem; line-height: 1.7; }
    .quote-icon-start, .quote-icon-end { font-size: 1.5rem; opacity: 0.2; }
    .figure-avatar { width: 36px; height: 36px; font-size: 0.75rem; }

    /* CTA区域 */
    .cta-section { padding: 2.5rem 0 !important; }
    .cta-section h3 { font-size: 1.2rem; }
    .cta-section .lead { font-size: 0.9rem; }
    .cta-section .btn { width: 100%; margin-bottom: 0.5rem; }

    /* 表格 */
    .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    table { font-size: 0.85rem; }
    table th, table td { white-space: nowrap; }

    /* 按钮 */
    .btn { font-size: 0.88rem; padding: 0.5rem 1rem; }
    .btn-sm { font-size: 0.82rem; padding: 0.35rem 0.7rem; }
    .btn-gold, .btn-outline-gold { font-size: 0.9rem; }

    /* 面包屑 */
    .breadcrumb { font-size: 0.82rem; flex-wrap: wrap; }

    /* VIP付费墙 */
    .vip-paywall { padding: 1.2rem !important; border-radius: 8px; }
    .vip-paywall h5 { font-size: 1rem; }
    .vip-paywall .btn { width: 100%; margin-top: 0.5rem; }

    /* 评论 */
    .comment-item { padding-bottom: 0.8rem; margin-bottom: 0.8rem; }
    .comment-form textarea { font-size: 0.9rem; }

    /* 分页 */
    .pagination { font-size: 0.8rem; flex-wrap: wrap; }
    .pagination .page-link { padding: 0.35rem 0.6rem; }

    /* 公告 */
    .alert-announcement { font-size: 0.82rem; padding: 0.6rem 0.8rem; }

    /* 首页自定义推荐区 */
    .card.hover-lift { margin-bottom: 0.5rem; }
    .card.hover-lift .card-body { padding: 1.2rem; }

    /* 文章详情底部 */
    .article-footer-nav { flex-direction: column; gap: 0.5rem; }
    .article-footer-nav .btn { width: 100%; }

    /* 分类页面 */
    .category-header { padding: 1.5rem 0; }
    .category-header h2 { font-size: 1.3rem; }
}

/* ---- 小屏手机 (< 480px) ---- */
@media (max-width: 480px) {
    /* 基础排版进一步缩小 */
    body { font-size: 14px; }
    .container { padding-left: 0.8rem; padding-right: 0.8rem; }

    /* Hero */
    .hero-title { font-size: 1.3rem; }
    .hero-subtitle { font-size: 0.82rem; }
    .hero-desc { font-size: 0.78rem; }
    .hero-section { min-height: 240px; padding: 2rem 0; }
    .hero-content { padding: 1rem 0; }
    .search-box .form-control { padding: 0.5rem 0.7rem; font-size: 0.85rem; }
    .search-box .btn { padding: 0.35rem 0.8rem; font-size: 0.85rem; }
    .search-box .input-group-text { padding: 0.5rem 0.7rem; }
    .hero-tags .tag-badge { padding: 0.2rem 0.5rem; font-size: 0.7rem; }

    /* 导航 */
    #mainNav { padding: 0.2rem 0; }
    .navbar-brand { font-size: 0.9rem; }
    .brand-icon { width: 24px; height: 24px; font-size: 0.65rem; }
    .navbar-dark .navbar-nav .nav-link { padding: 0.5rem 0.6rem; font-size: 0.82rem; }

    /* 板块标题 */
    .section-title { font-size: 1.1rem; }
    .section-title::after { width: 30px; height: 2px; }
    .section-header { gap: 0.3rem; }
    .section-header .btn-sm { font-size: 0.75rem; }

    /* 分类卡片 */
    .cat-card { padding: 0.8rem 0.5rem; }
    .cat-icon { font-size: 1.5rem; }
    .cat-name { font-size: 0.85rem; }
    .cat-desc { display: none; }
    .cat-count { font-size: 0.68rem; }

    /* 文章卡片 */
    .card-img-wrapper { height: 120px; border-radius: 6px 6px 0 0; }
    .article-title { font-size: 0.85rem; }
    .article-card .card-body { padding: 0.6rem; }
    .article-card { border-radius: 8px; }

    /* 文章内容 */
    .article-detail .article-title { font-size: 1.15rem; }
    .article-content { font-size: 0.93rem; line-height: 1.75; }
    .article-content h2 { font-size: 1.1rem; }
    .article-content h3 { font-size: 1rem; }
    .article-meta { gap: 0.4rem !important; font-size: 0.75rem; }
    .article-info-bar { font-size: 0.72rem; gap: 0.5rem !important; flex-wrap: wrap; }

    /* 会员页 */
    .plan-price .price-number { font-size: 1.5rem; }
    .plan-badge { font-size: 0.65rem; padding: 0.15rem 2rem; top: 8px; right: -30px; }
    .benefit-card { padding: 0.8rem; }
    .benefit-card h6 { font-size: 0.85rem; }
    .benefit-card p { font-size: 0.75rem; }
    .auth-card { padding: 1rem; border-radius: 10px; }

    /* 支付 */
    .qr-code-img { max-width: 130px; }
    .payment-modal-card { padding: 1rem; border-radius: 10px; }

    /* 弹窗 */
    .modal-dialog { margin: 0.3rem; }

    /* 按钮 */
    .btn { font-size: 0.85rem; padding: 0.45rem 0.8rem; }
    .btn-lg { font-size: 0.95rem; padding: 0.6rem 1.2rem; }
    .btn-group { display: flex; flex-wrap: wrap; gap: 0.3rem; }
    .btn-group .btn { flex: 1; min-width: 80px; }

    /* 名言 */
    .quote-card { padding: 1.2rem; }
    .quote-text { font-size: 1rem; }
    .quote-icon-start { top: 5px; left: 10px; }
    .quote-icon-end { bottom: 5px; right: 10px; }
    .figure-avatar { width: 30px; height: 30px; font-size: 0.7rem; margin: 0 2px; }

    /* 页脚 */
    .footer-col { margin-bottom: 1rem; }
    .footer-brand { font-size: 1rem; }
    .footer-desc { font-size: 0.78rem; }
    .footer-title { font-size: 0.85rem; }
    .footer-links a { font-size: 0.75rem; }
    .social-icon { width: 30px; height: 30px; font-size: 0.8rem; }

    /* 间距缩小 */
    .py-4 { padding-top: 1.2rem !important; padding-bottom: 1.2rem !important; }
    .py-5 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
    .mb-4 { margin-bottom: 0.8rem !important; }
    .mb-5 { margin-bottom: 1.2rem !important; }
    .g-4 { --bs-gutter-y: 0.6rem; --bs-gutter-x: 0.6rem; }

    /* 装饰元素隐藏/缩小 */
    .hero-section::before,
    .hero-section::after { width: 150px; height: 150px; opacity: 0.4; }

    /* 全宽布局 */
    .row.g-4 > [class*="col-"] { width: 100% !important; }
    .categories-section .row.g-4 > .col-sm-6 { width: 50% !important; }
    .recent-section .row.g-4 > .col-md-4 { width: 50% !important; }
    .featured-section .row.g-4 > .col-md-6,
    .featured-section .row.g-4 > .col-lg-3 { width: 50% !important; }

    /* 文章页图片 */
    .article-cover img { max-height: 160px; object-fit: cover; }

    /* 分类头部 */
    .category-header { padding: 1.2rem 0; }
    .category-header h2 { font-size: 1.2rem; }

    /* accordion */
    .accordion-button { font-size: 0.85rem; padding: 0.8rem 1rem; }
    .accordion-body { font-size: 0.85rem; padding: 0.8rem 1rem; }

    /* form controls */
    .form-control { font-size: 0.9rem; }
    .form-label { font-size: 0.85rem; margin-bottom: 0.3rem; }

    /* iOS safe bottom */
    .btn-gold, button[type="submit"] { min-height: 44px; }
    a, button { min-height: 44px; display: inline-flex; align-items: center; }
    .tag-badge, .badge, .navbar-toggler, .btn-sm, .page-link, .breadcrumb a {
        min-height: auto;
    }
}

/* ---- 极窄屏 (< 360px) ---- */
@media (max-width: 360px) {
    .hero-title { font-size: 1.15rem; }
    .hero-subtitle { font-size: 0.75rem; }
    .hero-desc { display: none; }
    .categories-section .row.g-4 > .col-sm-6 { width: 100% !important; }
    .recent-section .row.g-4 > .col-md-4 { width: 100% !important; }
    .featured-section .row.g-4 > .col-md-6 { width: 100% !important; }
    .card-img-wrapper { height: 180px; }
    .container { padding-left: 0.5rem; padding-right: 0.5rem; }
}

/* ---- 遮罩层 & 弹窗通用 ---- */
.modal-dialog { margin: 0.5rem; }
.modal-content { border-radius: 12px; overflow: hidden; }
.modal-header { padding: 0.8rem 1rem; }
.modal-body { padding: 1rem; }
.modal-footer { padding: 0.8rem 1rem; }

/* ---- 触摸设备优化 ---- */
@media (hover: none) {
    .cat-card:hover, .article-card:hover, .plan-card:hover, .figure-avatar:hover,
    .card.hover-lift:hover { transform: none; }
    .article-card:hover .card-img-wrapper img { transform: none; }
    .plan-card:hover { box-shadow: 0 5px 20px rgba(0,0,0,0.08); }
}

/* ---- 暗色模式适配（可选） ---- */
@media (prefers-color-scheme: dark) {
    /* 基础暗色适配，用户可自行开启 */
    /* body { background: #1a1a1a; color: #ddd; } */
}

/* ---- 打印样式 ---- */
@media print {
    .navbar, .site-footer, .hero-section, .btn, .comment-form, .vip-paywall { display: none !important; }
    body { font-size: 14px; line-height: 1.6; color: #000; }
    .container { max-width: 100%; padding: 0; }
    .article-content { font-size: 14px; }
    a { color: #000; text-decoration: none; }
}

/* ========== 动画 ========== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fadeInUp { animation: fadeInUp 0.6s ease forwards; }
.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }

/* ========== 支付弹窗 ========== */
.payment-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.payment-modal-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 500px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: fadeInUp 0.3s ease;
}
.payment-modal-close {
    position: absolute;
    top: 10px; right: 15px;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}
.payment-modal-close:hover { color: var(--text); }

.payment-order-info {
    background: var(--cream);
    padding: 0.8rem;
    border-radius: var(--radius-sm);
}

.qr-code-container {
    padding: 1rem 0;
}
.qr-code-img {
    max-width: 200px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.qr-placeholder {
    padding: 2rem;
    background: var(--cream);
    border-radius: var(--radius);
    border: 2px dashed var(--border);
}
.qr-placeholder-icon { opacity: 0.6; }
.qr-tip {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.payment-instructions .alert {
    border: 1px solid var(--border);
}
