/* ========================================
   Time in Beijing - Modern & Elegant Style
   ======================================== */

:root {
    /* Color Palette - Refined Dark Theme */
    --bg-primary: #0a0f1a;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.85);
    --bg-glass: rgba(255, 255, 255, 0.03);
    
    --accent-gold: #d4a574;
    --accent-gold-light: #e8c9a8;
    --accent-copper: #c9a07a;
    --accent-rose: #e8b4b8;
    
    --text-primary: #f8f4ef;
    --text-secondary: #a8a29e;
    --text-muted: #6b7280;
    
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(212, 165, 116, 0.3);
    
    --shadow-soft: 0 4px 30px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 60px rgba(212, 165, 116, 0.1);
}

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

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    padding: 40px 20px;
    color: var(--text-primary);
    line-height: 1.6;
    
    /* Elegant background pattern */
    background-image: 
        radial-gradient(ellipse at 20% 0%, rgba(212, 165, 116, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(212, 165, 116, 0.05) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-primary) 0%, #0d1320 100%);
    background-attachment: fixed;
}

/* Elegant noise texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.015;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    z-index: 1000;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
}

/* ========================================
   Typography
   ======================================== */

h1, h2, .section-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 500;
    letter-spacing: 0.02em;
}

header {
    text-align: center;
    margin-bottom: 50px;
    padding: 30px 0;
}

h1 {
    font-size: 3em;
    color: var(--text-primary);
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.05em;
}

/* ========================================
   Main Beijing Section
   ======================================== */

.beijing-main-section {
    background: var(--bg-card);
    padding: 40px 50px;
    border-radius: 24px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft), var(--shadow-glow);
    margin-bottom: 40px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

/* 故宫背景图片 */
.beijing-main-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('https://images.unsplash.com/photo-1547981609-4b6bfe67ca0b?ixlib=rb-4.0.3&auto=format&fit=crop&w=2000&q=80');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(10px);
    -webkit-filter: blur(10px);
    z-index: -1;
    opacity: 0.35;
}

/* 确保内容在背景之上 */
.beijing-main-section > * {
    position: relative;
    z-index: 1;
}

/* Decorative top line */
.beijing-main-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
}

.section-title {
    font-size: 2.4em;
    color: var(--text-primary);
    margin-bottom: 30px;
    text-align: center;
    font-weight: 400;
    letter-spacing: 0.08em;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 1px;
    background: var(--accent-gold);
    margin: 20px auto 0;
    opacity: 0.6;
}

.beijing-content-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    align-items: stretch;
}

/* ========================================
   Time Display
   ======================================== */

