/* QuoteWise - 优化版样式文件 */

/* ==================== 字体引入 ==================== */
@import url('https://cdn.jsdelivr.net/npm/lxgw-wenkai-webfont@1.1.0/style.css');

/* 字体变量定义 */
:root {
    --font-chinese: 'LXGW WenKai', '霞鹜文楷', '霞骛文楷', serif;
    --font-english: 'LXGW WenKai', '霞鹜文楷', '霞骛文楷', serif;
    --font-english-italic: 'LXGW WenKai', '霞鹜文楷', '霞骛文楷', serif;

    /* 新中式色板 */
    --bg-paper: #f8f6f3;
    /* 米宣纸色 */
    --bg-gradient-end: #f0ede8;
    --primary-color: #8b9a84;
    /* 苔绿 */
    --secondary-color: #c7b299;
    /* 檀褐 */
    --accent-red: #b53838;
    /* 朱砂红 */
    --text-color: #374151;
    /* 徽墨灰 */
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --card-bg: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.85);

    /* 兼容旧变量 */
    --bg-color: var(--bg-paper);

    /* 渐变色 */
    --gradient-orange-pink: linear-gradient(135deg, #FF6B6B 0%, #FFE66D 100%);
    --gradient-blue-purple: linear-gradient(135deg, #4ECDC4 0%, #6C5CE7 100%);
    --gradient-green: linear-gradient(135deg, #8b9a84 0%, #a8c5a0 100%);
}

/* ==================== 全局样式重置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

::selection {
    background: var(--accent-red);
    color: #fff;
}

body {
    font-family: var(--font-chinese);
    background: linear-gradient(135deg, var(--bg-paper) 0%, var(--bg-gradient-end) 100%);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* 全局背景装饰：噪点 + 网格 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E"),
        linear-gradient(rgba(139, 154, 132, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 154, 132, 0.06) 1px, transparent 1px);
    background-size: 200px 200px, 40px 40px, 40px 40px;
    pointer-events: none;
    z-index: -1;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}


/* 英文内容样式 */
.english-text,
.content-en,
.quote-english {
    font-family: var(--font-english);
}

/* 英文格言斜体 */
.quote-content-en,
.english-quote-text {
    font-family: var(--font-english-italic);
    font-style: italic;
}

/* 界面文字（英文常规体） */
.nav-links,
.btn,
button,
input,
select {
    font-family: var(--font-english);
    font-style: normal;
}

/* ==================== 侧边工具栏 (右侧) ==================== */
.sidebar-tools {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tool-btn {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 50%;
    border: 1px solid rgba(139, 154, 132, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: var(--text-secondary);
    position: relative;
}

.tool-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: #fff;
}

.tool-btn .material-icons {
    font-size: 22px;
}

/* 工具提示 - 显示在左侧 */
.tool-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 58px;
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    background: var(--text-color);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    font-family: var(--font-chinese);
}

.tool-btn:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* 各工具按钮独特染色 */
/* 统一淡雅色调 - 莫兰迪色系 */
.sidebar-tools .tool-btn {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-secondary);
    border-color: rgba(139, 154, 132, 0.2);
}

.sidebar-tools .tool-btn:hover {
    background: white;
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.1);
}

/* 特殊按钮微调 */
.sidebar-tools .tool-btn:nth-child(2) {
    /* AI助手 - 淡紫 */
    color: #9d8ec4;
}

.sidebar-tools .tool-btn:nth-child(2):hover {
    color: #8e7cc3;
    border-color: #9d8ec4;
}

.sidebar-tools .tool-btn:nth-child(4) {
    /* 收藏 - 淡红 */
    color: #e09f9f;
}

.sidebar-tools .tool-btn:nth-child(4):hover {
    color: #d68585;
    border-color: #e09f9f;
}


/* ==================== 每日推送轮播优化 ==================== */
.daily-carousel-container {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 3rem auto;
    padding: 0 2rem;
    overflow: hidden;
}

.daily-carousel {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 2rem;
}

.daily-card {
    min-width: calc(33.333% - 1.333rem);
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.daily-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--gradient-orange-pink);
}

.daily-card:nth-child(2)::before {
    background: var(--gradient-blue-purple);
}

.daily-card:nth-child(3)::before {
    background: var(--gradient-green);
}

.daily-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.daily-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 2rem;
}

.daily-card-content {
    font-size: 1.4rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-weight: 500;
    min-height: 120px;
}

.daily-card-author {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.daily-card-category {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--gradient-orange-pink);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 轮播控制按钮 */
.carousel-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
    transform: translateY(-50%);
}

