@import url('https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&family=Noto+Serif+SC:wght@300;400;600;700&display=swap');

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

:root {
    --primary: #c41e3a;
    --gold: #d4a574;
    --ink: #1a1a2e;
    --paper: #f5f0e8;
    --mist: rgba(245, 240, 232, 0.85);
}

body {
    font-family: 'Noto Serif SC', serif;
    background: var(--ink);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 动态背景 */
.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.08;
    background-image: 
        radial-gradient(circle at 20% 30%, var(--primary) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, var(--gold) 0%, transparent 50%),
        repeating-linear-gradient(45deg, transparent, transparent 30px, rgba(212,165,116,0.1) 30px, rgba(212,165,116,0.1) 60px);
    animation: breathe 8s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { opacity: 0.06; }
    50% { opacity: 0.1; }
}

/* 云纹装饰 */
.cloud-pattern {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.03;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 100'%3E%3Cpath fill='%23d4a574' d='M50,80 Q70,60 90,80 T130,80 T170,80 Q150,40 130,40 Q110,20 90,40 Q70,20 50,40 Q30,40 30,80'/%3E%3C/svg%3E");
    background-size: 300px;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 标题区域 */
header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.main-title {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: clamp(3rem, 8vw, 5rem);
    color: var(--gold);
    letter-spacing: 0.3em;
    margin-bottom: 10px;
    text-shadow: 0 0 40px rgba(212, 165, 116, 0.3);
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { text-shadow: 0 0 40px rgba(212, 165, 116, 0.3); }
    50% { text-shadow: 0 0 60px rgba(212, 165, 116, 0.5); }
}

.subtitle {
    color: rgba(245, 240, 232, 0.6);
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 0.5em;
}

/* 当前节气卡片 */
.current-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 80px;
}

.current-card {
    background: linear-gradient(145deg, var(--mist), rgba(255,255,255,0.95));
    border-radius: 20px;
    padding: 50px 60px;
    text-align: center;
    position: relative;
    box-shadow: 
        0 25px 80px rgba(0,0,0,0.4),
        0 0 0 1px rgba(212,165,116,0.2),
        inset 0 1px 0 rgba(255,255,255,0.8);
    max-width: 500px;
    width: 100%;
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
}

.current-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--gold), var(--primary), var(--gold));
    border-radius: 22px;
    z-index: -1;
    opacity: 0.6;
}

.era-label {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    margin-bottom: 20px;
    transition: background 0.3s;
}

.era-label.next-label {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
}

.era-label.past-label {
    background: #6b7280;
}

.current-solar-term {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 4.5rem;
    color: var(--ink);
    margin: 15px 0;
    line-height: 1.2;
}

.current-date {
    color: #666;
    font-size: 1rem;
    margin-bottom: 30px;
}

.divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 0 auto 30px;
}

.quote {
    color: #555;
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.8;
    opacity: 0.8;
    min-height: 3em;
}

/* 重置按钮 */
.reset-btn {
    margin-top: 20px;
    padding: 10px 25px;
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Noto Serif SC', serif;
    font-size: 0.9rem;
    transition: all 0.3s;
    opacity: 0;
    pointer-events: none;
}

.reset-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.reset-btn:hover {
    background: var(--gold);
    color: var(--ink);
}

/* 倒计时区域 */
.countdown-section {
    margin-bottom: 80px;
}

.section-title {
    text-align: center;
    color: var(--gold);
    font-size: 1.5rem;
    letter-spacing: 0.3em;
    margin-bottom: 40px;
    position: relative;
}

.section-title::before,
.section-title::after {
    content: '◈';
    margin: 0 20px;
    opacity: 0.5;
}

.countdown-card {
    background: linear-gradient(145deg, rgba(196, 30, 58, 0.1), rgba(212, 165, 116, 0.1));
    border: 1px solid rgba(212, 165, 116, 0.3);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    transition: all 0.4s ease;
}

.countdown-card.active {
    border-color: var(--gold);
    box-shadow: 0 0 30px rgba(212, 165, 116, 0.2);
}

.next-term-name {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 2.8rem;
    color: white;
    margin-bottom: 10px;
}

.next-term-date {
    color: rgba(255,255,255,0.7);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.countdown-item {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 20px 15px;
    border: 1px solid rgba(212,165,116,0.2);
}

.countdown-number {
    font-family: 'Noto Serif SC', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
}

.countdown-label {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    margin-top: 8px;
    letter-spacing: 0.1em;
}

/* 提示文字 */
.countdown-hint {
    margin-top: 20px;
    color: rgba(255,255,255,0.4);
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.countdown-hint.visible {
    opacity: 1;
}

/* 节气时间线 */
.timeline-section {
    margin-bottom: 60px;
}

.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--gold), transparent);
    transform: translateX(-50%);
}

.timeline-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.timeline-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(212,165,116,0.15);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.timeline-item:hover {
    background: rgba(255,255,255,0.08);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border-color: rgba(212,165,116,0.4);
}