.time-section {
    text-align: center;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.main-time {
    margin-top: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.time-display {
    font-family: 'JetBrains Mono', 'SF Mono', monospace;
    font-size: 4.5em;
    font-weight: 300;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.08em;
    text-shadow: 0 0 80px rgba(212, 165, 116, 0.15);
    position: relative;
}

.date-display {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.6em;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 400;
    letter-spacing: 0.04em;
    font-style: italic;
}

.timezone {
    font-size: 0.9em;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 20px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ========================================
   Sun Info
   ======================================== */

.sun-info-container {
    margin-top: 25px;
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.sunrise-info,
.sunset-info {
    padding: 12px 20px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.sunrise-info {
    border-color: rgba(255, 183, 77, 0.15);
}

.sunset-info {
    border-color: rgba(255, 138, 101, 0.15);
}

.sunrise-info:hover,
.sunset-info:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.sunrise-label,
.sunset-label {
    font-size: 0.9em;
    font-weight: 500;
    display: flex;
    align-items: center;
    letter-spacing: 0.04em;
}

.sunrise-label {
    color: #ffb74d;
}

.sunset-label {
    color: #ff8a65;
}

.sunrise-label::before {
    content: '☀';
    margin-right: 10px;
    font-size: 1.3em;
    opacity: 0.9;
}

.sunset-label::before {
    content: '☾';
    margin-right: 10px;
    font-size: 1.3em;
    opacity: 0.9;
}

.sunrise-time,
.sunset-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.3em;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
}

.sunrise-time {
    color: #ffe082;
}

.sunset-time {
    color: #ffab91;
}

.timezone-note {
    width: 100%;
    margin-top: 16px;
    padding: 10px 16px;
    background: var(--bg-glass);
    border-left: 2px solid var(--accent-gold);
    border-radius: 0 8px 8px 0;
    font-size: 0.75em;
    color: var(--text-muted);
    line-height: 1.5;
    text-align: left;
    font-style: italic;
    flex-shrink: 0;
}

.timezone-note::before {
    content: '';
    display: none;
}

/* ========================================
   Weather Information
   ======================================== */

.weather-container {
    margin-top: 10;
    width: 100%;
}

.weather-info {
    background: var(--bg-glass);
    padding: 24px 28px;
    border-radius: 18px;
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    top: 10px;
}

.weather-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.weather-info:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-accent);
}

.weather-info:hover::before {
    opacity: 1;
}

.weather-icon {
    font-size: 3.5em;
    line-height: 1;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.weather-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.weather-temp {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.5em;
    font-weight: 300;
    color: var(--accent-gold-light);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.weather-desc {
    font-size: 1.1em;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.02em;
}

.weather-extra {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    font-size: 0.9em;
    color: var(--text-muted);
}

.weather-humidity,
.weather-wind {
    font-weight: 400;
    letter-spacing: 0.02em;
}

.weather-separator {
    color: var(--text-muted);
    opacity: 0.5;
}

/* ========================================
   Map Section
   ======================================== */

.map-section {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.map-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
    justify-content: space-between;
}

#beijingMap {
    width: 100%;
    flex: 1;
    min-height: 280px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-subtle);
    filter: saturate(0.85) brightness(0.95);
    transition: filter 0.4s ease;
}

#beijingMap:hover {
    filter: saturate(1) brightness(1);
}

.location-info {
    background: var(--bg-glass);
    padding: 16px 24px;
    border-radius: 14px;
    text-align: center;
    border: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.location-info p {
    margin: 6px 0;
    color: var(--text-secondary);
    font-size: 0.9em;
    letter-spacing: 0.02em;
}

.location-info strong {
    font-family: 'Cormorant Garamond', Georgia, serif;
    color: var(--accent-gold-light);
    font-size: 1.3em;
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    letter-spacing: 0.04em;
}

/* ========================================
   World Cities Section
   ======================================== */

.world-cities {
    background: var(--bg-card);
    padding: 60px 50px;
    border-radius: 24px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
}

.world-cities::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
}

.world-cities h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2.4em;
    color: var(--text-primary);
    margin-bottom: 50px;
    text-align: center;
    font-weight: 400;
    letter-spacing: 0.06em;
}

.world-cities h2::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: var(--accent-gold);
    margin: 18px auto 0;
    opacity: 0.5;
}

.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}

/* ========================================
   City Cards
   ======================================== */

.city-card {
    background: var(--bg-glass);
    padding: 35px 30px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-subtle);
    position: relative;
    overflow: hidden;
}

.city-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.city-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 40px rgba(212, 165, 116, 0.05);
    border-color: var(--border-accent);
    background: rgba(255, 255, 255, 0.05);
}

.city-card:hover::before {
    opacity: 1;
}

.city-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.7em;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 18px;
    letter-spacing: 0.04em;
}

.city-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 3em;
    font-weight: 300;
    color: var(--accent-gold-light);
    margin-bottom: 14px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.06em;
    line-height: 1.1;
}