.carousel-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.carousel-indicators {
    text-align: center;
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.indicator {
    width: 12px;
    height: 12px;
    background: rgba(139, 154, 132, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: var(--primary-color);
    width: 32px;
    border-radius: 6px;
}

/* ==================== 分类卡片 Hover 展开 ==================== */
.category-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: visible;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

/* 装饰：出界不规则线框 */
.category-card::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 1px solid var(--primary-color);
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
    transition: all 0.4s ease;
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
}

.category-card:hover::before {
    opacity: 0.4;
    transform: scale(1.03) rotate(0.5deg);
}

/* 装饰：背景大字 */
.category-card::after {
    content: attr(data-char);
    position: absolute;
    bottom: -15px;
    right: -5px;
    font-size: 7rem;
    font-weight: bold;
    color: rgba(139, 154, 132, 0.06);
    pointer-events: none;
    z-index: 0;
    line-height: 1;
    font-family: var(--font-chinese);
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.category-main-info {
    text-align: center;
    position: relative;
    z-index: 1;
}

/* 分类印章图标 */
.category-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--bg-paper) 0%, #f5f0e8 100%);
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--secondary-color);
    position: relative;
    transition: all 0.3s ease;
}

/* 印章斑驳效果 */
.category-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 50 50' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
    border-radius: inherit;
    pointer-events: none;
}

