/* ==================== 全局样式 - 星空主题 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root, [data-theme="starry"] {
    --star-dark: #0a0a0f;
    --star-deep: #0d0d1a;
    --star-purple: #1a1a2e;
    --star-blue: #16213e;
    --star-glow: #4a90d9;
    --star-bright: #a8d8ff;
    --star-gold: #ffd700;
    --star-silver: #c0c0d0;
    --star-white: #f0f0ff;
}

/* 朝阳初升主题 — 暖橙金色调 */
[data-theme="sunrise"] {
    --star-dark: #1a0a00;
    --star-deep: #2a1200;
    --star-purple: #3d1f0a;
    --star-blue: #4a2810;
    --star-glow: #ff8c00;
    --star-bright: #ffd4a0;
    --star-gold: #ffb347;
    --star-silver: #d4a574;
    --star-white: #fff5e6;
}

/* 草地主题 — 翠绿自然色调 */
[data-theme="meadow"] {
    --star-dark: #0a1a0a;
    --star-deep: #0d200d;
    --star-purple: #1a3018;
    --star-blue: #1e3a1c;
    --star-glow: #4caf50;
    --star-bright: #a8e6a0;
    --star-gold: #c0e040;
    --star-silver: #7cb87c;
    --star-white: #e8f5e8;
}

/* 雨天主题 — 灰蓝沉静色调 */
[data-theme="rain"] {
    --star-dark: #0a0e14;
    --star-deep: #101820;
    --star-purple: #1a2636;
    --star-blue: #1e3044;
    --star-glow: #5a8aaa;
    --star-bright: #90b8d4;
    --star-gold: #7ab0d4;
    --star-silver: #6a8a9a;
    --star-white: #c8dce8;
}

/* 雪天主题 — 冰蓝银白色调 */
[data-theme="snow"] {
    --star-dark: #0c1220;
    --star-deep: #121e30;
    --star-purple: #1a2a42;
    --star-blue: #1e3350;
    --star-glow: #70b0e0;
    --star-bright: #b8d8f8;
    --star-gold: #a0d0f0;
    --star-silver: #8aa8c4;
    --star-white: #e0eef8;
}

