* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Dark Mode (Default) */
    --bg-gradient: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #2d1b3d 100%);
    --text-color: #fff;
    --header-bg: rgba(255, 255, 255, 0.05);
    --header-border: rgba(255, 255, 255, 0.1);
    --header-title: #ff6b6b;
    --header-subtitle: #ccc;
    --card-bg: rgba(255, 255, 255, 0.1);
    --card-border: rgba(255, 255, 255, 0.2);
    --card-hover-shadow: rgba(255, 107, 107, 0.3);
    --accent-color: #4ecdc4;
    --accent-shadow: rgba(78, 205, 196, 0.5);
    --time-color: #ffd700;
    --time-shadow: rgba(255, 215, 0, 0.5);
    --destination-color: #4ecdc4;
    --message-color: #ffd700;
    --globe-bg: rgba(20, 30, 50, 0.8);
    --globe-border: rgba(255, 215, 0, 0.3);
}

body.christmas-theme {
    /* Christmas Theme - Festive and Vibrant */
    --bg-gradient: linear-gradient(135deg, #1a0d0d 0%, #0d1a0d 50%, #1a1a0d 100%);
    --text-color: #fff8e7;
    --header-bg: linear-gradient(135deg, rgba(220, 20, 60, 0.3) 0%, rgba(34, 139, 34, 0.3) 100%);
    --header-border: rgba(255, 215, 0, 0.6);
    --header-title: #ff1744;
    --header-subtitle: #ffeb3b;
    --card-bg: linear-gradient(135deg, rgba(220, 20, 60, 0.15) 0%, rgba(34, 139, 34, 0.15) 100%);
    --card-border: 2px solid rgba(255, 215, 0, 0.5);
    --card-hover-shadow: 0 10px 30px rgba(255, 215, 0, 0.5);
    --accent-color: #4caf50;
    --accent-shadow: rgba(76, 175, 80, 0.8);
    --time-color: #ffd700;
    --time-shadow: rgba(255, 215, 0, 0.8);
    --destination-color: #4caf50;
    --message-color: #ffeb3b;
    --globe-bg: rgba(13, 26, 13, 0.9);
    --globe-border: 3px solid rgba(255, 215, 0, 0.6);
}

body {
    background: var(--bg-gradient);
    color: var(--text-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.5s ease, color 0.5s ease;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--header-bg);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 2px solid var(--header-border);
    transition: background 0.5s ease, border-color 0.5s ease;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

body.christmas-theme .header {
    background: var(--header-bg);
    border: 3px solid var(--header-border);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5), inset 0 0 20px rgba(255, 215, 0, 0.1);
    position: relative;
}

body.christmas-theme .header::before {
    content: '❄️';
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 1.5rem;
    opacity: 0.6;
    animation: twinkle 2s ease-in-out infinite;
}

body.christmas-theme .header::after {
    content: '❄️';
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 1.5rem;
    opacity: 0.6;
    animation: twinkle 2s ease-in-out infinite 1s;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.2); }
}

.header h1 {
    color: var(--header-title);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    font-size: 3.5rem;
    margin-bottom: 10px;
    animation: glow 2s ease-in-out infinite alternate;
    transition: color 0.5s ease;
}

@keyframes glow {
    from { text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3), 0 0 20px rgba(196, 30, 58, 0.4); }
    to { text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3), 0 0 30px rgba(196, 30, 58, 0.6); }
}

body.christmas-theme .header h1 {
    animation: glowChristmas 2s ease-in-out infinite alternate;
}

@keyframes glowChristmas {
    from { text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2), 0 0 20px rgba(196, 30, 58, 0.5); }
    to { text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2), 0 0 30px rgba(196, 30, 58, 0.7); }
}

.header .lead {
    color: var(--header-subtitle);
    font-size: 1.2rem;
    transition: color 0.5s ease;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.5s ease, border-color 0.5s ease;
}

body.christmas-theme .stat-card {
    background: var(--card-bg);
    border: var(--card-border);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
    position: relative;
    overflow: hidden;
}

body.christmas-theme .stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 215, 0, 0.05) 10px,
        rgba(255, 215, 0, 0.05) 20px
    );
    animation: shimmer 3s linear infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%); }
    100% { transform: translateX(100%) translateY(100%); }
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--card-hover-shadow);
}

body.christmas-theme .stat-card:hover {
    box-shadow: var(--card-hover-shadow), 0 0 40px rgba(255, 215, 0, 0.4);
    border-color: rgba(255, 215, 0, 0.8);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 8px;
    text-shadow: 0 0 10px var(--accent-shadow);
    transition: color 0.5s ease;
}

/* Destination panel - full width, similar to time-display but not as tall */
.destination-panel {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px 30px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    margin-bottom: 25px;
    margin-top: 10px;
    transition: background 0.5s ease, border-color 0.5s ease;
}

body.christmas-theme .destination-panel {
    background: var(--card-bg);
    border: var(--card-border);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.3);
    position: relative;
}

body.christmas-theme .destination-panel::before,
body.christmas-theme .destination-panel::after {
    content: '🎁';
    position: absolute;
    top: 15px;
    font-size: 1.2rem;
    opacity: 0.7;
}

body.christmas-theme .destination-panel::before {
    left: 20px;
}

body.christmas-theme .destination-panel::after {
    right: 20px;
}

.destination-label {
    font-size: 0.9rem;
    color: var(--header-subtitle);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    transition: color 0.5s ease;
}

.destination-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.destination-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--destination-color);
    text-shadow: 0 0 10px var(--accent-shadow);
    flex: 1;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.5s ease;
}