.category-card:hover .category-icon {
    transform: rotate(-3deg) scale(1.05);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.category-name {
    font-size: 1.35rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.category-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

/* 子分类展开区域 */
.category-subcategories {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.category-card:hover .category-subcategories {
    max-height: 600px;
    opacity: 1;
}

.subcategory-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.subcategory-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(139, 154, 132, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-color);
}

.subcategory-item:hover {
    background: rgba(139, 154, 132, 0.15);
    transform: translateX(5px);
}

.subcategory-name {
    font-size: 0.9rem;
}

.subcategory-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ==================== 瀑布流布局 ==================== */
.quotes-masonry {
    column-count: 3;
    column-gap: 1.5rem;
    padding: 0;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    display: inline-block;
    width: 100%;
}

/* 不同尺寸的卡片 */
.quote-card.size-small {
    min-height: 180px;
}

.quote-card.size-medium {
    min-height: 250px;
}

.quote-card.size-large {
    min-height: 350px;
}

.quote-card.size-extra-large {
    min-height: 450px;
    background: linear-gradient(135deg, rgba(139, 154, 132, 0.1), rgba(168, 197, 160, 0.1));
}

/* 大卡片特殊样式 */
.quote-card.size-large .quote-content,
.quote-card.size-extra-large .quote-content {
    font-size: 1.3rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.quote-card.size-extra-large .quote-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin-top: 1rem;
}

/* 卡片统计数据 - 低调显示 */
.quote-stats {
    display: flex;
    gap: 0.8rem;
    font-size: 0.75rem;
    color: #aaa;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.03);
}

.quote-stats span {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

/* ==================== 原有样式保留 ==================== */
/* Header */
.header {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 998;
    padding: 1rem clamp(1.5rem, 3vw, 3rem);
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto minmax(260px, 1fr);
    align-items: center;
    gap: clamp(1rem, 2vw, 2rem);
    border-bottom: 1px solid rgba(139, 154, 132, 0.1);
    transition: all 0.3s ease;
}

.logo {
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-self: start;
    min-width: 0;
}

.company-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.logo-divider {
    width: 1px;
    height: 20px;
    background: rgba(139, 154, 132, 0.3);
    margin: 0 4px;
    flex-shrink: 0;
}

/* Logo印章/徽标图片 */
.logo-seal {
    display: inline-block;
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
    vertical-align: middle;
}


.nav-links {
    display: flex;
    list-style: none;
    gap: clamp(1.4rem, 2.1vw, 2.35rem);
    align-items: center;
    justify-self: center;
    min-width: max-content;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.ai-assistant, .nav-links a.ai-assistant {
    display: inline;
    padding: 0;
    background: transparent;
    color: var(--text-color) !important;
    border-radius: 0;
    cursor: pointer;
    transition: color 0.3s ease;
}

.ai-assistant:hover {
    transform: none;
    box-shadow: none;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    justify-self: end;
    min-width: 0;
}

.mobile-accessibility-tools {
    display: none;
}

@media (max-width: 1100px) {
    .header {
        grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
        padding: 0.95rem 1.25rem;
        gap: 1rem;
    }

    .logo {
        font-size: 1.3rem;
    }

    .company-logo {
        height: 34px;
    }

    .nav-links {
        gap: 1rem;
    }

    .auth-buttons .btn {
        padding: 0.55rem 1rem;
    }
}

.btn {
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: var(--font-english);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-primary {
    background: var(--gradient-green);
    color: white;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 154, 132, 0.3);
}

/* Guest Notice */
.guest-notice {
    background: linear-gradient(90deg, rgba(139, 154, 132, 0.1), rgba(199, 178, 153, 0.1));
    padding: 0.8rem;
    text-align: center;
    color: var(--text-color);
    font-size: 0.9rem;
    margin-top: 70px;
}

.guest-notice a {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 500;
}

/* Hero Section - 新中式风格 */
.hero {
    padding: 8rem 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    min-height: auto;
    justify-content: flex-start;
}

/* 背景装饰大字 */
.hero-bg-text {
    position: absolute;
    top: 15%;
    right: 5%;
    font-size: 8rem;
    font-family: var(--font-chinese);
    color: rgba(139, 154, 132, 0.05);
    writing-mode: vertical-rl;
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-weight: 500;
    letter-spacing: 2px;
}

.highlight-text {
    color: var(--primary-color);
    position: relative;
    font-weight: bold;
}

.highlight-text::after {
    content: '';
    position: absolute;
    bottom: 1px;
    left: 0;
    width: 100%;
    height: 8px;
    background: rgba(139, 154, 132, 0.2);
    z-index: -1;
    transform: skewX(-15deg);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.highlight {
    color: var(--primary-color);
    font-weight: 500;
}

/* Search Container - 新样式 */
.search-container {
    display: flex;
    background: white;
    padding: 8px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(139, 154, 132, 0.15);
    width: 100%;
    max-width: 550px;
    margin: 0 auto 4rem;
    border: 1px solid rgba(139, 154, 132, 0.2);
    transition: all 0.3s ease;
}

.search-container:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(139, 154, 132, 0.2);
}

.search-box {
    flex: 1;
    border: none;
    outline: none;
    padding: 0 1.5rem;
    font-size: 1rem;
    font-family: var(--font-chinese);
    color: var(--text-color);
    background: transparent;
}

.search-btn-main {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 40px;
    cursor: pointer;
    font-weight: bold;
    font-family: var(--font-chinese);
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.3s ease;
}

.search-btn-main:hover {
    background: #76856e;
}

/* 3D卡片展示区 */
.daily-showcase {
    width: 100%;
    height: 550px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 2000px;
    position: relative;
    z-index: 10;
}

.carousel-3d {
    position: relative;
    width: 850px;
    height: 420px;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.card-wrapper {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    transform-style: preserve-3d;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: default;
}

.card-3d {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-3d.flipped {
    transform: rotateY(180deg);
}

.face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 4px 12px 4px 16px;
    box-shadow: 15px 20px 40px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.face.front {
    pointer-events: auto;
}

.face.back {
    pointer-events: none;
}

.card-3d.flipped .face.front {
    pointer-events: none;
}

.card-3d.flipped .face.back {
    pointer-events: auto;
}

.flip-card-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 40;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(139, 154, 132, 0.2);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(31, 41, 55, 0.12);
    transition: all 0.2s ease;
}

.flip-card-btn:hover {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(31, 41, 55, 0.16);
}

.flip-card-btn .material-icons {
    font-size: 20px;
}

.back-flip-btn {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
    color: rgba(255, 255, 255, 0.9);
}

.back-flip-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* 朱文印章装饰 - 拟真效果 */
.deco-seal {
    position: absolute;
    top: -12px;
    left: 20px;
    width: 38px;
    height: 60px;
    background: #c23a3a;
    color: rgba(255, 255, 255, 0.92);
    z-index: 20;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-rl;
    font-size: 14px;
    letter-spacing: 4px;
    font-weight: bold;
    transform: rotate(-2deg);
    transition: transform 0.3s ease;
    /* 朱砂红渐变 */
    background: linear-gradient(145deg, #c83c3c 0%, #a52a2a 50%, #8b2323 100%);
    /* 斑驳边缘效果 */
    box-shadow:
        2px 4px 8px rgba(139, 35, 35, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.15);
    /* 不规则边框模拟斑驳 */
    clip-path: polygon(2% 1%, 5% 0%, 15% 1%, 25% 0%, 35% 2%, 45% 0%, 55% 1%, 65% 0%, 75% 2%, 85% 0%, 95% 1%, 98% 2%,
            100% 5%, 99% 15%, 100% 25%, 98% 35%, 100% 45%, 99% 55%, 100% 65%, 98% 75%, 100% 85%, 99% 95%,
            98% 98%, 95% 100%, 85% 99%, 75% 100%, 65% 98%, 55% 100%, 45% 99%, 35% 100%, 25% 98%, 15% 100%, 5% 99%, 2% 98%,
            0% 95%, 1% 85%, 0% 75%, 2% 65%, 0% 55%, 1% 45%, 0% 35%, 2% 25%, 0% 15%, 1% 5%);
}

/* 印章内纹理 */
.deco-seal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.15'/%3E%3C/svg%3E");
    pointer-events: none;
    border-radius: inherit;
}

.card-wrapper:hover .deco-seal {
    transform: rotate(0deg) translateY(-4px);
    box-shadow:
        3px 6px 12px rgba(139, 35, 35, 0.5),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* 卡片正面样式 */
.face.front {
    background-color: #fdfdfd;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    display: flex;
    overflow: visible;
}

/* 卡片日期标签 */
.card-date {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 1px;
    opacity: 0.7;
}

/* 作者信息区 */
.author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.author-name {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-color);
}

.author-source {
    font-size: 11px;
    color: var(--text-secondary);
}

.daily-tag {
    font-size: 11px;
    color: var(--primary-color);
    padding: 4px 10px;
    background: rgba(139, 154, 132, 0.1);
    border-radius: 12px;
}

/* 卡片背面样式 */
.cat-circle {
    width: 70px;
    height: 70px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.cat-name {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 4px;
}

.cat-subtitle {
    font-size: 10px;
    opacity: 0.5;
    letter-spacing: 2px;
}

.meaning-text {
    font-size: 16px;
    line-height: 1.85;
    opacity: 0.9;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 4px 0 0;
}

.card-tag {
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: 14px;
    font-size: 12px;
}

/* 明信片按钮 */
.postcard-btn,
.detail-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-chinese);
    text-decoration: none;
    flex: none;
    width: 100%;
}

.postcard-btn:hover,
.detail-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.detail-btn {
    background: rgba(255, 255, 255, 0.08);
}

/* 3D卡片内部细节 */
.img-container {
    position: absolute;
    left: 35px;
    top: 30px;
    bottom: 40px;
    width: 46%;
    border-radius: 2px;
    overflow: hidden;
    background-color: #eee;
    z-index: 2;
    transform: rotate(-1.5deg);
    box-shadow: 4px 6px 15px rgba(0, 0, 0, 0.1);
    border: 4px solid #fff;
    transition: transform 0.5s ease;
}

.card-wrapper:hover .img-container {
    transform: rotate(0deg) scale(1.02);
}

.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(0.1) contrast(0.95);
}

.text-panel {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 56%;
    padding: 40px 40px 40px 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 3;
}

.quote-main {
    font-size: 22px;
    color: var(--text-color);
    margin-bottom: 12px;
    line-height: 1.6;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.quote-main-latin {
    font-size: 21px;
    line-height: 1.55;
}

.quote-en {
    font-size: 13px;
    color: var(--text-secondary);
    font-family: var(--font-english);
    font-style: italic;
    margin-bottom: 20px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px dashed #e5e7eb;
    padding-top: 15px;
    margin-top: auto;
}

.face.back {
    transform: rotateY(180deg);
    background-color: #2f3e35;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    overflow: hidden;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
}

.back-left {
    width: 32%;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.1);
}

.back-right {
    width: 68%;
    padding: 34px 44px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
}

.back-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.back-label {
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    letter-spacing: 0.18em;
}

.back-translation {
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    line-height: 1.7;
    font-family: var(--font-english);
    font-style: italic;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.back-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    width: min(360px, 100%);
}

.back-author-name {
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.6;
}

/* 3D 导航控制 */
.postcard-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(31, 41, 55, 0.62);
    backdrop-filter: blur(8px);
}

.postcard-modal {
    position: relative;
    width: min(920px, 94vw);
    background: var(--bg-color);
    border-radius: 24px;
    box-shadow: 0 28px 80px rgba(31, 41, 55, 0.28);
    padding: 22px;
}

.postcard-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-color);
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(31, 41, 55, 0.15);
}