/* 朝阳初升 — 页面背景 */
[data-theme="sunrise"] .page {
    background:
        radial-gradient(ellipse at 80% 10%, rgba(255,140,0,0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 80%, rgba(255,80,0,0.08) 0%, transparent 50%),
        linear-gradient(180deg, #1a0a00 0%, #3d1f0a 30%, #4a2810 70%, #2a1200 100%);
}
[data-theme="sunrise"] .page::before {
    background-image: none !important;
    opacity: 0;
}

/* 草地 — 页面背景 */
[data-theme="meadow"] .page {
    background:
        radial-gradient(ellipse at 30% 80%, rgba(76,175,80,0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 20%, rgba(192,224,64,0.08) 0%, transparent 50%),
        linear-gradient(180deg, #0a1a0a 0%, #1a3018 40%, #1e3a1c 70%, #0d200d 100%);
}
[data-theme="meadow"] .page::before {
    background-image: none !important;
    opacity: 0;
}

/* 雨天 — 页面背景 */
[data-theme="rain"] .page {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(90,138,170,0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 100%, rgba(30,48,68,0.3) 0%, transparent 60%),
        linear-gradient(180deg, #101820 0%, #1a2636 30%, #1e3044 70%, #0a0e14 100%);
}
[data-theme="rain"] .page::before {
    background-image: none !important;
    opacity: 0;
}

/* 雪天 — 页面背景 */
[data-theme="snow"] .page {
    background:
        radial-gradient(ellipse at 40% 20%, rgba(112,176,224,0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(160,208,240,0.08) 0%, transparent 50%),
        linear-gradient(180deg, #0c1220 0%, #1a2a42 30%, #1e3350 70%, #121e30 100%);
}
[data-theme="snow"] .page::before {
    background-image: none !important;
    opacity: 0;
}

body {
    font-family: 'Noto Serif SC', serif;
    background: var(--star-dark);
    min-height: 100vh;
    color: var(--star-white);
    line-height: 1.8;
    overflow-x: hidden;
}

/* ==================== 星空背景特效 ==================== */
.page {
    display: none;
    min-height: 100vh;
    position: relative;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(88, 28, 135, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(28, 58, 135, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(74, 144, 217, 0.05) 0%, transparent 70%),
        linear-gradient(180deg, #0a0a0f 0%, #0d0d1a 30%, #1a1a2e 70%, #16213e 100%);
}

.page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.8), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.9), transparent),
        radial-gradient(2px 2px at 160px 120px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 230px 80px, rgba(255,255,255,0.7), transparent),
        radial-gradient(2px 2px at 300px 150px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 350px 200px, rgba(255,255,255,0.8), transparent),
        radial-gradient(2px 2px at 400px 50px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 450px 250px, rgba(255,255,255,0.7), transparent),
        radial-gradient(2px 2px at 500px 100px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 550px 180px, rgba(255,255,255,0.9), transparent),
        radial-gradient(2px 2px at 600px 300px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 650px 60px, rgba(255,255,255,0.7), transparent),
        radial-gradient(2px 2px at 700px 220px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 750px 140px, rgba(255,255,255,0.8), transparent),
        radial-gradient(2px 2px at 800px 280px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 850px 90px, rgba(255,255,255,0.7), transparent),
        radial-gradient(2px 2px at 900px 190px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 950px 320px, rgba(255,255,255,0.8), transparent),
        radial-gradient(2px 2px at 100px 350px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 150px 400px, rgba(255,255,255,0.7), transparent),
        radial-gradient(2px 2px at 250px 450px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 380px 380px, rgba(255,255,255,0.9), transparent),
        radial-gradient(2px 2px at 480px 420px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 580px 360px, rgba(255,255,255,0.7), transparent),
        radial-gradient(2px 2px at 680px 480px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 780px 400px, rgba(255,255,255,0.8), transparent),
        radial-gradient(2px 2px at 880px 460px, rgba(255,255,255,0.5), transparent);
    background-size: 1000px 500px;
    animation: twinkle 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.page::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 40%, rgba(147, 112, 219, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 70% 60%, rgba(74, 144, 217, 0.1) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

.page.active {
    display: block;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* 全局隐藏辅助类：确保使用 .hidden 时元素不占布局空间 */
.hidden {
    display: none !important;
}

/* 流星特效 */
.shooting-star {
    position: fixed;
    width: 4px;
    height: 4px;
    background: linear-gradient(90deg, rgba(255,255,255,1), rgba(255,255,255,0));
    border-radius: 50%;
    box-shadow: 0 0 20px 2px rgba(255,255,255,0.8), 0 0 40px 4px rgba(147, 112, 219, 0.4);
    animation: shoot 3s linear forwards;
    pointer-events: none;
    z-index: 1;
}

.shooting-star::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -100px;
    transform: translateY(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), rgba(147, 112, 219, 0.6));
    border-radius: 1px;
}

@keyframes shoot {
    0% {
        transform: translateX(0) translateY(0) rotate(-45deg);
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        transform: translateX(-500px) translateY(500px) rotate(-45deg);
        opacity: 0;
    }
}

/* 漂浮粒子 */
.floating-particle {
    position: fixed;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, rgba(147, 112, 219, 0.8), transparent);
    border-radius: 50%;
    pointer-events: none;
    animation: float 8s ease-in-out infinite;
    z-index: 1;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.4;
    }
    50% {
        transform: translateY(-30px) scale(1.2);
        opacity: 0.8;
    }
}

/* 返回按钮 */
.back-btn {
    position: fixed;
    top: 30px;
    left: 30px;
    padding: 10px 22px;
    background: rgba(255,255,255,0.06);
    border: 1px solid color-mix(in srgb, var(--star-glow) 40%, transparent);
    color: var(--star-silver);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    letter-spacing: 0.1em;
    z-index: 1000;
    backdrop-filter: blur(12px);
    border-radius: 25px;
}

.back-btn:hover {
    background: color-mix(in srgb, var(--star-glow) 20%, transparent);
    border-color: color-mix(in srgb, var(--star-glow) 60%, transparent);
    color: var(--star-white);
    transform: translateX(-5px);
    box-shadow: 0 0 20px color-mix(in srgb, var(--star-glow) 30%, transparent);
}

/* ==================== 主题切换按钮 ==================== */
.theme-toggle {
    position: fixed;
    top: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(147, 112, 219, 0.1);
    border: 2px solid rgba(147, 112, 219, 0.4);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.4s ease;
    z-index: 999;
    backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    background: rgba(147, 112, 219, 0.3);
    border-color: rgba(147, 112, 219, 0.7);
    box-shadow: 0 0 30px rgba(147, 112, 219, 0.4);
    transform: scale(1.05);
}

.theme-icon {
    font-size: 1.3rem;
    transition: transform 0.4s ease;
}

.theme-label {
    font-size: 0.8rem;
    color: var(--star-bright);
    white-space: nowrap;
    font-weight: 500;
}

.theme-toggle:hover .theme-icon {
    transform: rotate(20deg);
}

/* 各主题切换按钮适配 */
[data-theme="sunrise"] .theme-toggle {
    background: rgba(255,140,0,0.12);
    border-color: rgba(255,140,0,0.4);
}
[data-theme="sunrise"] .theme-toggle:hover {
    background: rgba(255,140,0,0.25);
    border-color: rgba(255,140,0,0.7);
    box-shadow: 0 0 30px rgba(255,140,0,0.3);
}
[data-theme="meadow"] .theme-toggle {
    background: rgba(76,175,80,0.1);
    border-color: rgba(76,175,80,0.4);
}
[data-theme="meadow"] .theme-toggle:hover {
    background: rgba(76,175,80,0.25);
    border-color: rgba(76,175,80,0.7);
    box-shadow: 0 0 30px rgba(76,175,80,0.3);
}
[data-theme="rain"] .theme-toggle {
    background: rgba(90,138,170,0.12);
    border-color: rgba(90,138,170,0.4);
}
[data-theme="rain"] .theme-toggle:hover {
    background: rgba(90,138,170,0.25);
    border-color: rgba(90,138,170,0.7);
    box-shadow: 0 0 30px rgba(90,138,170,0.3);
}
[data-theme="snow"] .theme-toggle {
    background: rgba(112,176,224,0.1);
    border-color: rgba(112,176,224,0.4);
}
[data-theme="snow"] .theme-toggle:hover {
    background: rgba(112,176,224,0.25);
    border-color: rgba(112,176,224,0.7);
    box-shadow: 0 0 30px rgba(112,176,224,0.3);
}

/* ==================== 主页 - 星空禅意 ==================== */
#home-page {
    position: relative;
}

.home-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 24px;
    position: relative;
    z-index: 2;
}

.greeting-section {
    text-align: center;
    max-width: 600px;
}

.welcome-icon {
    font-size: 3.5rem;
    margin-bottom: 40px;
    opacity: 0;
    animation: starGlow 2s ease 0.3s forwards;
    filter: drop-shadow(0 0 30px rgba(147, 112, 219, 0.8));
}

@keyframes starGlow {
    from { opacity: 0; transform: scale(0.5); filter: drop-shadow(0 0 0 rgba(147, 112, 219, 0)); }
    to { opacity: 1; transform: scale(1); filter: drop-shadow(0 0 30px rgba(147, 112, 219, 0.8)); }
}

.main-title {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--star-white);
    margin-bottom: 50px;
    letter-spacing: 0.4em;
    opacity: 0;
    animation: fadeInUp 1s ease 0.8s forwards;
    text-shadow: 0 0 40px rgba(147, 112, 219, 0.5);
}

.care-messages {
    margin-bottom: 40px;
}

.care-line {
    font-size: 1.2rem;
    color: var(--star-silver);
    margin: 16px 0;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    font-weight: 300;
    letter-spacing: 0.1em;
}

.care-line:nth-child(1) { animation-delay: 1.3s; }
.care-line:nth-child(2) { animation-delay: 2s; }
.care-line:nth-child(3) { animation-delay: 2.7s; }
.care-line:nth-child(4) { animation-delay: 3.4s; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.comfort-message {
    font-size: 1rem;
    color: var(--star-bright);
    line-height: 2.2;
    margin-top: 40px;
    padding: 35px 40px;
    background: rgba(147, 112, 219, 0.08);
    border: 1px solid rgba(147, 112, 219, 0.2);
    opacity: 0;
    animation: fadeInUp 1s ease 4.1s forwards;
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
}

.modules-section {
    margin-top: 70px;
    opacity: 0;
    animation: fadeInUp 1s ease 4.8s forwards;
}

.modules-hint {
    text-align: center;
    font-size: 0.9rem;
    color: var(--star-silver);
    margin-bottom: 35px;
    letter-spacing: 0.2em;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.module-card {
    background: rgba(255,255,255,0.03);
    padding: 35px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(147, 112, 219, 0.2);
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(147, 112, 219, 0.2), transparent);
    transition: left 0.7s ease;
}

.module-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(147, 112, 219, 0.5), transparent, rgba(74, 144, 217, 0.5), transparent);
    border-radius: 15px;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
}

.module-card:hover::before {
    left: 100%;
}

.module-card:hover::after {
    opacity: 1;
}

.module-card:hover {
    background: rgba(147, 112, 219, 0.1);
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(147, 112, 219, 0.3), 0 0 30px rgba(147, 112, 219, 0.2);
    border-color: rgba(147, 112, 219, 0.5);
}

.module-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    display: block;
    transition: transform 0.5s ease;
    filter: drop-shadow(0 0 10px rgba(147, 112, 219, 0.5));
}

.module-card:hover .module-icon {
    transform: scale(1.2) rotate(5deg);
    filter: drop-shadow(0 0 20px rgba(147, 112, 219, 0.8));
}

.module-card h3 {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--star-white);
    margin-bottom: 12px;
    letter-spacing: 0.15em;
}

.module-card p {
    font-size: 0.85rem;
    color: var(--star-silver);
    line-height: 1.8;
}

/* ==================== 智慧语录 - 星空古籍风 ==================== */
#maoxuan-page {
    color: var(--star-white);
}

.maoxuan-container {
    min-height: 100vh;
    padding: 100px 24px 80px;
    position: relative;
    z-index: 2;
}

