:root {
    --bg-dark: #0f172a;
    --bg-light: #1e293b;
    --primary-red: #ef4444;
    --primary-gold: #fbbf24;
    --text-white: #f8fafc;
    --text-dim: #94a3b8;
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.36);
}

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

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-white);
    background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    /* Ensure z-index works */
}

/* Snow Canvas */
#snow-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.app-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    padding: 6rem 2rem 2rem;
    margin: 0 auto;
    /* Safe centering */
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Header */
.glass-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo .icon {
    font-size: 2.5rem;
}

.logo h1 {
    font-family: 'Mountains of Christmas', cursive;
    font-weight: 700;
    font-size: 2rem;
    line-height: 1.1;
    color: var(--primary-gold);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.logo p {
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--text-dim);
    text-transform: uppercase;
    font-weight: 600;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.8rem;
    color: #fca5a5;
    animation: pulse-border 2s infinite;
}

.live-indicator .dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary-red);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-red);
    animation: blink 1s infinite alternate;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 220px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.card-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.card h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Status Card Specifics */
.status-card h2 {
    color: var(--primary-gold);
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin: 1rem 0;
    /* overflow: hidden; Removed to allow emoji to pop out */
    position: relative;
    /* Ensure z-indexing works if needed */
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-gold), #fff);
    width: 0%;
    transition: width 1s linear;
    border-radius: 3px;
    position: relative;
}

.progress-bar::after {
    content: '🦌 🎅';
    position: absolute;
    right: -20px;
    top: -18px;
    font-size: 2rem;
    transform: scaleX(-1);
    /* Flip to make reindeer face right and lead */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    z-index: 20;
    line-height: 1;
    white-space: nowrap;
}

/* Next Destination */
.countdown-box {
    margin-top: auto;
    text-align: right;
}

#countdown {
    font-family: 'Monospace', 'Courier New', monospace;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-red);
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

/* Presents Card */
.presents-card {
    position: relative;
    overflow: hidden;
}

.counter {
    font-size: 2.5rem;
    background: linear-gradient(to bottom, #d1faff, #fff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gift-icon {
    position: absolute;
    bottom: -10px;
    right: 10px;
    font-size: 6rem;
    opacity: 0.1;
    transform: rotate(20deg);
}

/* Visual Placeholder */
.visual-placeholder {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 24px;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px dashed var(--glass-border);
}

.dynamic-message {
    font-family: 'Mountains of Christmas', cursive;
    font-size: 1.5rem;
    color: var(--text-dim);
    text-align: center;
}

/* Airdrop Section */
.airdrop-section {
    width: 100%;
}

.airdrop-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: auto;
}

.airdrop-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.airdrop-card h2 {
    color: var(--primary-gold);
    margin-bottom: 1rem;
}

.airdrop-description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-white);
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.contract-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.contract-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    font-weight: 700;
}

.contract-address {
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    color: var(--primary-gold);
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    word-break: break-all;
}

@keyframes blink {
    from {
        opacity: 1;
    }

    to {
        opacity: 0.4;
    }
}

@media (max-width: 768px) {
    .glass-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .live-indicator {
        align-self: flex-start;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .card h2 {
        font-size: 1.8rem;
    }
}

@media (min-width: 769px) {
    .total-progress-card {
        grid-column: span 2;
    }
}