.postcard-preview {
    display: block;
    width: 100%;
    border-radius: 16px;
    background: #f8f6f3;
}

.postcard-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

.postcard-action-btn {
    min-height: 44px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: #fff;
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    font-family: var(--font-chinese);
    cursor: pointer;
    flex: 1;
    transition: all 0.2s ease;
}

.postcard-action-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transform: translateY(-1px);
}

.postcard-action-btn:active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transform: translateY(0);
}

.carousel-nav {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    align-items: center;
}

.carousel-actions {
    position: absolute;
    top: -70px;
    left: 50%;
    z-index: 5000;
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(760px, calc(100vw - 40px));
    transform: translateX(-50%);
    padding: 10px;
    border: 1px solid rgba(139, 154, 132, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 16px 45px rgba(31, 41, 55, 0.12);
    backdrop-filter: blur(12px);
}

.carousel-action-btn {
    min-height: 44px;
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border: 1px solid rgba(139, 154, 132, 0.24);
    border-radius: 999px;
    background: #fff;
    color: var(--text-color);
    font-size: 14px;
    font-family: var(--font-chinese);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.carousel-action-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transform: translateY(-1px);
}

.carousel-action-btn:active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transform: translateY(0);
}

.carousel-action-btn .material-icons {
    font-size: 18px;
}