/* 引导页样式 */
.guide-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 180px);
    max-width: 550px;
    margin: 0 auto;
    text-align: center;
}

.guide-page.hidden {
    display: none;
}

.guide-text-container {
    width: 100%;
    margin-bottom: 50px;
}

.guide-line {
    font-size: 1.15rem;
    color: var(--star-white);
    line-height: 2;
    margin: 12px 0;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.4s ease;
    letter-spacing: 0.03em;
}

.guide-line.visible {
    opacity: 1;
    transform: translateY(0);
}

.guide-line.highlight {
    color: var(--star-gold);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    font-size: 1.2rem;
}

.guide-line.hint {
    color: var(--star-silver);
    font-size: 1rem;
}

.guide-line.action {
    color: var(--star-bright);
}

.guide-btn {
    padding: 14px 40px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--star-glow) 25%, transparent), color-mix(in srgb, var(--star-gold) 20%, transparent));
    border: 1px solid color-mix(in srgb, var(--star-glow) 50%, transparent);
    color: var(--star-white);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.4s ease;
    font-family: inherit;
    letter-spacing: 0.15em;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    margin-top: 20px;
}

.guide-btn:hover {
    background: linear-gradient(135deg, color-mix(in srgb, var(--star-glow) 45%, transparent), color-mix(in srgb, var(--star-gold) 40%, transparent));
    border-color: color-mix(in srgb, var(--star-glow) 80%, transparent);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px color-mix(in srgb, var(--star-glow) 35%, transparent);
}

.guide-btn.pulse {
    animation: btnPulse 2s ease-in-out infinite;
}

@keyframes btnPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(147, 112, 219, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(147, 112, 219, 0); }
}

/* 主内容区 */
.maoxuan-main.hidden {
    display: none;
}

.maoxuan-header {
    text-align: center;
    margin-bottom: 50px;
}

.maoxuan-header h1 {
    font-size: 2rem;
    font-weight: 400;
    color: var(--star-white);
    letter-spacing: 0.3em;
    margin-bottom: 15px;
    text-shadow: 0 0 30px rgba(147, 112, 219, 0.5);
}

#maoxuan-page .subtitle {
    font-size: 0.95rem;
    color: var(--star-silver);
    letter-spacing: 0.15em;
}

.card-display-area {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 480px;
    cursor: pointer;
    perspective: 1200px;
    overflow: visible;
}

.card-container {
    width: 320px;
    height: 460px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background: 
        linear-gradient(135deg, rgba(88, 28, 135, 0.9) 0%, rgba(26, 26, 46, 0.95) 50%, rgba(13, 13, 26, 0.98) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 
        0 20px 50px -10px rgba(0,0,0,0.6),
        0 0 40px rgba(147, 112, 219, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.1);
    border: 2px solid rgba(147, 112, 219, 0.4);
    border-radius: 20px;
    overflow: hidden;
}

.card-back::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border: 1px solid rgba(147, 112, 219, 0.3);
    pointer-events: none;
    border-radius: 15px;
}

.card-pattern {
    width: 65%;
    height: 45%;
    border: 2px solid rgba(147, 112, 219, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 10px;
    background: rgba(147, 112, 219, 0.1);
}

.card-pattern::before {
    content: '悟';
    font-size: 5rem;
    color: rgba(147, 112, 219, 0.5);
    font-family: 'Noto Serif SC', serif;
    font-weight: 300;
    text-shadow: 0 0 30px rgba(147, 112, 219, 0.5);
}

.draw-hint {
    margin-top: 50px;
    color: var(--star-silver);
    font-size: 1rem;
    letter-spacing: 0.4em;
    font-weight: 300;
}

.quote-card {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: rotateY(180deg);
    background: 
        linear-gradient(135deg, rgba(26, 26, 46, 0.98) 0%, rgba(13, 13, 26, 0.99) 100%);
    box-shadow: 
        0 20px 50px -10px rgba(0,0,0,0.6),
        0 0 40px rgba(147, 112, 219, 0.2),
        inset 0 1px 0 rgba(255,255,255,0.05);
    border: 1px solid rgba(147, 112, 219, 0.3);
    padding: 40px 35px;
    display: flex;
    flex-direction: column;
    color: var(--star-white);
    border-radius: 20px;
    box-sizing: border-box;
    overflow: hidden;
}

.quote-card.hidden {
    /* 隐藏正面卡片时彻底移除布局占位，防止后续元素下沉产生空白 */
    display: none;
}

.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.quote-main {
    font-size: 1.5rem;
    color: var(--star-white);
    line-height: 2;
    margin-bottom: 35px;
    text-align: center;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-shadow: 0 0 20px rgba(255,255,255,0.1);
}

.quote-meaning {
    font-size: 0.95rem;
    color: var(--star-bright);
    line-height: 2;
    text-align: center;
    padding: 25px 20px;
    background: rgba(147, 112, 219, 0.1);
    border-left: 4px solid rgba(147, 112, 219, 0.5);
    border-radius: 0 10px 10px 0;
}

.quote-source {
    text-align: center;
    color: var(--star-silver);
    font-size: 0.9rem;
    margin-top: 30px;
    letter-spacing: 0.15em;
}

.card-actions {
    text-align: center;
    margin-top: 60px;
}

/* ===== 统一按钮样式 ===== */
.action-btn {
    padding: 12px 36px;
    background: color-mix(in srgb, var(--star-glow) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--star-glow) 45%, transparent);
    color: var(--star-white);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.35s ease;
    font-family: inherit;
    letter-spacing: 0.15em;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.action-btn:hover {
    background: color-mix(in srgb, var(--star-glow) 25%, transparent);
    border-color: color-mix(in srgb, var(--star-glow) 75%, transparent);
    transform: translateY(-3px);
    box-shadow: 0 10px 28px color-mix(in srgb, var(--star-glow) 30%, transparent);
}

/* ==================== 塔罗牌 - 星空神秘风 ==================== */
#tarot-page {
    color: var(--star-white);
}

.tarot-container {
    min-height: 100vh;
    padding: 100px 24px 80px;
    position: relative;
    z-index: 2;
}

.tarot-header {
    text-align: center;
    margin-bottom: 40px;
}

.tarot-header h1 {
    font-size: 2rem;
    font-weight: 400;
    color: var(--star-white);
    letter-spacing: 0.3em;
    text-shadow: 0 0 40px rgba(147, 112, 219, 0.6);
}

#tarot-page .subtitle {
    font-size: 0.95rem;
    color: var(--star-silver);
    letter-spacing: 0.15em;
}

