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

:root {
    --christmas-red: #C41E3A;
    --christmas-red-dark: #8B0000;
    --forest-green: #228B22;
    --gold: #FFD700;
    --snow-white: #FFFAFA;
    --midnight-blue: #191970;
    --deep-purple: #1a0a2e;
    --frost: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Fredoka', sans-serif;
    background: linear-gradient(135deg, var(--midnight-blue) 0%, var(--deep-purple) 50%, #0d0221 100%);
    min-height: 100vh;
    color: var(--snow-white);
    overflow-x: hidden;
}

.app {
    position: relative;
    min-height: 100vh;
}

/* Snow Animation */
.snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -20px;
    animation: fall linear infinite;
    color: white;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

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

/* Stars */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 2s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Header */
.header {
    position: relative;
    z-index: 10;
    padding: 2rem 1rem;
    text-align: center;
    background: linear-gradient(180deg, rgba(196, 30, 58, 0.3) 0%, transparent 100%);
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.title {
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 700;
    color: var(--snow-white);
    text-shadow: 0 0 20px var(--christmas-red), 0 0 40px var(--gold);
    margin-bottom: 0.5rem;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 20px var(--christmas-red), 0 0 40px var(--gold); }
    to { text-shadow: 0 0 30px var(--christmas-red), 0 0 60px var(--gold), 0 0 80px var(--christmas-red); }
}

.subtitle {
    font-size: 1.2rem;
    color: var(--gold);
    font-weight: 400;
}

.sound-toggle {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--frost);
    border: 2px solid var(--gold);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.sound-toggle:hover {
    transform: scale(1.1);
    background: rgba(255, 215, 0, 0.2);
}

.sound-toggle.enabled {
    animation: ring 0.5s ease;
}

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

/* Main Content */
.main-content {
    position: relative;
    z-index: 10;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Dashboard */
.dashboard {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr 1fr;
    }
}

/* Location Card */
.location-card {
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.3), rgba(34, 139, 34, 0.2));
    backdrop-filter: blur(20px);
    border: 2px solid var(--gold);
    border-radius: 24px;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.location-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--christmas-red), var(--gold), var(--forest-green));
}

.location-header {
    position: relative;
    margin-bottom: 1rem;
}

.sleigh-icon {
    font-size: 4rem;
    cursor: pointer;
    display: inline-block;
    transition: transform 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

.sleigh-icon:hover {
    transform: scale(1.2);
}

.sleigh-icon.ho-ho-ho {
    animation: shake 0.5s ease;
}

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

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

.ho-ho-text {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--christmas-red);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    animation: popup 0.3s ease;
    white-space: nowrap;
}

@keyframes popup {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.location-info {
    margin-bottom: 1.5rem;
}

.location-flag {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.5rem;
}

.location-name {
    font-size: 2rem;
    font-weight: 600;
    color: var(--snow-white);
    margin-bottom: 0.25rem;
}

.location-country {
    font-size: 1.1rem;
    color: var(--gold);
}

.presents-counter {
    background: rgba(255, 215, 0, 0.15);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.presents-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.presents-count {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold);
    display: block;
    font-family: 'Crimson Pro', serif;
}

.presents-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.santa-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(34, 139, 34, 0.3);
    border-radius: 12px;
}

.status-dot {
    width: 12px;
    height: 12px;
    background: #00ff00;
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

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

.status-text {
    font-weight: 500;
}

/* Flight Stats */
.flight-stats {
    background: linear-gradient(135deg, rgba(25, 25, 112, 0.5), rgba(34, 139, 34, 0.2));
    backdrop-filter: blur(20px);
    border: 2px solid var(--forest-green);
    border-radius: 24px;
    padding: 1.5rem;
}

.stats-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

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

.stat-item {
    background: var(--frost);
    border-radius: 16px;
    padding: 1rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    display: block;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gold);
    display: block;
}

/* Map Section */
.map-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.world-map {
    background: linear-gradient(135deg, rgba(25, 25, 112, 0.6), rgba(0, 0, 50, 0.8));
    border: 2px solid var(--gold);
    border-radius: 24px;
    padding: 1rem;
    overflow: hidden;
}