.timeline-item.current {
    border-color: var(--primary) !important;
    background: rgba(196, 30, 58, 0.15) !important;
}

.timeline-item.current::after {
    content: '◆';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--primary);
    font-size: 1.2rem;
    animation: pulse 2s infinite;
}

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

.timeline-item.selected {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.15);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.timeline-item.current {
    border-color: var(--primary) !important;
    background: rgba(196, 30, 58, 0.15) !important;
    opacity: 1 !important;
}

.timeline-item.passed {
    opacity: 0.5;
}

.timeline-item.passed.current {
    opacity: 1 !important;
}

.item-index {
    font-size: 0.75rem;
    color: var(--gold);
    opacity: 0.7;
    margin-bottom: 8px;
}

.item-name {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.6rem;
    color: white;
    margin-bottom: 5px;
}

.item-date {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}

/* 装饰元素 */
.corner-decoration {
    position: fixed;
    width: 150px;
    height: 150px;
    pointer-events: none;
    opacity: 0.15;
}

.corner-decoration.top-left {
    top: 20px;
    left: 20px;
    border-top: 2px solid var(--gold);
    border-left: 2px solid var(--gold);
}

.corner-decoration.top-right {
    top: 20px;
    right: 20px;
    border-top: 2px solid var(--gold);
    border-right: 2px solid var(--gold);
}

.corner-decoration.bottom-left {
    bottom: 20px;
    left: 20px;
    border-bottom: 2px solid var(--gold);
    border-left: 2px solid var(--gold);
}

.corner-decoration.bottom-right {
    bottom: 20px;
    right: 20px;
    border-bottom: 2px solid var(--gold);
    border-right: 2px solid var(--gold);
}

/* 页脚 */
footer {
    text-align: center;
    padding: 40px 0;
    color: rgba(255,255,255,0.4);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
}

        /* 二十四节气 - 四季色彩主题 */
        
        /* 春季 (6个节气) */
        .season-spring .timeline-item {
            border-color: rgba(76, 175, 80, 0.3);
        }
        .season-spring .timeline-item:hover {
            border-color: rgba(76, 175, 80, 0.7);
            box-shadow: 0 0 20px rgba(76, 175, 80, 0.2);
        }
        .season-spring .timeline-item.current {
            border-color: #4CAF50;
            background: rgba(76, 175, 80, 0.15);
        }
        .season-spring .item-index,
        .season-spring .season-label {
            color: #81C784;
        }
        .season-spring .item-name {
            color: #A5D6A7;
        }
        
        /* 夏季 (6个节气) */
        .season-summer .timeline-item {
            border-color: rgba(244, 67, 54, 0.3);
        }
        .season-summer .timeline-item:hover {
            border-color: rgba(244, 67, 54, 0.7);
            box-shadow: 0 0 20px rgba(244, 67, 54, 0.2);
        }
        .season-summer .timeline-item.current {
            border-color: #F44336;
            background: rgba(244, 67, 54, 0.15);
        }
        .season-summer .item-index,
        .season-summer .season-label {
            color: #EF5350;
        }
        .season-summer .item-name {
            color: #EF9A9A;
        }
        
        /* 秋季 (6个节气) */
        .season-autumn .timeline-item {
            border-color: rgba(255, 152, 0, 0.3);
        }
        .season-autumn .timeline-item:hover {
            border-color: rgba(255, 152, 0, 0.7);
            box-shadow: 0 0 20px rgba(255, 152, 0, 0.2);
        }
        .season-autumn .timeline-item.current {
            border-color: #FF9800;
            background: rgba(255, 152, 0, 0.15);
        }
        .season-autumn .item-index,
        .season-autumn .season-label {
            color: #FFB74D;
        }
        .season-autumn .item-name {
            color: #FFCC80;
        }
        
        /* 冬季 (6个节气) */
        .season-winter .timeline-item {
            border-color: rgba(33, 150, 243, 0.3);
        }
        .season-winter .timeline-item:hover {
            border-color: rgba(33, 150, 243, 0.7);
            box-shadow: 0 0 20px rgba(33, 150, 243, 0.2);
        }
        .season-winter .timeline-item.current {
            border-color: #2196F3;
            background: rgba(33, 150, 243, 0.15);
        }
        .season-winter .item-index,
        .season-winter .season-label {
            color: #64B5F6;
        }
        .season-winter .item-name {
            color: #90CAF9;
        }
        
        /* 响应式设计 */
@media (max-width: 900px) {
    .timeline-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .timeline::before {
        display: none;
    }
}

@media (max-width: 700px) {
    .countdown-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .timeline-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .current-card {
        padding: 35px 25px;
    }
    
    .current-solar-term {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .timeline-grid {
        grid-template-columns: 1fr;
    }
    
    .main-title {
        letter-spacing: 0.15em;
    }
    
    .section-title::before,
    .section-title::after {
        display: none;
    }
}