.tarot-intro {
    text-align: center;
    padding: 20px;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 水晶球样式 */
.crystal-ball-container {
    position: relative;
    cursor: pointer;
    padding: 20px;
    margin-bottom: 30px;
    transition: transform 0.3s ease;
}

.crystal-ball-container:hover {
    transform: scale(1.02);
}

.crystal-ball-container:hover .crystal-ball {
    animation: ballFloat 3s ease-in-out infinite;
}

@keyframes ballFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.crystal-ball {
    width: 180px;
    height: 180px;
    position: relative;
    border-radius: 50%;
    background: linear-gradient(135deg, 
        rgba(147, 112, 219, 0.3) 0%, 
        rgba(88, 28, 135, 0.5) 50%,
        rgba(26, 26, 46, 0.8) 100%);
    box-shadow: 
        0 0 60px rgba(147, 112, 219, 0.4),
        0 0 100px rgba(147, 112, 219, 0.2),
        inset 0 0 40px rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.ball-inner {
    position: absolute;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 80%;
    border-radius: 50%;
    overflow: hidden;
    background: radial-gradient(circle at 30% 30%, 
        rgba(100, 180, 255, 0.3) 0%, 
        rgba(147, 112, 219, 0.2) 40%,
        rgba(26, 26, 46, 0.9) 100%);
}

.nebula {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    transform: translate(-50%, -50%);
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(255, 100, 200, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 60%, rgba(100, 200, 255, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(200, 100, 255, 0.3) 0%, transparent 40%);
    animation: nebulaFlow 8s ease-in-out infinite;
}

@keyframes nebulaFlow {
    0%, 100% { transform: translate(-50%, -50%) rotate(0deg) scale(1); }
    33% { transform: translate(-50%, -50%) rotate(120deg) scale(1.1); }
    66% { transform: translate(-50%, -50%) rotate(240deg) scale(0.95); }
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.stars::before,
.stars::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    box-shadow: 
        20px 40px 0 white,
        50px 20px 0 rgba(255,255,255,0.8),
        80px 50px 0 rgba(255,255,255,0.6),
        30px 70px 0 rgba(255,255,255,0.9),
        70px 80px 0 rgba(255,255,255,0.7),
        100px 30px 0 rgba(255,255,255,0.5),
        15px 90px 0 rgba(255,255,255,0.8),
        90px 15px 0 rgba(255,255,255,0.6);
    animation: starTwinkle 3s ease-in-out infinite;
}

.stars::after {
    animation-delay: 1.5s;
    opacity: 0.6;
}

@keyframes starTwinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.ball-glow {
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: radial-gradient(circle, rgba(147, 112, 219, 0.3), transparent 70%);
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.ball-highlight {
    position: absolute;
    top: 15%;
    left: 20%;
    width: 25%;
    height: 15%;
    background: linear-gradient(135deg, rgba(255,255,255,0.4), transparent);
    border-radius: 50%;
    transform: rotate(-30deg);
}

.ball-stand {
    width: 100px;
    height: 30px;
    margin: -10px auto 0;
    background: linear-gradient(180deg, 
        rgba(147, 112, 219, 0.6) 0%, 
        rgba(88, 28, 135, 0.8) 50%,
        rgba(26, 26, 46, 0.9) 100%);
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
}

.ball-stand::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 10px;
    background: linear-gradient(180deg, rgba(147, 112, 219, 0.4), rgba(88, 28, 135, 0.6));
    border-radius: 50%;
}

.crystal-hint {
    color: var(--star-white);
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    margin-bottom: 15px;
    text-shadow: 0 0 20px rgba(147, 112, 219, 0.5);
}

.crystal-hint-sub {
    color: var(--star-silver);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    opacity: 0.8;
}

.start-reading-btn {
    margin-top: 50px;
    padding: 18px 55px;
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.3), rgba(74, 144, 217, 0.3));
    border: 1px solid rgba(147, 112, 219, 0.5);
    color: var(--star-white);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.4s ease;
    font-family: inherit;
    letter-spacing: 0.25em;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    border-radius: 30px;
}

.start-reading-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.start-reading-btn:hover::before {
    left: 100%;
}

.start-reading-btn:hover {
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.5), rgba(74, 144, 217, 0.5));
    border-color: rgba(147, 112, 219, 0.8);
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(147, 112, 219, 0.4);
}

.tarot-reading.hidden {
    display: none;
}

#card-selection {
    /* 不设min-height，让内容自然撑开 */
}

#card-selection.hidden {
    display: none;
}

.reading-progress {
    text-align: center;
    margin-bottom: 50px;
}

.step-indicator {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-bottom: 30px;
}

.step {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(147, 112, 219, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--star-silver);
    transition: all 0.5s ease;
    position: relative;
}

.step::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #9370db;
    animation: rotate 2s linear infinite;
    opacity: 0;
}

.step.active {
    background: rgba(147, 112, 219, 0.25);
    border-color: #9370db;
    color: var(--star-white);
    box-shadow: 0 0 40px rgba(147, 112, 219, 0.5);
}

.step.active::before {
    opacity: 1;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.step-instruction {
    font-size: 1.15rem;
    color: var(--star-bright);
    font-weight: 300;
    letter-spacing: 0.1em;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.card-selection {
    text-align: center;
}

.deck-container {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin: 60px 0;
}

.tarot-deck {
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.tarot-deck::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    border-radius: 20px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.tarot-deck:hover {
    transform: translateY(-25px) scale(1.08);
}

.tarot-deck:hover::before {
    border-color: rgba(147, 112, 219, 0.6);
    box-shadow: 0 0 40px rgba(147, 112, 219, 0.4);
}

.tarot-deck.selected {
    animation: cardFly 0.8s ease forwards;
}

@keyframes cardFly {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1) translateY(-30px); opacity: 0.8; }
    100% { transform: scale(0) translateY(-100px); opacity: 0; }
}

.deck-card {
    width: 120px;
    height: 200px;
    background: 
        linear-gradient(145deg, #1a1a3e 0%, #0f0f2a 50%, #1a1a3e 100%);
    position: relative;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.5),
        0 0 30px rgba(147, 112, 219, 0.2),
        inset 0 1px 0 rgba(255,255,255,0.1);
    border: 2px solid rgba(147, 112, 219, 0.5);
    border-radius: 15px;
    overflow: hidden;
}

/* 牌背 - 神秘几何图案 */
.deck-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border: 2px solid rgba(147, 112, 219, 0.8);
    border-radius: 50%;
    box-shadow: 
        0 0 20px rgba(147, 112, 219, 0.5),
        inset 0 0 20px rgba(147, 112, 219, 0.2);
    animation: mysticalCircle 4s ease-in-out infinite;
}

/* 内圈 */
.deck-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 1.5px solid rgba(255, 215, 0, 0.6);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    animation: innerCircle 4s ease-in-out infinite reverse;
}

/* 四角星装饰 */
.deck-card .corner-star {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.deck-card .corner-star::before,
.deck-card .corner-star::after {
    content: '✦';
    position: absolute;
    font-size: 1rem;
    color: rgba(255, 215, 0, 0.7);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    animation: cornerTwinkle 2s ease-in-out infinite;
}

.deck-card .corner-star::before {
    top: 12px;
    left: 12px;
}

.deck-card .corner-star::after {
    bottom: 12px;
    right: 12px;
    animation-delay: 1s;
}

/* 中心星 */
.deck-card .center-symbol {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 
        0 0 10px rgba(147, 112, 219, 1),
        0 0 30px rgba(147, 112, 219, 0.8);
    animation: centerGlow 3s ease-in-out infinite;
    z-index: 2;
}

/* 背景网格纹理 */
.deck-card .grid-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(90deg, rgba(147, 112, 219, 0.05) 1px, transparent 1px),
        linear-gradient(rgba(147, 112, 219, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.5;
}

/* 边框装饰线 */
.deck-card .border-frame {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 1px solid rgba(147, 112, 219, 0.3);
    border-radius: 10px;
    pointer-events: none;
}

.deck-card .border-frame::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 6px;
}

@keyframes mysticalCircle {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        box-shadow: 0 0 20px rgba(147, 112, 219, 0.5), inset 0 0 20px rgba(147, 112, 219, 0.2);
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.1) rotate(180deg);
        box-shadow: 0 0 40px rgba(147, 112, 219, 0.8), inset 0 0 30px rgba(147, 112, 219, 0.4);
    }
}

