* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-red: #DC143C;
    --primary-gold: #FFD700;
    --dark-red: #8B0000;
    --light-gold: #FFF8DC;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 50%, #450a0a 100%);
    color: #fff;
    overflow-x: hidden;
}

/* 节日独特背景主题 */
/* 腊八节 - 温暖红色，腊八粥、冬日暖阳 */
.festival-1 {
    background: linear-gradient(135deg, #5c2018 0%, #8b3a2f 50%, #3d1512 100%);
    --primary-gold: #d4a853;
    --theme-accent: #c17f59;
}
.festival-1 .bg-pattern {
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(212,168,83,0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(193,127,89,0.12) 0%, transparent 40%),
        url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='20' cy='20' r='3' fill='rgba(212,168,83,0.1)'/%3E%3C/svg%3E");
}

/* 小年 - 橙黄温暖，灶神、糖瓜、年味装饰 */
.festival-2 {
    background: linear-gradient(135deg, #7c2d12 0%, #c2410c 50%, #431407 100%);
    --primary-gold: #fb923c;
    --theme-accent: #fdba74;
}
.festival-2 .bg-pattern {
    background-image: 
        radial-gradient(circle at 15% 85%, rgba(251,146,60,0.2) 0%, transparent 45%),
        radial-gradient(circle at 85% 15%, rgba(253,186,116,0.15) 0%, transparent 45%),
        url("data:image/svg+xml,%3Csvg width='50' height='50' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='20' y='20' width='10' height='10' fill='rgba(251,146,60,0.08)' rx='2'/%3E%3C/svg%3E");
}

/* 除夕 - 深红金黄，年夜饭、春联、福字 */
.festival-3 {
    background: linear-gradient(135deg, #450a0a 0%, #991b1b 40%, #7f1d1d 100%);
    --primary-gold: #fbbf24;
    --theme-accent: #fde047;
}
.festival-3 .bg-pattern {
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(251,191,36,0.2) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(253,224,71,0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(253,224,71,0.15) 0%, transparent 40%),
        url("data:image/svg+xml,%3Csvg width='80' height='80' xmlns='http://www.w3.org/2000/svg'%3E%3Ctext x='40' y='45' font-size='20' fill='rgba(251,191,36,0.06)' text-anchor='middle'%3E%E7%A6%8F%3C/text%3E%3C/svg%3E");
}

/* 春节 - 红金配色，灯笼、烟花、红梅 */
.festival-4 {
    background: linear-gradient(135deg, #7f1d1d 0%, #dc2626 40%, #991b1b 100%);
    --primary-gold: #fcd34d;
    --theme-accent: #fef08a;
}
.festival-4 .bg-pattern {
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(252,211,77,0.25) 0%, transparent 50%),
        radial-gradient(circle at 90% 10%, rgba(252,211,77,0.25) 0%, transparent 50%),
        radial-gradient(circle at 50% 90%, rgba(254,240,138,0.15) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='2' fill='rgba(252,211,77,0.12)'/%3E%3C/svg%3E");
}

/* 元宵节 - 彩色花灯、月亮、星空背景 */
.festival-5 {
    background: linear-gradient(135deg, #1e1b4b 0%, #3730a3 40%, #312e81 100%);
    --primary-gold: #fbbf24;
    --theme-accent: #c084fc;
}
.festival-5 .bg-pattern {
    background-image: 
        radial-gradient(circle at 50% 20%, rgba(251,191,36,0.3) 0%, transparent 30%),
        radial-gradient(circle at 20% 60%, rgba(192,132,252,0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(251,146,60,0.15) 0%, transparent 40%),
        url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='20' cy='20' r='1' fill='rgba(255,255,255,0.3)'/%3E%3Ccircle cx='80' cy='40' r='1.5' fill='rgba(255,255,255,0.4)'/%3E%3Ccircle cx='50' cy='80' r='1' fill='rgba(255,255,255,0.25)'/%3E%3C/svg%3E");
}

/* 清明节 - 淡雅绿色，柳树、清风、春花 */
.festival-6 {
    background: linear-gradient(135deg, #14532d 0%, #166534 40%, #15803d 100%);
    --primary-gold: #86efac;
    --theme-accent: #bbf7d0;
}
.festival-6 .bg-pattern {
    background-image: 
        radial-gradient(circle at 0% 50%, rgba(134,239,172,0.2) 0%, transparent 50%),
        radial-gradient(circle at 100% 30%, rgba(187,247,208,0.15) 0%, transparent 40%),
        url("data:image/svg+xml,%3Csvg width='80' height='80' xmlns='http://www.w3.org/2000/svg'%3E%3Cellipse cx='40' cy='40' rx='15' ry='5' fill='rgba(134,239,172,0.08)' transform='rotate(-30 40 40)'/%3E%3C/svg%3E");
}

/* 端午节 - 青色系，龙舟、粽叶、艾草元素 */
.festival-7 {
    background: linear-gradient(135deg, #064e3b 0%, #047857 40%, #065f46 100%);
    --primary-gold: #34d399;
    --theme-accent: #6ee7b7;
}
.festival-7 .bg-pattern {
    background-image: 
        radial-gradient(circle at 30% 70%, rgba(52,211,153,0.2) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(110,231,183,0.15) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 10 L35 50 L25 50 Z' fill='rgba(52,211,153,0.06)'/%3E%3C/svg%3E");
}

/* 七夕节 - 浪漫紫色，星空、鹊桥、织女牛郎 */
.festival-8 {
    background: linear-gradient(135deg, #581c87 0%, #7e22ce 40%, #6b21a8 100%);
    --primary-gold: #e879f9;
    --theme-accent: #f0abfc;
}
.festival-8 .bg-pattern {
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(232,121,249,0.25) 0%, transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(240,171,252,0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 60%, rgba(232,121,249,0.15) 0%, transparent 40%),
        url("data:image/svg+xml,%3Csvg width='120' height='120' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='20' cy='30' r='1' fill='rgba(255,255,255,0.5)'/%3E%3Ccircle cx='60' cy='20' r='1.5' fill='rgba(255,255,255,0.6)'/%3E%3Ccircle cx='100' cy='50' r='1' fill='rgba(255,255,255,0.4)'/%3E%3Ccircle cx='40' cy='80' r='1' fill='rgba(255,255,255,0.5)'/%3E%3Ccircle cx='90' cy='100' r='1.5' fill='rgba(255,255,255,0.4)'/%3E%3C/svg%3E");
}

/* 中秋节 - 金黄圆月，桂花、月饼、团圆元素 */
.festival-9 {
    background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 30%, #1e3a8a 100%);
    --primary-gold: #fbbf24;
    --theme-accent: #fcd34d;
}
.festival-9 .bg-pattern {
    background-image: 
        radial-gradient(circle at 75% 20%, rgba(251,191,36,0.4) 0%, rgba(251,191,36,0.1) 15%, transparent 30%),
        radial-gradient(circle at 20% 70%, rgba(252,211,77,0.1) 0%, transparent 40%),
        url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='50' cy='50' r='2' fill='rgba(251,191,36,0.08)'/%3E%3C/svg%3E");
}

/* 重阳节 - 暖橙色，菊花、登高、敬老元素 */
.festival-10 {
    background: linear-gradient(135deg, #78350f 0%, #b45309 40%, #92400e 100%);
    --primary-gold: #fbbf24;
    --theme-accent: #fcd34d;
}
.festival-10 .bg-pattern {
    background-image: 
        radial-gradient(circle at 80% 80%, rgba(251,191,36,0.2) 0%, transparent 50%),
        radial-gradient(circle at 20% 30%, rgba(252,211,77,0.15) 0%, transparent 40%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='8' fill='none' stroke='rgba(251,191,36,0.08)' stroke-width='2'/%3E%3Ccircle cx='30' cy='30' r='3' fill='rgba(251,191,36,0.06)'/%3E%3C/svg%3E");
}

.container {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* 背景图案 */
.bg-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255,215,0,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,215,0,0.1) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='2' fill='rgba(255,215,0,0.08)'/%3E%3C/svg%3E");
    pointer-events: none;
}

.bg-decorations {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

/* 灯笼样式 */
.lantern {
    position: absolute;
    top: -10px;
    width: 60px;
    height: 100px;
    animation: swing 3s ease-in-out infinite;
    transform-origin: top center;
    z-index: 5;
}

.lantern::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 70px;
    background: linear-gradient(to bottom, #ef4444, #b91c1c);
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(255, 100, 100, 0.5);
}

.lantern::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 15px;
    background: #ca8a04;
}

.lantern-left { left: 10px; }
.lantern-right { right: 10px; animation-delay: 0.5s; }

@media (min-width: 768px) {
    .lantern { width: 80px; height: 120px; }
    .lantern::before { width: 70px; height: 90px; }
    .lantern-left { left: 30px; }
    .lantern-right { right: 30px; }
}

/* 梅花装饰 */
.plum {
    position: absolute;
    width: 50px;
    height: 50px;
    background: radial-gradient(circle, #ff69b4 30%, transparent 30%),
                radial-gradient(circle at 50% 0%, #ff69b4 30%, transparent 30%),
                radial-gradient(circle at 0% 38%, #ff69b4 30%, transparent 30%),
                radial-gradient(circle at 100% 38%, #ff69b4 30%, transparent 30%),
                radial-gradient(circle at 20% 90%, #ff69b4 30%, transparent 30%),
                radial-gradient(circle at 80% 90%, #ff69b4 30%, transparent 30%);
    opacity: 0.5;
    pointer-events: none;
}

.plum-1 { top: 120px; left: 20px; }
.plum-2 { bottom: 100px; right: 20px; width: 70px; height: 70px; }

/* 主内容 */
.main-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 30px 16px 40px;
}

/* 详情页导航 */
.detail-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 700px;
    margin-bottom: 30px;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-gold);
    text-decoration: none;
    padding: 10px 18px;
    border: 1px solid var(--primary-gold);
    border-radius: 25px;
    transition: all 0.3s;
    font-size: 0.9rem;
    background: rgba(0,0,0,0.2);
}

.nav-btn:hover {
    background: var(--primary-gold);
    color: #1a1a1a;
}

.nav-arrows {
    display: flex;
    gap: 10px;
}

.nav-arrows .nav-btn {
    padding: 10px 14px;
}

.back-link {
    align-self: flex-start;
    color: var(--primary-gold);
    text-decoration: none;
    margin-bottom: 20px;
    padding: 8px 16px;
    border: 1px solid var(--primary-gold);
    border-radius: 20px;
    transition: all 0.3s;
}

.back-link:hover {
    background: var(--primary-gold);
    color: var(--dark-red);
}

.title {
    font-size: 2rem;
    font-weight: bold;
    background: linear-gradient(to right, var(--primary-gold), var(--theme-accent, #facc15), var(--primary-gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

@media (min-width: 768px) {
    .title { font-size: 3rem; }
}

.subtitle {
    color: rgba(254, 240, 138, 0.9);
    font-size: 1.1rem;
    margin-bottom: 30px;
    text-align: center;
}

.today-badge, .days-badge, .past-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-left: 10px;
}

.today-badge {
    background: var(--primary-gold);
    color: var(--dark-red);
}

.days-badge {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.past-badge {
    background: rgba(100,100,100,0.5);
    color: #ccc;
}

/* 倒计时 */
.countdown {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-box {
    width: 70px;
    height: 85px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border: 2px solid var(--primary-gold);
    position: relative;
    overflow: hidden;
}

.countdown-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.15), transparent);
    pointer-events: none;
}

.countdown-box.small {
    width: 55px;
    height: 65px;
}

@media (min-width: 768px) {
    .countdown-box { width: 100px; height: 120px; }
    .countdown-box.small { width: 70px; height: 85px; }
    .countdown { gap: 20px; }
}

.countdown-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-gold);
    text-shadow: 0 0 15px currentColor;
    font-variant-numeric: tabular-nums;
}

@media (min-width: 768px) {
    .countdown-number { font-size: 3rem; }
    .countdown-box.small .countdown-number { font-size: 2rem; }
}

.countdown-label {
    margin-top: 8px;
    color: var(--primary-gold);
    font-size: 0.9rem;
    font-weight: 500;
}

/* 节日卡片 */
.festival-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    padding: 24px;
    max-width: 600px;
    width: 100%;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.2);
    margin-bottom: 40px;
}

.card-title {
    color: var(--primary-gold);
    font-size: 1.1rem;
    margin: 20px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
}

.card-title:first-child {
    margin-top: 0;
}

.card-text {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    font-size: 0.95rem;
}

/* 习俗和食物标签 */
.customs-list, .foods-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.custom-tag, .food-tag {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: transform 0.2s;
}

.custom-tag:hover, .food-tag:hover {
    transform: scale(1.05);
}

.custom-tag {
    background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05));
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.food-tag {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(218, 165, 32, 0.2));
    color: var(--primary-gold);
    border: 1px solid rgba(255, 215, 0, 0.4);
}

/* 祝福语 */
.blessings-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.blessing-item {
    color: rgba(255, 255, 255, 0.9);
    padding: 12px 16px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 8px;
    border-left: 3px solid var(--primary-gold);
    font-style: italic;
}

/* 其他节日列表 */
.other-festivals {
    width: 100%;
    max-width: 800px;
    margin-top: 20px;
}

.section-title {
    color: var(--primary-gold);
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 20px;
}

.festivals-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 640px) {
    .festivals-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
    .festivals-grid { grid-template-columns: repeat(5, 1fr); }
}

.festival-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid rgba(255, 215, 0, 0.2);
    transition: all 0.3s;
}

.festival-item:hover {
    transform: translateY(-5px);
    border-color: var(--item-color, var(--primary-gold));
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.festival-item.past {
    opacity: 0.5;
}

.festival-name {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 6px;
}

.festival-date {
    color: var(--primary-gold);
    font-size: 0.85rem;
}

/* 详情页内容 */
.detail-content {
    width: 100%;
    max-width: 700px;
}

.detail-section {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.detail-section .section-title {
    text-align: left;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
}

.section-text {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.9;
    font-size: 1rem;
}

.customs-grid, .foods-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 640px) {
    .customs-grid, .foods-grid { grid-template-columns: repeat(3, 1fr); }
}

.custom-card, .food-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    transition: all 0.3s;
}

.custom-card:hover, .food-card:hover {
    background: rgba(255, 215, 0, 0.1);
    transform: translateY(-3px);
}

.custom-name, .food-name {
    color: #fff;
    font-size: 0.95rem;
}

.blessings-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.blessing-card {
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(218, 165, 32, 0.1));
    border-radius: 12px;
    border-left: 4px solid var(--primary-gold);
}

.blessing-card p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
    line-height: 1.7;
    font-style: italic;
}

/* 庆祝页面 */
.celebration {
    text-align: center;
}

.celebration-title {
    font-size: 2.5rem;
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .celebration-title { font-size: 4rem; }
}

.fu-character {
    font-size: 8rem;
    font-weight: bold;
    color: var(--primary-gold);
    text-shadow: 0 0 60px currentColor;
    animation: pulse 2s ease-in-out infinite;
    margin: 30px 0;
}

@media (min-width: 768px) {
    .fu-character { font-size: 12rem; }
}

.blessing-main {
    font-size: 1.5rem;
    color: var(--theme-accent, #fef08a);
    margin-bottom: 40px;
}

.festival-info-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    text-align: left;
}

.festival-info-card h3 {
    color: var(--primary-gold);
    margin: 20px 0 15px;
}

.festival-info-card h3:first-child {
    margin-top: 0;
}

/* 花瓣 */
.petal {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffb7c5, #ff69b4);
    opacity: 0.6;
    pointer-events: none;
}

/* 烟花 */
.firework-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: firework-explode 1s ease-out forwards;
}

/* 页脚 */
.footer-text {
    margin-top: 40px;
    color: rgba(255, 215, 0, 0.5);
    font-size: 0.9rem;
    text-align: center;
}

/* 动画 */
@keyframes swing {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

@keyframes fall {
    0% { transform: translateY(-20px) rotate(0deg); opacity: 0.8; }
    100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

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

@keyframes firework-explode {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0); opacity: 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}
