:root {
    --bg-deep: #f8fafc;
    --bg-card: #fff;
    --text-primary: #1a1a1a;
    --text-secondary: #666;
    --border-subtle: #e5e5e5;
    --accent-cyan: #00d4b8;
    --accent-magenta: #e63975;
    
    --glass-bg: rgba(255, 255, 255, 0.78);
    --glass-border: rgba(0, 0, 0, 0.06);
    --glass-saturate: 180%;
    
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --glow-cyan: 0 0 20px rgba(0, 212, 170, 0.4);
    
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;

    --radius-lg: 12px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
}

.countdown-page {
    max-width: var(--medium-width);
    margin: 0 auto;
    padding: 80px 20px;
}

.hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: var(--radius-lg);
    padding: 50px 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
}

.hero-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.meta-pills {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.hero-title {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.kicker {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

.headline {
    font-size: clamp(1.4rem, 2.6vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.12;
    color: #fff;
}

.headline strong {
    background: linear-gradient(90deg, #e11d48, #f59e0b, #ffffff, #f59e0b, #e11d48);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: colorFlow 3s linear infinite;
}

.actions {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    height: 40px;
    padding: 0 14px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
    user-select: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-secondary:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.2);
}

.meta {
    margin-top: var(--space-4);
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.pill select {
    border: none;
    outline: none;
    background: transparent;
    color: #fff;
    font-weight: 600;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    padding: 0 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
}

.pill select option {
    color: #1e293b;
    background: #fff;
    padding: 8px 12px;
}

.countdown {
    margin-top: var(--space-6);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 30px 0;
    position: relative;
    z-index: 1;
}

.tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.tile-days .value {
    background: rgba(225, 29, 72, 0.3);
    border: 1px solid #e11d48;
    color: white;
    text-shadow: 0 0 20px rgba(225, 29, 72, 0.8), 0 0 40px rgba(225, 29, 72, 0.8);
}

.value {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #e2e8f0;
    font-size: 100px;
    font-weight: 700;
    padding: 0 40px;
    border-radius: 8px;
    line-height: 1.4;
    font-family: 'Courier New', monospace;
}

.label {
    margin-top: 8px;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.5);
}

.tile-sep {
    font-size: 80px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.3);
    position: relative;
    top: -32px;
    animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes colorFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.subline {
    margin-top: var(--space-4);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.progress {
    width: 100%;
    height: 10px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #e11d48, #f59e0b);
    transition: width 700ms ease;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: var(--space-6);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: saturate(var(--glass-saturate)) blur(18px);
    -webkit-backdrop-filter: saturate(var(--glass-saturate)) blur(18px);
    color: var(--text-primary);
    padding: 10px 12px;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal), transform var(--transition-normal);
    transform: translateX(-50%) translateY(8px);
    z-index: 2000;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.fireworks {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

@media (max-width: 768px) and (orientation: portrait) {
    .hero { padding: 30px 20px; border-radius: var(--radius-lg); }
    
    .hero-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: var(--space-2);
        margin-bottom: var(--space-2);
    }

    .hero-title { flex: 1; }
    .kicker { display: none; }
    .headline { font-size: clamp(1.1rem, 4vw, 1.3rem); }
    .headline strong { display: block; }

    .actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-2);
        margin-top: var(--space-3);
    }

    .btn-secondary { height: 44px; font-size: 0.75rem; padding: 0 var(--space-2); }

    .meta { gap: var(--space-2); margin-top: var(--space-3); }

    .pill {
        padding: 8px 10px;
        font-size: 0.75rem;
        flex: 1 1 calc(50% - var(--space-1));
        min-width: 0;
        justify-content: center;
    }
    .pill span:first-child { display: none; }

    .countdown { margin-top: var(--space-4); }

    .tile { min-width: 60px; }
    .value { width: 60px; height: 60px; font-size: 32px; padding: 0; }
    .tile-days .value { font-size: 42px; }
    .tile-sep { font-size: 28px; top: -10px; }
    .label { font-size: 14px; }

    .subline { margin-top: var(--space-3); }
}

@media (max-width: 600px) and (orientation: portrait) {
    .countdown {
        flex-wrap: wrap;
        gap: 4px;
        margin-top: var(--space-5);
    }

    .tile {
        min-width: 50px;
    }

    .value { font-size: 28px; }
    .tile-days .value { font-size: 36px; }
    .label { font-size: 12px; }
}

@media (max-width: 380px) and (orientation: portrait) {
    .tile { min-width: 45px; }
    .value { font-size: 24px; }
    .tile-days .value { font-size: 32px; }
}

@media (max-width: 920px) and (orientation: landscape) {
    .hero { padding: var(--space-3) var(--space-4); }
    .hero-header { gap: var(--space-2); }
    .headline { font-size: 1.25rem; }
    .kicker { font-size: 0.75rem; }
    .actions { gap: var(--space-2); }
    .btn-secondary { height: 36px; padding: 0 12px; font-size: 0.8rem; }
    
    .countdown {
        gap: 4px;
        margin-top: var(--space-3);
    }

    .tile { min-width: 50px; }
    .value { font-size: 48px; padding: 0 20px; }
    .tile-days .value { font-size: 56px; }
    .tile-sep { font-size: 36px; top: -14px; }
    .label { font-size: 14px; margin-top: 4px; }

    .subline { margin-top: var(--space-2); font-size: 0.85rem; }
    .progress { height: 8px; }
}

@media (max-width: 640px) and (orientation: landscape) {
    .countdown { flex-wrap: wrap; }
    .value { font-size: 36px; }
    .tile-days .value { font-size: 44px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