@keyframes innerCircle {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        border-color: rgba(255, 215, 0, 0.6);
    }
    50% { 
        transform: translate(-50%, -50%) scale(0.9) rotate(-180deg);
        border-color: rgba(255, 215, 0, 0.9);
    }
}

@keyframes cornerTwinkle {
    0%, 100% { 
        opacity: 0.5;
        transform: scale(1);
    }
    50% { 
        opacity: 1;
        transform: scale(1.3);
    }
}

@keyframes centerGlow {
    0%, 100% { 
        opacity: 0.8;
        filter: drop-shadow(0 0 10px rgba(147, 112, 219, 1));
    }
    50% { 
        opacity: 1;
        filter: drop-shadow(0 0 25px rgba(147, 112, 219, 1)) drop-shadow(0 0 40px rgba(255, 215, 0, 0.5));
    }
}

@keyframes starPulse {
    0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); filter: drop-shadow(0 0 5px rgba(147, 112, 219, 0.5)); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.3); filter: drop-shadow(0 0 20px rgba(147, 112, 219, 1)); }
}

.selection-hint {
    color: var(--star-silver);
    font-size: 0.95rem;
    letter-spacing: 0.2em;
}

.spread-display {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 900px;
    margin: 50px auto;
}

.spread-display.hidden {
    display: none;
}

.spread-card {
    text-align: center;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.spread-card:nth-child(1) { animation-delay: 0.2s; }
.spread-card:nth-child(2) { animation-delay: 0.5s; }
.spread-card:nth-child(3) { animation-delay: 0.8s; }

.position-label {
    font-size: 0.9rem;
    color: var(--star-gold);
    margin-bottom: 20px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.card-slot {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tarot-card {
    width: 150px;
    background: linear-gradient(135deg, rgba(40, 40, 70, 0.98), rgba(30, 30, 50, 0.99));
    padding: 25px;
    box-shadow: 
        0 25px 50px rgba(0,0,0,0.5),
        0 0 40px rgba(147, 112, 219, 0.3);
    border: 1px solid rgba(147, 112, 219, 0.5);
    border-radius: 15px;
    animation: cardAppear 0.6s ease;
}

@keyframes cardAppear {
    from { transform: scale(0.8) rotateY(90deg); opacity: 0; }
    to { transform: scale(1) rotateY(0); opacity: 1; }
}

.tarot-card.reversed {
    transform: rotate(180deg);
}

.card-image {
    font-size: 3.2rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 15px rgba(147, 112, 219, 0.7));
}

.card-name {
    font-size: 1.05rem;
    color: var(--star-white);
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.card-position {
    font-size: 0.85rem;
    color: var(--star-gold);
}

.card-meaning {
    margin-top: 20px;
    padding: 20px;
    background: rgba(147, 112, 219, 0.15);
    border-radius: 10px;
    text-align: left;
    border: 1px solid rgba(147, 112, 219, 0.3);
}

.position-title {
    font-size: 0.9rem;
    color: var(--star-bright);
    margin-bottom: 10px;
    letter-spacing: 0.1em;
}

.meaning-text {
    font-size: 0.95rem;
    color: var(--star-silver);
    line-height: 1.8;
}

.reading-result {
    max-width: 750px;
    margin: 50px auto 0;
    padding: 40px;
    background: rgba(20, 20, 40, 0.7);
    border: 1px solid rgba(147, 112, 219, 0.3);
    border-radius: 20px;
    backdrop-filter: blur(15px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.reading-result.hidden {
    display: none;
}

.reading-result h3 {
    text-align: center;
    font-size: 1.4rem;
    color: var(--star-white);
    margin-bottom: 35px;
    font-weight: 400;
    letter-spacing: 0.25em;
    text-shadow: 0 0 20px rgba(147, 112, 219, 0.4);
}

.interp-section {
    margin-bottom: 25px;
    padding: 25px;
    background: rgba(147, 112, 219, 0.12);
    border-left: 3px solid rgba(147, 112, 219, 0.6);
    border-radius: 0 10px 10px 0;
}

.interp-section h4 {
    font-size: 1.05rem;
    color: var(--star-bright);
    margin-bottom: 12px;
    font-weight: 400;
    letter-spacing: 0.15em;
}

.interp-section p {
    font-size: 0.95rem;
    color: var(--star-silver);
    line-height: 2;
}

.interp-section.advice {
    background: rgba(147, 112, 219, 0.2);
    border-left-color: var(--star-gold);
}

/* 塔罗牌操作按钮 — 继承统一 .action-btn */

/* ==================== 答案之书 - 神秘古籍风 ==================== */
#answerbook-page {
    color: var(--star-white);
}

.answerbook-container {
    min-height: 100vh;
    padding: 100px 24px 80px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.answerbook-header {
    text-align: center;
    margin-bottom: 40px;
}

.answerbook-header h1 {
    font-size: 2rem;
    font-weight: 400;
    color: var(--star-white);
    letter-spacing: 0.3em;
    margin-bottom: 15px;
    text-shadow: 0 0 30px rgba(147, 112, 219, 0.5);
}

#answerbook-page .subtitle {
    font-size: 0.95rem;
    color: var(--star-silver);
    letter-spacing: 0.15em;
}

.answerbook-intro {
    text-align: center;
    margin-bottom: 30px;
    max-width: 450px;
}

.answerbook-intro .intro-text {
    font-size: 1.05rem;
    color: var(--star-bright);
    margin: 12px 0;
    line-height: 1.8;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.6s ease forwards;
}

.answerbook-intro .intro-text:nth-child(1) { animation-delay: 0.2s; }
.answerbook-intro .intro-text:nth-child(2) { animation-delay: 0.5s; }
.answerbook-intro .intro-text:nth-child(3) { animation-delay: 0.8s; }

.answerbook-intro .hint {
    color: var(--star-silver);
    font-size: 0.95rem;
}

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

/* 魔法书容器 */
.magic-book-container {
    position: relative;
    cursor: pointer;
    padding: 20px;
    transition: transform 0.3s ease;
}

.magic-book-container:hover {
    transform: scale(1.02);
}

.magic-book-container:hover .magic-book {
    animation: bookFloat 2s ease-in-out infinite;
}

@keyframes bookFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* 魔法书本体 */
.magic-book {
    width: 200px;
    height: 260px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.magic-book.opened {
    transform: rotateY(-15deg) rotateX(5deg);
}

.book-cover {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(88, 28, 135, 0.95) 0%, 
        rgba(26, 26, 46, 0.98) 50%, 
        rgba(13, 13, 26, 0.99) 100%);
    border-radius: 8px 12px 12px 8px;
    box-shadow: 
        0 20px 50px rgba(0,0,0,0.5),
        0 0 40px rgba(147, 112, 219, 0.3),
        inset 2px 0 0 rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(147, 112, 219, 0.4);
    backface-visibility: hidden;
    z-index: 2;
}

.book-spine {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 12px;
    background: linear-gradient(90deg, 
        rgba(147, 112, 219, 0.6), 
        rgba(88, 28, 135, 0.8));
    border-radius: 8px 0 0 8px;
    box-shadow: inset -2px 0 5px rgba(0,0,0,0.3);
}

.book-title {
    font-size: 5rem;
    color: var(--star-gold);
    font-weight: 300;
    text-shadow: 
        0 0 30px rgba(255, 215, 0, 0.5),
        0 0 60px rgba(255, 215, 0, 0.3);
    animation: titlePulse 3s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.book-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(147, 112, 219, 0.2), transparent 70%);
    pointer-events: none;
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

.book-pages {
    position: absolute;
    width: 94%;
    height: 96%;
    top: 2%;
    right: 3%;
    background: linear-gradient(90deg, 
        rgba(240, 230, 210, 0.9) 0%, 
        rgba(250, 245, 230, 0.95) 50%,
        rgba(240, 230, 210, 0.9) 100%);
    border-radius: 4px 10px 10px 4px;
    transform: translateZ(-5px);
    display: flex;
    box-shadow: inset 0 0 20px rgba(139, 119, 101, 0.2);
}

.page-left, .page-right {
    flex: 1;
    border-right: 1px solid rgba(139, 119, 101, 0.15);
}

.page-right {
    border-right: none;
    border-left: 1px solid rgba(139, 119, 101, 0.15);
}

.book-hint {
    text-align: center;
    margin-top: 25px;
    color: var(--star-silver);
    font-size: 0.95rem;
    letter-spacing: 0.3em;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.magic-book-container:hover .book-hint {
    color: var(--star-gold);
    opacity: 1;
}

/* 答案展示 */
.answer-display {
    text-align: center;
    max-width: 550px;
    padding: 40px;
    position: relative;
    animation: answerFadeIn 0.8s ease forwards;
}

.answer-display.hidden {
    display: none;
}

@keyframes answerFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.answer-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(147, 112, 219, 0.15), transparent 70%);
    pointer-events: none;
    animation: answerGlow 3s ease-in-out infinite;
}

@keyframes answerGlow {
    0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.2); }
}

.answer-text {
    font-size: 1.6rem;
    color: var(--star-white);
    line-height: 2;
    letter-spacing: 0.05em;
    text-shadow: 0 0 30px rgba(147, 112, 219, 0.5);
    margin-bottom: 50px;
    position: relative;
    z-index: 1;
}

/* ==================== 名人对话 - 星空对话风 ==================== */
#avatar-page {
    color: var(--star-white);
}