.nav-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.nav-arrow:hover {
    background: var(--primary-color);
    color: white;
}

/* 响应式适配 */
@media (max-width: 900px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .daily-showcase {
        transform: scale(0.6);
        margin: -80px 0;
    }

    .hero-bg-text {
        display: none;
    }

    .postcard-modal {
        padding: 16px;
    }

    .postcard-modal-actions {
        flex-direction: column;
    }

    .postcard-action-btn {
        width: 100%;
    }

    .carousel-actions {
        top: -90px;
        width: min(520px, calc(100vw - 32px));
        flex-direction: column;
        border-radius: 18px;
    }

    .carousel-action-btn {
        width: 100%;
    }
}


.search-btn {
    padding: 1rem 2rem;
    background: var(--gradient-green);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(139, 154, 132, 0.3);
}

/* Featured Quote */
.featured-quote {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    margin: 3rem auto;
    max-width: 900px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.featured-quote::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 120px;
    color: rgba(139, 154, 132, 0.1);
    font-family: Georgia, serif;
}

.quote-text {
    font-size: 1.5rem;
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.quote-translation {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-style: italic;
}

.quote-source {
    text-align: right;
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 500;
}

/* Tab Section */
.tab-section {
    max-width: 1400px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    font-weight: 300;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

/* 标题装饰线 */
.section-title::before,
.section-title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.section-title::before {
    right: calc(100% + 20px);
}

.section-title::after {
    left: calc(100% + 20px);
}

/* 标题装饰点 */
.section-title .title-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--accent-red);
    border-radius: 50%;
    margin: 0 8px;
    vertical-align: middle;
}

.tab-navigation {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    border-bottom: 2px solid var(--border-color);
}

.tab-nav-item {
    padding: 1rem 2rem;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    margin-bottom: -2px;
}

.tab-nav-item:hover {
    color: var(--primary-color);
}

.tab-nav-item.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 500;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: all 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.1);
}

.feature-symbol {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.feature h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.feature p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Memory Cards */
.card-demo-container {
    display: flex;
    gap: 2.5rem;
    justify-content: center;
    align-items: center;
    margin: 2.5rem 0;
    flex-wrap: wrap;
}

.flashcard {
    width: 380px;
    height: 280px;
    perspective: 1200px;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.flashcard:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.card-front {
    background: white;
    border: 1px solid rgba(139, 154, 132, 0.1);
}

.card-front h4 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    letter-spacing: 1px;
    opacity: 0.8;
}

.card-back {
    background: var(--gradient-green);
    color: white;
    transform: rotateY(180deg);
}

.card-back h4 {
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
    letter-spacing: 1px;
    opacity: 0.9;
}

.chinese-text {
    font-size: 1.4rem;
    line-height: 1.9;
    font-weight: 500;
}

.english-text {
    font-size: 1.15rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.explanation {
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.6;
}

.memory-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.memory-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
}

.btn-again {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.btn-hard {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.btn-good {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.btn-easy {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.memory-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.memory-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.memory-feature {
    text-align: center;
}

.memory-feature-icon {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* CTA Section */
.cta-section {
    background: var(--gradient-green);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    margin: 4rem 0;
}

.cta-container h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 300;
}

.cta-container p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.btn-white {
    background: white;
    color: var(--primary-color);
    padding: 1rem 2.5rem;
    font-weight: 500;
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.footer-logo {
    height: 28px;
    width: auto;
    object-fit: contain;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 8px;
    transition: opacity 0.3s ease;
}

.footer-logo:hover {
    opacity: 0.85;
}

/* Quote Cards */
.quote-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.quote-card:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
}

.quote-content {
    font-size: 1.1rem;
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-weight: 500;
}

.quote-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.quote-author {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.quote-category {
    background: #f8f9fa;
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .quotes-masonry {
        column-count: 2;
    }

    .daily-card {
        min-width: calc(50% - 1rem);
    }
}

@media (max-width: 768px) {
    .quotes-masonry {
        column-count: 1;
    }

    .daily-card {
        min-width: 100%;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .card-demo-container {
        flex-direction: column;
        align-items: center;
    }
}

/* Loading States */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ==================== 页面装饰元素 ==================== */

/* 浮动装饰圆圈 */
.page-deco-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    pointer-events: none;
    z-index: -1;
}

.deco-circle-1 {
    width: 180px;
    height: 180px;
    background: var(--primary-color);
    top: 10%;
    right: 5%;
    animation: pagedeco-float 20s ease-in-out infinite;
}

.deco-circle-2 {
    width: 120px;
    height: 120px;
    background: var(--secondary-color);
    bottom: 20%;
    left: 8%;
    animation: pagedeco-float 25s ease-in-out infinite reverse;
}

.deco-circle-3 {
    width: 90px;
    height: 90px;
    background: var(--accent-red);
    top: 50%;
    left: 15%;
    animation: pagedeco-float 18s ease-in-out infinite;
}

@keyframes pagedeco-float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-30px) rotate(180deg);
    }
}

/* 装饰性分割线 */
.decorative-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--border-color) 20%,
            var(--primary-color) 50%,
            var(--border-color) 80%,
            transparent 100%);
    margin: 3rem 0;
    position: relative;
}