.city-date {
    font-size: 0.95em;
    color: var(--text-secondary);
    margin-bottom: 14px;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.city-timezone {
    font-size: 0.75em;
    color: var(--text-muted);
    font-weight: 500;
    padding: 8px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: 30px;
    display: inline-block;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.city-card:hover .city-timezone {
    border-color: var(--border-accent);
    color: var(--accent-gold);
}

/* ========================================
   Animations
   ======================================== */

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

.beijing-main-section {
    animation: fadeInUp 0.8s ease-out;
}

.world-cities {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.city-card {
    animation: fadeInUp 0.6s ease-out both;
}

.city-card:nth-child(1) { animation-delay: 0.1s; }
.city-card:nth-child(2) { animation-delay: 0.15s; }
.city-card:nth-child(3) { animation-delay: 0.2s; }
.city-card:nth-child(4) { animation-delay: 0.25s; }
.city-card:nth-child(5) { animation-delay: 0.3s; }
.city-card:nth-child(6) { animation-delay: 0.35s; }
.city-card:nth-child(7) { animation-delay: 0.4s; }
.city-card:nth-child(8) { animation-delay: 0.45s; }

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 1024px) {
    .beijing-content-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        align-items: start;
    }
    
    .beijing-main-section {
        padding: 50px 40px;
    }
    
    #beijingMap {
        flex: none;
        height: 350px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 20px 15px;
    }
    
    h1 {
        font-size: 2.2em;
    }
    
    .section-title {
        font-size: 2.2em;
        margin-bottom: 35px;
    }
    
    .beijing-main-section,
    .world-cities {
        padding: 40px 25px;
        border-radius: 20px;
    }
    
    .time-display {
        font-size: 3.5em;
        letter-spacing: 0.04em;
    }
    
    .date-display {
        font-size: 1.3em;
    }
    
    .sun-info-container {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .sunrise-info,
    .sunset-info {
        padding: 10px 16px;
        gap: 8px;
    }
    
    .sunrise-label,
    .sunset-label {
        font-size: 0.8em;
    }
    
    .sunrise-time,
    .sunset-time {
        font-size: 1.1em;
    }
    
    .timezone-note {
        font-size: 0.7em;
        padding: 8px 12px;
        margin-top: 16px;
    }
    
    .weather-container {
        margin-top: 5px;
    }
    
    .weather-info {
        padding: 20px 24px;
        gap: 18px;
    }
    
    .weather-icon {
        font-size: 3em;
    }
    
    .weather-temp {
        font-size: 2.2em;
    }
    
    .weather-desc {
        font-size: 1em;
    }
    
    .weather-extra {
        font-size: 0.85em;
        flex-wrap: wrap;
    }
    
    .beijing-content-grid {
        gap: 40px;
    }
    
    #beijingMap {
        flex: none;
        height: 300px;
    }
    
    .location-info {
        padding: 18px 20px;
    }
    
    .location-info p {
        font-size: 0.9em;
    }
    
    .location-info strong {
        font-size: 1.25em;
    }
    
    .world-cities h2 {
        font-size: 1.8em;
        margin-bottom: 35px;
    }
    
    .cities-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .city-card {
        padding: 28px 24px;
    }
    
    .city-name {
        font-size: 1.4em;
    }
    
    .city-time {
        font-size: 2.4em;
        letter-spacing: 0.04em;
    }
    
    .city-card:hover {
        transform: translateY(-5px);
    }
}

@media (max-width: 480px) {
    .time-display {
        font-size: 2.8em;
    }
    
    .section-title {
        font-size: 1.8em;
    }
    
    .beijing-main-section,
    .world-cities {
        padding: 30px 20px;
    }
    
    .weather-info {
        padding: 18px 20px;
        gap: 16px;
        flex-direction: column;
        text-align: center;
    }
    
    .weather-icon {
        font-size: 2.8em;
    }
    
    .weather-temp {
        font-size: 2em;
    }
    
    .weather-desc {
        font-size: 0.95em;
    }
    
    .weather-extra {
        justify-content: center;
        font-size: 0.8em;
    }
}

/* ========================================
   Scrollbar Styling
   ======================================== */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
    }

::-webkit-scrollbar-thumb {
    background: var(--accent-gold);
    border-radius: 4px;
    opacity: 0.5;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-gold-light);
}

/* ========================================
   Selection Styling
   ======================================== */

::selection {
    background: rgba(212, 165, 116, 0.3);
    color: var(--text-primary);
}