.destination-countdown {
    font-size: 1.8rem;
    color: var(--destination-color);
    font-weight: 600;
    text-shadow: 0 0 8px var(--accent-shadow);
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    transition: color 0.5s ease;
}

.destination-message {
    font-size: 1rem;
    color: var(--message-color);
    margin-top: 15px;
    text-align: center;
    font-style: italic;
    text-shadow: 0 0 10px var(--time-shadow);
    padding: 10px;
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--card-border);
    min-height: 1.5em;
    transition: color 0.5s ease, background 0.5s ease, border-color 0.5s ease;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--header-subtitle);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.5s ease;
}

.globe-container {
    position: relative;
    background: var(--globe-bg);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
    min-height: 600px;
    border: 2px solid var(--globe-border);
    box-shadow: 0 0 40px var(--globe-border);
    transition: background 0.5s ease, border-color 0.5s ease;
}

body.christmas-theme .globe-container {
    border: var(--globe-border);
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.5), inset 0 0 30px rgba(255, 215, 0, 0.1);
    background: var(--globe-bg);
    position: relative;
}

body.christmas-theme .globe-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 3px;
    background: linear-gradient(45deg, #ff1744, #4caf50, #ffd700, #ff1744);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.6;
}

#globe3d {
    width: 100%;
    height: 600px;
    border-radius: 15px;
    overflow: hidden;
}

.globe-controls {
    position: absolute;
    top: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

.control-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

body.christmas-theme .control-btn {
    background: rgba(220, 20, 60, 0.3);
    border: 2px solid rgba(255, 215, 0, 0.6);
    color: #ffeb3b;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

body.christmas-theme .control-btn:hover {
    background: rgba(220, 20, 60, 0.5);
    border-color: rgba(255, 215, 0, 0.9);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    transform: scale(1.05);
}

.control-btn.active {
    background: rgba(255, 107, 107, 0.5);
    border-color: #ff6b6b;
}

body.christmas-theme .control-btn.active {
    background: rgba(76, 175, 80, 0.5);
    border-color: #4caf50;
    box-shadow: 0 0 25px rgba(76, 175, 80, 0.6);
}

.info-panel {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    margin-bottom: 20px;
    transition: background 0.5s ease, border-color 0.5s ease;
}

body.christmas-theme .info-panel {
    background: var(--card-bg);
    border: var(--card-border);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.3);
    position: relative;
}

body.christmas-theme .info-panel::before {
    content: '🎄';
    position: absolute;
    top: 20px;
    left: 30px;
    font-size: 1.5rem;
    opacity: 0.6;
}

body.christmas-theme .info-panel::after {
    content: '🎄';
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 1.5rem;
    opacity: 0.6;
}

.time-display {
    text-align: center;
    margin-bottom: 30px;
}

.time-label {
    font-size: 1rem;
    color: var(--header-subtitle);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.5s ease;
}

.time-value {
    font-size: 3rem;
    font-weight: bold;
    color: var(--time-color);
    text-shadow: 0 0 20px var(--time-shadow);
    font-family: 'Courier New', monospace;
    transition: color 0.5s ease;
}

.progress-container {
    text-align: center;
}

.progress-label {
    font-size: 1rem;
    color: #ccc;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.progress-bar {
    width: 100%;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    position: relative;
    user-select: none;
}

.progress-bar:hover {
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #ffd700);
    border-radius: 20px;
    transition: width 0.5s ease;
    width: 0%;
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.5);
}

body.christmas-theme .progress-fill {
    background: linear-gradient(90deg, #ff1744, #4caf50, #ffd700, #ff1744);
    background-size: 200% 100%;
    animation: progressShimmer 3s linear infinite;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.7), inset 0 0 15px rgba(255, 215, 0, 0.3);
}

@keyframes progressShimmer {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

.progress-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4ecdc4;
}

.location-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(20, 30, 50, 0.95);
    border: 2px solid rgba(255, 215, 0, 0.6);
    border-radius: 15px;
    padding: 25px;
    min-width: 350px;
    max-width: 500px;
    z-index: 1000;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: popupSlide 0.3s ease;
}

@keyframes popupSlide {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.popup-header h3 {
    color: #ffd700;
    font-size: 1.5rem;
    margin: 0;
}

.popup-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 30px;
    border-radius: 50%;
    transition: background 0.2s;
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.popup-content {
    color: #fff;
}

.popup-fact {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #ccc;
    font-style: italic;
}

.popup-time {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.popup-label {
    color: #ccc;
}

.popup-value {
    color: #4ecdc4;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Snowflake animation */
.snowflake {
    position: fixed;
    top: -10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1em;
    font-family: Arial;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    animation: snowfall linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes snowfall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2.5rem;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .destination-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .destination-name {
        text-align: center;
        width: 100%;
    }
    
    .destination-countdown {
        text-align: center;
        width: 100%;
    }
    
    .theme-toggle-container {
        margin-top: 20px;
    }
    
    .globe-controls {
        position: relative;
        top: auto;
        right: auto;
        flex-direction: row;
        justify-content: center;
        margin-top: 15px;
    }
    
    #globe3d {
        height: 400px;
    }
    
    .time-value {
        font-size: 2rem;
    }
}

/* Theme Toggle Button */
.theme-toggle-container {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 20px;
}

.theme-toggle-btn {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 50px;
    padding: 15px 30px;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.theme-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--card-hover-shadow);
    border-color: var(--accent-color);
}

.theme-toggle-btn:active {
    transform: translateY(0);
}

.theme-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.theme-toggle-btn:hover .theme-icon {
    transform: rotate(15deg) scale(1.1);
}

.theme-text {
    transition: color 0.3s ease;
}