.decorative-divider::before {
    content: '●';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-paper);
    color: var(--primary-color);
    padding: 0 12px;
    font-size: 8px;
}

/* ==================== 无障碍：缩放控制（侧边栏） ==================== */
.sidebar-zoom {
    position: relative;
}

.zoom-dropdown {
    display: none;
    position: absolute;
    top: 50%;
    right: calc(100% + 12px);
    transform: translateY(-50%);
    background: white;
    border-radius: 12px;
    padding: 0.4rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(139, 154, 132, 0.1);
    z-index: 1000;
    min-width: 120px;
    animation: zoomFadeIn 0.15s ease;
}

@keyframes zoomFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.zoom-dropdown.show {
    display: block;
}

.zoom-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.15s;
}

.zoom-option:hover {
    background: rgba(139, 154, 132, 0.08);
    color: var(--text-color);
}

.zoom-option.active {
    background: var(--primary-color);
    color: white;
}

.zoom-option .material-icons {
    font-size: 1.1rem;
}

/* ==================== 简繁切换（侧边栏） ==================== */
.locale-toggle.tool-btn {
    font-size: 0;
}

.locale-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-secondary);
    font-family: var(--font-chinese);
    line-height: 1;
    transition: color 0.2s;
}

.locale-toggle.tool-btn:hover .locale-label {
    color: var(--primary-color);
}

/* ==================== 拼音标注 Tooltip ==================== */
.pinyin-tooltip {
    position: absolute;
    z-index: 9999;
    background: white;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(139, 154, 132, 0.12);
    pointer-events: auto;
    animation: pinyinFadeIn 0.2s ease;
}