.map-background {
    position: relative;
    width: 100%;
    padding-bottom: 50%;
    background: 
        radial-gradient(circle at 30% 40%, rgba(34, 139, 34, 0.3) 0%, transparent 30%),
        radial-gradient(circle at 70% 60%, rgba(34, 139, 34, 0.2) 0%, transparent 25%),
        radial-gradient(circle at 50% 30%, rgba(34, 139, 34, 0.25) 0%, transparent 35%),
        linear-gradient(180deg, rgba(0, 50, 100, 0.3) 0%, rgba(0, 20, 50, 0.5) 100%);
    border-radius: 16px;
}

.map-overlay {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 50'%3E%3Cpath d='M10,25 Q20,20 30,25 T50,25 T70,22 T90,25' stroke='%23228B22' fill='none' stroke-width='0.5' opacity='0.3'/%3E%3C/svg%3E");
    opacity: 0.5;
}

.map-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    z-index: 5;
    transition: all 0.3s ease;
}

.map-marker.current {
    font-size: 2.5rem;
    z-index: 10;
    animation: float 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px var(--christmas-red));
}

.map-marker.visited {
    font-size: 1rem;
    opacity: 0.8;
}

.map-marker.next {
    animation: glow-marker 1.5s ease-in-out infinite;
}

@keyframes glow-marker {
    0%, 100% { filter: drop-shadow(0 0 5px var(--gold)); }
    50% { filter: drop-shadow(0 0 15px var(--gold)); }
}

.flight-path {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
}

.path-line {
    fill: none;
    stroke: var(--gold);
    stroke-width: 0.3;
    stroke-dasharray: 2, 2;
    opacity: 0.6;
}

/* Timeline */
.timeline-section {
    margin-bottom: 2rem;
}

.timeline-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.timeline-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0.5rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.timeline-scroll::-webkit-scrollbar {
    height: 8px;
}

.timeline-scroll::-webkit-scrollbar-track {
    background: var(--frost);
    border-radius: 10px;
}

.timeline-scroll::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 10px;
}

.timeline-item {
    flex-shrink: 0;
    background: var(--frost);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1rem;
    min-width: 140px;
    text-align: center;
    scroll-snap-align: start;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.timeline-item.visited {
    border-color: var(--forest-green);
    opacity: 0.7;
}

.timeline-item.next {
    border-color: var(--gold);
    background: rgba(255, 215, 0, 0.15);
    animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(255, 215, 0, 0); }
}

.timeline-flag {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.timeline-name {
    font-weight: 600;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.25rem;
}

.timeline-status {
    font-size: 0.75rem;
    color: var(--gold);
}

/* Countdown */
.countdown-section {
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.4), rgba(139, 0, 0, 0.3));
    backdrop-filter: blur(20px);
    border: 2px solid var(--christmas-red);
    border-radius: 24px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.countdown-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.countdown-grid {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.countdown-item {
    background: var(--frost);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    min-width: 80px;
}

.countdown-value {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Crimson Pro', serif;
    color: var(--gold);
    display: block;
}

.countdown-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

/* Fun Facts Ticker */
.fun-facts-ticker {
    background: linear-gradient(90deg, var(--christmas-red), var(--forest-green));
    padding: 1rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    overflow: hidden;
}

.ticker-label {
    font-weight: 600;
    white-space: nowrap;
}

.ticker-text {
    animation: slideIn 0.5s ease;
}

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

/* Footer */
.footer {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.3));
}

.footer-gps {
    font-size: 0.9rem;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.footer-message {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.footer-link {
    display: inline-block;
    background: var(--christmas-red);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--gold);
}

.footer-link:hover {
    background: var(--gold);
    color: var(--christmas-red);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.3);
}

/* Mobile optimizations */
@media (max-width: 480px) {
    .header {
        padding: 1.5rem 1rem;
    }
    
    .sound-toggle {
        position: relative;
        margin-top: 1rem;
    }
    
    .location-card {
        padding: 1.5rem;
    }
    
    .sleigh-icon {
        font-size: 3rem;
    }
    
    .location-name {
        font-size: 1.5rem;
    }
    
    .presents-count {
        font-size: 2rem;
    }
    
    .countdown-value {
        font-size: 2rem;
    }
    
    .countdown-item {
        min-width: 70px;
        padding: 0.75rem 1rem;
    }
}