.avatar-container {
    min-height: 100vh;
    padding: 100px 24px 80px;
    position: relative;
    z-index: 2;
}

.avatar-header {
    text-align: center;
    margin-bottom: 50px;
}

.avatar-header h1 {
    font-size: 2rem;
    font-weight: 400;
    color: var(--star-white);
    letter-spacing: 0.3em;
    text-shadow: 0 0 30px rgba(147, 112, 219, 0.5);
}

#avatar-page .subtitle {
    font-size: 0.95rem;
    color: var(--star-silver);
    letter-spacing: 0.15em;
}

.avatar-selection {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.selection-guide {
    font-size: 1.1rem;
    color: var(--star-bright);
    margin-bottom: 50px;
    font-weight: 300;
    letter-spacing: 0.15em;
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.avatar-card {
    background: rgba(255,255,255,0.03);
    padding: 40px 25px;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(147, 112, 219, 0.25);
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.avatar-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #9370db, #4a90d9, #ffd700);
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

.avatar-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #9370db, #4a90d9, #ffd700, #9370db);
    border-radius: 15px;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
}

.avatar-card:hover {
    background: rgba(147, 112, 219, 0.1);
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 30px 60px -12px rgba(147, 112, 219, 0.3);
    border-color: rgba(147, 112, 219, 0.5);
}

.avatar-card:hover::before {
    transform: scaleX(1);
}

.avatar-card:hover::after {
    opacity: 0.5;
}

.avatar-image {
    font-size: 3.5rem;
    margin-bottom: 20px;
    display: block;
    transition: transform 0.5s ease;
    filter: drop-shadow(0 0 15px rgba(147, 112, 219, 0.5));
}

.avatar-card:hover .avatar-image {
    transform: scale(1.2) rotate(8deg);
    filter: drop-shadow(0 0 25px rgba(147, 112, 219, 0.8));
}

.avatar-card h4 {
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--star-white);
    margin-bottom: 10px;
    letter-spacing: 0.15em;
}

.avatar-card p {
    font-size: 0.9rem;
    color: var(--star-silver);
}

/* 自创角色卡片 */
.custom-avatar-card {
    border: 2px dashed rgba(147, 112, 219, 0.4) !important;
    background: rgba(147, 112, 219, 0.05) !important;
}

.custom-avatar-card:hover {
    border-color: rgba(147, 112, 219, 0.8) !important;
    background: rgba(147, 112, 219, 0.15) !important;
}

/* 自创角色界面 */
.custom-creator {
    max-width: 500px;
    margin: 40px auto;
    padding: 40px 30px;
}

.creator-header {
    text-align: center;
    margin-bottom: 40px;
}

.creator-header h3 {
    font-size: 1.5rem;
    color: var(--star-white);
    margin-bottom: 10px;
    font-weight: 300;
    letter-spacing: 0.1em;
}

.creator-subtitle {
    color: var(--star-silver);
    font-size: 0.95rem;
}

.creator-step {
    animation: fadeInUp 0.4s ease;
}

.creator-step.hidden {
    display: none;
}

.step-question {
    font-size: 1.2rem;
    color: var(--star-white);
    margin-bottom: 20px;
    font-weight: 300;
    letter-spacing: 0.05em;
}

.step-hint {
    font-size: 0.85rem;
    color: var(--star-silver);
    margin-top: 10px;
    opacity: 0.7;
}

.creator-step input,
.creator-step textarea {
    width: 100%;
    padding: 15px 18px;
    background: rgba(20, 20, 40, 0.6);
    border: 1px solid rgba(147, 112, 219, 0.3);
    border-radius: 12px;
    color: var(--star-white);
    font-size: 1.05rem;
    font-family: 'Noto Serif SC', serif;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    resize: none;
}

.creator-step input:focus,
.creator-step textarea:focus {
    border-color: rgba(147, 112, 219, 0.7);
    box-shadow: 0 0 20px rgba(147, 112, 219, 0.15);
}

.creator-step input::placeholder,
.creator-step textarea::placeholder {
    color: rgba(180, 180, 200, 0.4);
}

.creator-next-btn {
    display: block;
    margin: 25px auto 0;
    padding: 12px 30px;
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.3), rgba(100, 70, 180, 0.3));
    border: 1px solid rgba(147, 112, 219, 0.4);
    border-radius: 25px;
    color: var(--star-white);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Serif SC', serif;
}

.creator-next-btn:hover {
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.5), rgba(100, 70, 180, 0.5));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(147, 112, 219, 0.3);
}