@keyframes pinyinFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pinyin-chars {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.pinyin-reading {
    font-size: 1.15rem;
    color: var(--primary-color);
    font-weight: 600;
    line-height: 1.3;
    font-family: var(--font-chinese);
}

/* ==========================================================================
   📱 现代响应式体系与移动端底部导航系统 (Mobile Responsive & TabBar System)
   ========================================================================== */

:root {
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --mobile-tabbar-height: 60px;
    --mobile-header-height: 56px;
}

/* 响应式实用类 */
.mobile-only {
    display: none !important;
}

.desktop-only {
    display: initial;
}

/* 触摸优化 */
* {
    -webkit-tap-highlight-color: transparent;
}

button, a, input, select {
    touch-action: manipulation;
}

/* ==================== 移动端专属底部导航栏 (Mobile TabBar) ==================== */
.mobile-tabbar {
    display: none; /* 默认桌面端隐藏 */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--mobile-tabbar-height) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: rgba(248, 246, 243, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(139, 154, 132, 0.18);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    z-index: 2000;
    justify-content: space-around;
    align-items: center;
    user-select: none;
}

.mobile-tabbar .tab-item {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 100%;
    color: #6b7280;
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-tabbar .tab-item .tab-icon {
    font-size: 23px;
    transition: transform 0.25s ease, color 0.25s ease;
}

.mobile-tabbar .tab-item .tab-label {
    font-family: var(--font-chinese);
    line-height: 1;
    letter-spacing: 0.3px;
}

.mobile-tabbar .tab-item .tab-dot {
    position: absolute;
    bottom: 5px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0;
    transform: scale(0);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 激活状态 */
.mobile-tabbar .tab-item.active {
    color: var(--primary-color);
}

.mobile-tabbar .tab-item.active .tab-icon {
    transform: translateY(-2px);
    color: var(--primary-color);
}

.mobile-tabbar .tab-item.active .tab-label {
    font-weight: 700;
    color: var(--primary-color);
}

.mobile-tabbar .tab-item.active .tab-dot {
    opacity: 1;
    transform: scale(1);
}

.mobile-tabbar .tab-item:active {
    transform: scale(0.92);
}

/* 中心凸起帮助入口 */
.mobile-tabbar .tab-item-ai {
    overflow: visible;
}

.mobile-tabbar .ai-button-bubble {
    position: relative;
    top: -12px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #8b9a84;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(90, 107, 85, 0.38), 0 2px 6px rgba(0, 0, 0, 0.12);
    border: 3px solid #f8f6f3;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-tabbar .ai-button-bubble .ai-icon {
    font-size: 24px;
    color: #ffffff;
}

.mobile-tabbar .tab-item-ai .ai-label {
    margin-top: -10px;
    font-weight: 600;
}

.mobile-tabbar .tab-item-ai.active .ai-button-bubble,
.mobile-tabbar .tab-item-ai:active .ai-button-bubble {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 8px 24px rgba(90, 107, 85, 0.5);
}

/* ==================== 移动端断点适配 (< 1024px 与 < 768px) ==================== */
@media (max-width: 1023px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: initial !important;
    }

    /* 激活底部 TabBar */
    .mobile-tabbar {
        display: flex;
    }

    /* 隐藏 PC 侧边固定工具栏，避免遮挡手机屏幕 */
    .sidebar-tools {
        display: none !important;
    }

    /* 全局下边距防遮挡 */
    body {
        padding-bottom: calc(var(--mobile-tabbar-height) + var(--safe-bottom) + 16px) !important;
    }

    /* 头部紧凑化 */
    .header {
        position: sticky;
        top: 0;
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.75rem 1.25rem;
        background: rgba(248, 246, 243, 0.95);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid rgba(139, 154, 132, 0.12);
    }

    .nav-links {
        display: none;
    }

    .auth-buttons {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        margin-left: 0;
        justify-self: end;
    }

    .mobile-accessibility-tools {
        display: flex;
        align-items: center;
        gap: 4px;
        margin-left: auto;
    }

    .mobile-accessibility-btn {
        width: 34px;
        height: 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: transparent;
        color: var(--text-secondary);
        font-family: var(--font-chinese);
        cursor: pointer;
    }

    .mobile-accessibility-btn:active {
        color: #fff;
        background: var(--primary-color);
    }

    .mobile-accessibility-btn .material-icons {
        font-size: 19px;
    }

    .mobile-accessibility-btn .locale-label {
        font-size: 15px;
        font-weight: 700;
    }

    .logo {
        font-size: 1.2rem;
    }

    .company-logo {
        height: 28px;
    }

    /* 移动端主格言卡片与阅读流 */
    .quotes-masonry {
        column-count: 1 !important;
        gap: 16px;
    }

    .featured-quote {
        margin: 1.5rem 1rem;
        padding: 1.5rem 1.25rem;
        border-radius: 16px;
    }

    .quote-text {
        font-size: 1.25rem;
        line-height: 1.7;
    }

    .quote-translation {
        font-size: 0.98rem;
    }

    .hero {
        padding: 2.5rem 1.25rem 1.5rem;
        text-align: center;
    }

    .hero h1 {
        font-size: 2rem !important;
        line-height: 1.3;
    }

    .hero .subtitle {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .search-container {
        width: 100%;
        max-width: 100%;
        margin: 1.5rem 0;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    }

    .search-box {
        font-size: 0.95rem;
        padding: 0.85rem 1rem;
    }

    .search-btn-main {
        padding: 0.85rem 1.25rem;
        font-size: 0.95rem;
    }

    /* 普通页面隐藏独立悬浮球；详情页保留上下文 AI 助读 */
    body:not(.qw-detail-page) .ai-float-container,
    body:not(.qw-detail-page) #aiFloatContainer,
    body:not(.qw-detail-page) .ai-float-btn {
        display: none !important;
    }

    body.qw-detail-page .ai-float-container {
        display: block !important;
        left: 16px !important;
        bottom: calc(var(--mobile-tabbar-height) + var(--safe-bottom) + 18px) !important;
        z-index: 2100 !important;
    }

    /* 3D 卡片在手机端转为高质感叠放轮播 (Stacked Card Deck) */
    .daily-showcase {
        transform: none !important;
        margin: 0.5rem 0 1.5rem !important;
        width: 100% !important;
        height: auto !important;
        min-height: 480px !important;
        padding: 10px 0 20px !important;
        perspective: 1000px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        overflow: hidden !important;
    }

    .carousel-3d {
        width: min(330px, calc(100vw - 36px)) !important;
        height: 430px !important;
        margin: 0 auto !important;
        transform: none !important;
    }

    .card-wrapper {
        width: 100% !important;
        height: 100% !important;
    }

    .face.front {
        flex-direction: column !important;
        padding: 0 !important;
        border-radius: 18px !important;
        overflow: hidden !important;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04) !important;
    }

    .face.front .img-container {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        bottom: auto !important;
        width: 100% !important;
        height: 175px !important;
        transform: none !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .face.front .img-container::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 45px;
        background: linear-gradient(to top, rgba(253, 253, 253, 1), transparent);
        pointer-events: none;
    }

    .face.front .text-panel {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
        width: 100% !important;
        padding: 12px 18px 16px !important;
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }

    .face.front .deco-seal {
        top: 10px !important;
        left: 12px !important;
        width: 28px !important;
        height: 46px !important;
        font-size: 12px !important;
        letter-spacing: 2px !important;
        z-index: 30 !important;
    }

    .face.front .flip-card-btn {
        top: 10px !important;
        right: 10px !important;
        width: 36px !important;
        height: 36px !important;
        z-index: 30 !important;
        background: rgba(255, 255, 255, 0.9) !important;
    }

    .face.front .quote-main {
        font-size: 17px !important;
        line-height: 1.6 !important;
        margin-bottom: 6px !important;
        -webkit-line-clamp: 3 !important;
    }

    .face.front .quote-en {
        font-size: 12px !important;
        line-height: 1.45 !important;
        margin-bottom: 8px !important;
        -webkit-line-clamp: 2 !important;
    }

    .face.front .info-row {
        padding-top: 8px !important;
        margin-top: auto !important;
    }

    .face.back {
        border-radius: 18px !important;
    }

    .face.back .back-left {
        display: none !important;
    }

    .face.back .back-right {
        width: 100% !important;
        padding: 20px 18px !important;
        gap: 12px !important;
        justify-content: flex-start !important;
    }

    .face.back .meaning-text {
        font-size: 13.5px !important;
        line-height: 1.65 !important;
        -webkit-line-clamp: 5 !important;
    }

    .carousel-actions {
        position: relative !important;
        width: min(330px, calc(100vw - 36px)) !important;
        margin: 14px auto 0 !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        gap: 8px !important;
        z-index: 50 !important;
    }

    .carousel-action-btn {
        flex: 1 !important;
        font-size: 12px !important;
        padding: 8px 6px !important;
        min-height: 38px !important;
        border-radius: 20px !important;
        white-space: nowrap !important;
        justify-content: center !important;
    }

    /* 探索平台：手机端双列卡片，紧凑精致不冗长 */
    .category-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .category-card {
        padding: 1.2rem 0.8rem !important;
        border-radius: 14px !important;
        min-height: 110px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        cursor: pointer !important;
        background: #ffffff !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04) !important;
    }

    .category-card .category-icon {
        width: 42px !important;
        height: 42px !important;
        font-size: 18px !important;
        margin-bottom: 6px !important;
    }

    .category-card .category-name {
        font-size: 0.98rem !important;
        font-weight: 600 !important;
        margin-bottom: 2px !important;
    }

    .category-card .category-count {
        font-size: 0.76rem !important;
        color: #9ca3af !important;
    }

    .category-card .category-subcategories {
        display: none !important;
    }

    .category-card::after {
        display: none !important;
    }

    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .card-demo-container {
        flex-direction: column;
        align-items: center;
    }

    .flashcard {
        width: 100% !important;
        max-width: 340px;
        height: 240px;
    }

    /* 平台演示 Section */
    .demo-section {
        padding: 2.5rem 1rem 3rem !important;
    }

    .demo-layout {
        flex-direction: column !important;
        gap: 2rem !important;
    }

    .demo-phone-wrapper {
        width: 100% !important;
        max-width: 380px !important;
        margin: 0 auto;
    }

    .intro-features {
        grid-template-columns: 1fr !important;
    }

    /* 页脚精简 */
    .footer {
        padding: 1.5rem 1rem 2rem;
        margin-bottom: 0;
    }

    .footer-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        font-size: 0.85rem;
    }

    .footer-logo {
        height: 28px;
    }
}

@media (max-width: 520px) {
    .header .logo > span:last-child:not(.logo-seal):not(.logo-divider) {
        display: none;
    }
}

/* 超小屏适配 (iPhone SE / 375px) */
@media (max-width: 380px) {
    .mobile-tabbar .tab-item {
        font-size: 10px;
    }

    .mobile-tabbar .tab-item .tab-icon {
        font-size: 20px;
    }

    .mobile-tabbar .ai-button-bubble {
        width: 42px;
        height: 42px;
        top: -10px;
    }

    .mobile-tabbar .ai-button-bubble .ai-icon {
        font-size: 20px;
    }
}
html.qw-reduce-motion *,
html.qw-reduce-motion *::before,
html.qw-reduce-motion *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
}