.creator-back {
    display: block;
    margin: 30px auto 0;
    text-align: center;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-interface {
    max-width: 650px;
    margin: 0 auto;
    background: rgba(20, 20, 40, 0.8);
    border: 1px solid rgba(147, 112, 219, 0.3);
    box-shadow: 0 25px 60px -12px rgba(0,0,0,0.5), 0 0 40px rgba(147, 112, 219, 0.2);
    border-radius: 20px;
    overflow: hidden;
    animation: slideUp 0.5s ease;
    backdrop-filter: blur(15px);
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.chat-interface.hidden {
    display: none;
}

.chat-header {
    padding: 25px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(147, 112, 219, 0.2);
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.15), rgba(74, 144, 217, 0.1));
}

.current-avatar {
    font-size: 2.5rem;
    animation: avatarBounce 2s ease infinite;
    filter: drop-shadow(0 0 15px rgba(147, 112, 219, 0.6));
}

@keyframes avatarBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

#avatar-name {
    font-size: 1.25rem;
    color: var(--star-white);
    letter-spacing: 0.15em;
    font-weight: 500;
    text-shadow: 0 0 15px rgba(147, 112, 219, 0.4);
}

.chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 30px;
    background: linear-gradient(180deg, rgba(26, 26, 46, 0.5), rgba(13, 13, 26, 0.5));
}

.message {
    margin-bottom: 25px;
    animation: messageSlide 0.4s ease;
}

@keyframes messageSlide {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.message.system {
    text-align: center;
    color: var(--star-silver);
    font-size: 0.9rem;
    padding: 20px;
    background: rgba(147, 112, 219, 0.1);
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid rgba(147, 112, 219, 0.2);
}

.message.user {
    display: flex;
    justify-content: flex-end;
}

.user-bubble {
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.8), rgba(74, 144, 217, 0.8));
    color: white;
    padding: 15px 22px;
    border-radius: 20px 20px 4px 20px;
    max-width: 75%;
    font-size: 0.95rem;
    line-height: 1.7;
    box-shadow: 0 5px 20px rgba(147, 112, 219, 0.4);
    animation: messagePop 0.3s ease;
}

@keyframes messagePop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.message.avatar {
    display: flex;
    justify-content: flex-start;
}

.avatar-bubble {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255,255,255,0.08);
    padding: 15px 22px;
    border-radius: 20px 20px 20px 4px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    max-width: 75%;
    border: 1px solid rgba(147, 112, 219, 0.3);
    animation: messagePop 0.3s ease;
}

.avatar-bubble .avatar-icon {
    font-size: 1.5rem;
    margin: 0;
    animation: avatarWiggle 0.5s ease;
    filter: drop-shadow(0 0 10px rgba(147, 112, 219, 0.5));
}

@keyframes avatarWiggle {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.avatar-bubble p {
    font-size: 0.95rem;
    color: var(--star-white);
    line-height: 1.7;
}

.chat-input-area {
    display: flex;
    padding: 25px 30px;
    background: rgba(13, 13, 26, 0.8);
    border-top: 1px solid rgba(147, 112, 219, 0.2);
    gap: 15px;
}

.chat-input-area input {
    flex: 1;
    padding: 15px 22px;
    border: 2px solid rgba(147, 112, 219, 0.3);
    border-radius: 25px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
    background: rgba(255,255,255,0.05);
    color: var(--star-white);
}

.chat-input-area input:focus {
    border-color: rgba(147, 112, 219, 0.7);
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 0 4px rgba(147, 112, 219, 0.15), 0 0 20px rgba(147, 112, 219, 0.2);
}

.chat-input-area input::placeholder {
    color: var(--star-silver);
}

.chat-input-area button {
    padding: 12px 28px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--star-glow) 70%, var(--star-dark)), color-mix(in srgb, var(--star-gold) 50%, var(--star-dark)));
    border: 1px solid color-mix(in srgb, var(--star-glow) 50%, transparent);
    color: var(--star-white);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    letter-spacing: 0.12em;
    border-radius: 25px;
    font-weight: 500;
}

.chat-input-area button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px color-mix(in srgb, var(--star-glow) 40%, transparent);
}

.chat-input-area .fav-btn {
    padding: 10px 14px;
    background: color-mix(in srgb, var(--star-gold) 15%, transparent);
    border: 1px solid color-mix(in srgb, var(--star-gold) 40%, transparent);
    font-weight: normal;
    font-size: 1rem;
    min-width: auto;
    line-height: 1;
}

.chat-input-area .fav-btn:hover {
    background: color-mix(in srgb, var(--star-gold) 35%, transparent);
    box-shadow: 0 4px 15px color-mix(in srgb, var(--star-gold) 30%, transparent);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-title {
        font-size: 2rem;
    }
    
    .care-line {
        font-size: 1.1rem;
    }
    
    .modules-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .module-card {
        min-height: 180px;
        padding: 30px 15px;
    }
    
    .card-container {
        width: 300px;
        height: 430px;
    }
    
    .quote-main {
        font-size: 1.3rem;
    }
    
    .spread-display {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .deck-container {
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }
    
    .avatar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .back-btn {
        top: 15px;
        left: 15px;
        padding: 10px 18px;
        font-size: 0.85rem;
    }
    
    .chat-messages {
        height: 350px;
    }
}

@media (max-width: 480px) {
    .modules-grid {
        grid-template-columns: 1fr;
        max-width: 300px;
    }
    
    .avatar-grid {
        grid-template-columns: 1fr;
    }
    
    .maoxuan-container,
    .tarot-container,
    .avatar-container {
        padding-top: 80px;
    }
    
    .step-indicator {
        gap: 25px;
    }
    
    .step {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

/* ===== 升级塔罗牌样式 - 金色魔法师纹路 ===== */

/* 升级牌背 — 金色魔法纹路 */
.deck-card {
    /* 保留原有样式，增强背景层 */
    background: 
        /* 魔法纹路（金色菱形交叉） */
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 35px,
            rgba(255, 215, 0, 0.08) 35px,
            rgba(255, 215, 0, 0.08) 70px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 35px,
            rgba(255, 215, 0, 0.08) 35px,
            rgba(255, 215, 0, 0.08) 70px
        ),
        /* 金色法阵（径向渐变层叠） */
        radial-gradient(
            circle at 50% 50%,
            rgba(255, 215, 0, 0.15) 0%,
            transparent 40%
        ),
        radial-gradient(
            circle at 50% 50%,
            rgba(255, 200, 30, 0.1) 0%,
            transparent 60%
        ),
        /* 原有深色背景 */
        linear-gradient(145deg, #1a1a3e 0%, #0f0f2a 50%, #1a1a3e 100%);
    position: relative;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.5),
        0 0 30px rgba(147, 112, 219, 0.2),
        /* 金色外发光 */
        0 0 50px rgba(255, 215, 0, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.1);
    border: 2px solid rgba(147, 112, 219, 0.5);
    border-radius: 15px;
    overflow: hidden;
}

/* 金色魔法圆环（内叠旋转） */
.deck-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border: 3px solid;
    border-color: rgba(255, 215, 0, 0.9);
    border-radius: 50%;
    box-shadow: 
        0 0 30px rgba(255, 215, 0, 0.6),
        inset 0 0 30px rgba(255, 215, 0, 0.2),
        0 0 60px rgba(255, 215, 0, 0.3);
    animation: magicCircleRotate 8s linear infinite;
    z-index: 2;
}

/* 金色星芒（外圈脉动） */
.deck-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 110px;
    height: 110px;
    background: 
        repeating-conic-gradient(
            from 0deg,
            rgba(255, 215, 0, 0.4) 0deg 15deg,
            transparent 15deg 30deg
        );
    border-radius: 50%;
    opacity: 0.6;
    animation: magicStarPulse 4s ease-in-out infinite;
    z-index: 1;
}

/* 中心金色符号（增强发光） */
.deck-card .center-symbol {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.2rem;
    color: #FFD700;
    text-shadow: 
        0 0 10px rgba(255, 215, 0, 1),
        0 0 20px rgba(255, 215, 0, 0.8),
        0 0 40px rgba(255, 215, 0, 0.5);
    animation: centerGlowPulse 3s ease-in-out infinite;
    z-index: 3;
}

/* 四角魔法星（高级闪烁） */
.deck-card .corner-star::before,
.deck-card .corner-star::after {
    content: '✦';
    position: absolute;
    font-size: 1.3rem;
    color: rgba(255, 215, 0, 0.9);
    text-shadow: 
        0 0 8px rgba(255, 215, 0, 1),
        0 0 15px rgba(255, 215, 0, 0.8);
    animation: cornerStarTwinkle 2s ease-in-out infinite;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.8));
    z-index: 2;
}

.deck-card .corner-star::before {
    top: 10px;
    left: 10px;
}

.deck-card .corner-star::after {
    bottom: 10px;
    right: 10px;
    animation-delay: 1s;
}

/* 网格纹理升级 — 金色网格 */
.deck-card .grid-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(90deg, rgba(255, 215, 0, 0.08) 1px, transparent 1px),
        linear-gradient(rgba(255, 215, 0, 0.08) 1px, transparent 1px);
    background-size: 15px 15px;
    opacity: 0.7;
    z-index: 1;
}

/* 魔法圆环旋转动画 */
@keyframes magicCircleRotate {
    0% { 
        transform: translate(-50%, -50%) rotate(0deg);
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.6), inset 0 0 30px rgba(255, 215, 0, 0.2), 0 0 60px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 50px rgba(255, 215, 0, 0.8), inset 0 0 40px rgba(255, 215, 0, 0.4), 0 0 80px rgba(255, 215, 0, 0.5);
    }
    100% { 
        transform: translate(-50%, -50%) rotate(360deg);
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.6), inset 0 0 30px rgba(255, 215, 0, 0.2), 0 0 60px rgba(255, 215, 0, 0.3);
    }
}

/* 星芒脉动动画 */
@keyframes magicStarPulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
}

/* 中心发光脉动 */
@keyframes centerGlowPulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        text-shadow: 
            0 0 10px rgba(255, 215, 0, 1),
            0 0 20px rgba(255, 215, 0, 0.8),
            0 0 40px rgba(255, 215, 0, 0.5);
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.15);
        text-shadow: 
            0 0 15px rgba(255, 215, 0, 1),
            0 0 30px rgba(255, 215, 0, 0.9),
            0 0 60px rgba(255, 215, 0, 0.7);
    }
}

/* 角星闪烁 */
@keyframes cornerStarTwinkle {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ===== 收藏按钮样式 ===== */

.fav-btn {
    background: color-mix(in srgb, var(--star-gold) 15%, transparent);
    color: var(--star-gold);
    border: 1px solid color-mix(in srgb, var(--star-gold) 45%, transparent);
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.35s ease;
    backdrop-filter: blur(8px);
    font-family: inherit;
    letter-spacing: 0.08em;
}

.fav-btn:hover {
    background: color-mix(in srgb, var(--star-gold) 30%, transparent);
    border-color: var(--star-gold);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--star-gold) 30%, transparent);
    transform: translateY(-2px);
}

.fav-btn.active {
    background: color-mix(in srgb, var(--star-gold) 40%, transparent);
    border-color: var(--star-gold);
    color: var(--star-gold);
    box-shadow: 0 0 18px color-mix(in srgb, var(--star-gold) 40%, transparent);
}

#favorites-page {
    min-height: 100vh;
    flex-direction: column;
    padding: 90px 30px 40px;
}

#favorites-page.active {
    display: flex;
}

.fav-header {
    text-align: center;
    margin-bottom: 40px;
    color: var(--star-bright);
}

.fav-header h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--star-gold);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

.fav-tabs {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

/* 收藏标签页按钮 — tab-btn 和 fav-tab 共用 */
.tab-btn,
.fav-tab {
    padding: 10px 22px;
    background: color-mix(in srgb, var(--star-purple) 60%, transparent);
    border: 1.5px solid color-mix(in srgb, var(--star-glow) 40%, transparent);
    border-radius: 25px;
    color: var(--star-bright);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-family: inherit;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    backdrop-filter: blur(8px);
}

.tab-btn:hover,
.fav-tab:hover {
    border-color: var(--star-gold);
    background: color-mix(in srgb, var(--star-purple) 80%, transparent);
}

.tab-btn.active,
.fav-tab.active {
    background: linear-gradient(135deg, color-mix(in srgb, var(--star-gold) 25%, transparent), color-mix(in srgb, var(--star-glow) 20%, transparent));
    border-color: var(--star-gold);
    color: var(--star-gold);
    box-shadow: 0 0 15px color-mix(in srgb, var(--star-gold) 30%, transparent);
}

.fav-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.fav-item {
    background: linear-gradient(135deg, color-mix(in srgb, var(--star-purple) 70%, transparent), color-mix(in srgb, var(--star-blue) 70%, transparent));
    border: 1px solid color-mix(in srgb, var(--star-glow) 35%, transparent);
    border-radius: 12px;
    padding: 20px;
    color: var(--star-bright);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.fav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--star-gold) 12%, transparent), transparent);
    transition: left 0.5s ease;
    z-index: 1;
}

.fav-item:hover::before {
    left: 100%;
}

.fav-item:hover {
    border-color: var(--star-gold);
    box-shadow: 0 8px 25px color-mix(in srgb, var(--star-gold) 20%, transparent);
    transform: translateY(-4px);
}

.fav-item-content {
    position: relative;
    z-index: 2;
}

.fav-item-text {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    color: var(--star-bright);
}

.fav-item-meta {
    font-size: 0.85rem;
    color: color-mix(in srgb, var(--star-bright) 60%, transparent);
    margin-bottom: 10px;
}

.fav-item-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.fav-delete-btn {
    background: rgba(180, 60, 70, 0.15);
    color: #e88;
    border: 1px solid rgba(180, 60, 70, 0.35);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    font-family: inherit;
    letter-spacing: 0.06em;
    backdrop-filter: blur(6px);
}

.fav-delete-btn:hover {
    background: rgba(220, 53, 69, 0.7);
    color: white;
    border-color: rgba(220, 53, 69, 0.7);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
    transform: translateY(-2px);
}

.fav-empty {
    text-align: center;
    padding: 60px 20px;
    color: color-mix(in srgb, var(--star-bright) 45%, transparent);
}

.fav-empty-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.fav-empty-text {
    font-size: 1.2rem;
}
