/* 
    ANTIGRAVITY IN CODE THEME 
*/
:root {
    --bg-base: #111111; /* Extreme subtle dark UI */
    
    --neon-cyan: #06b6d4;
    --neon-violet: #8b5cf6;
    --tension-crimson: #e11d48;
    
    --neon-cyan-glow: rgba(6, 182, 212, 0.4);
    --crimson-glow: rgba(225, 29, 72, 0.15);
    
    --glass-bg: rgba(20, 20, 24, 0.35);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    
    --card-bg: rgba(22, 22, 26, 0.4);
    --card-hover: rgba(26, 26, 32, 0.8);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; text-decoration: none; }
::-webkit-scrollbar { display: none; }
* { -ms-overflow-style: none; scrollbar-width: none; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Base Atmosphere */
.obsidian-void {
    position: fixed; inset: 0;
    background: radial-gradient(circle at 50% 100%, #16161a 0%, var(--bg-base) 100%);
    z-index: -5;
}

.crimson-glow {
    position: fixed; border-radius: 50%;
    width: 60vw; height: 60vw; bottom: -20%; right: -20%;
    background: var(--tension-crimson);
    filter: blur(140px); opacity: 0.05; z-index: -4;
    animation: crimsonPulse 15s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes crimsonPulse {
    0% { transform: scale(1); opacity: 0.02; border-radius: 50%; }
    100% { transform: scale(1.3); opacity: 0.08; border-radius: 40% 60% / 50%; }
}

/* GSAP Driven Code Particles */
#code-particles {
    position: fixed; inset: 0; z-index: -3; overflow: hidden; pointer-events: none;
}
.floating-code {
    position: absolute;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.15);
    text-shadow: 0 0 10px rgba(255,255,255,0.05);
    user-select: none;
    will-change: transform, opacity;
}
.floating-code.cyan { color: rgba(6, 182, 212, 0.2); text-shadow: 0 0 15px rgba(6, 182, 212, 0.1); }
.floating-code.violet { color: rgba(139, 92, 246, 0.2); text-shadow: 0 0 15px rgba(139, 92, 246, 0.1); }

/* Layout Structure */
.app-container {
    max-width: 1000px; margin: 0 auto; padding: 2rem 4vw;
    display: flex; flex-direction: column; min-height: 100vh;
}

.glass-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.25rem 2rem; background: var(--glass-bg);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-bottom: 2px solid var(--neon-cyan);
    border-radius: 20px; margin-bottom: 3rem; box-shadow: var(--glass-shadow);
    animation: zeroFloat 10s infinite alternate ease-in-out;
}

@keyframes zeroFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-5px); }
}

.brand { display: flex; align-items: center; gap: 0.75rem; font-family: 'Outfit', sans-serif; font-size: 1.6rem; font-weight: 800; }
.logo-mark { color: var(--neon-cyan); text-shadow: 0 0 15px var(--neon-cyan-glow); }
.brand-text { background: linear-gradient(90deg, #fff, var(--text-secondary)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.status-panel {
    text-align: center; padding: 1rem; border-radius: 12px;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    margin-bottom: 2rem; font-weight: 500; backdrop-filter: blur(12px);
}
.hidden { display: none !important; }

/* Content Grid */
.list-container { display: flex; flex-direction: column; gap: 3.5rem; padding-bottom: 5rem; }
.day-group { display: flex; flex-direction: column; gap: 1.25rem; }

/* Standard Date Header (No Sticky, Controlled by GSAP) */
.date-header {
    align-self: flex-start;
    padding: 0.75rem 1.75rem; border-radius: 30px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border); border-left: 3px solid var(--neon-violet);
    font-family: 'Outfit', sans-serif; font-size: 1.15rem; font-weight: 700;
    color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    display: inline-flex; align-items: center; margin-bottom: 0.5rem;
    will-change: transform, opacity;
}

/* Kinetic Cards */
.contest-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border); border-radius: 16px; padding: 1.75rem 2rem;
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1rem;
    color: var(--text-primary); cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), 0 8px 32px rgba(0,0,0,0.3);
    position: relative; overflow: hidden;
    will-change: transform;
}

/* Flex row wrapper added inside card layout for title and timer */
.card-content-row {
    display: flex; justify-content: space-between; align-items: center;
    width: 100%;
}


/* Background Shimmer Kinetic Effect */
.contest-card::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.03), transparent);
    background-size: 200% 100%;
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    z-index: -1;
}

.contest-card:hover {
    transform: translateY(-5px) scale(1.02);
    background: var(--card-hover);
    border-color: rgba(6, 182, 212, 0.4); /* Subtle Cyan "Success Compile" state */
    box-shadow: 0 20px 50px rgba(0,0,0,0.7), 0 0 25px var(--neon-cyan-glow);
}
.contest-card:hover::before { transform: translateX(100%); }

.card-left { display: flex; flex-direction: column; gap: 0.6rem; flex-grow: 1; }
.contest-platform { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--neon-cyan); text-shadow: 0 0 10px var(--neon-cyan-glow); }
.contest-series { font-family: 'Outfit', sans-serif; font-size: 1.5rem; font-weight: 700; line-height: 1.2; }

.card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.85rem; min-width: 220px; }

/* Real-time Timers */
.timer-badge {
    background: rgba(6, 182, 212, 0.1); border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--neon-cyan); padding: 0.6rem 1.25rem; border-radius: 30px;
    font-family: 'JetBrains Mono', monospace; font-size: 1rem; font-weight: 700;
    display: flex; align-items: center; gap: 0.6rem;
    box-shadow: 0 0 15px var(--neon-cyan-glow); white-space: nowrap; backdrop-filter: blur(10px);
}
.timer-badge.live {
    background: rgba(225, 29, 72, 0.1); border-color: #e11d48; color: #e11d48;
    box-shadow: 0 0 20px rgba(225, 29, 72, 0.3), inset 0 0 10px rgba(225, 29, 72, 0.2);
    animation: livePulse 2s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes livePulse {
    0% { box-shadow: 0 0 20px rgba(225, 29, 72, 0.3), 0 0 0 0 rgba(225, 29, 72, 0.4); }
    70% { box-shadow: 0 0 30px rgba(225, 29, 72, 0.5), 0 0 0 15px rgba(225, 29, 72, 0); }
    100% { box-shadow: 0 0 20px rgba(225, 29, 72, 0.3), 0 0 0 0 rgba(225, 29, 72, 0); }
}

.contest-start-date { font-size: 0.9rem; color: var(--text-secondary); font-weight: 500; font-family: 'JetBrains Mono', monospace; }

/* Global Enable Alerts Button */
.subscribe-btn {
    background: transparent; border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan); padding: 0.5rem 1.4rem;
    border-radius: 8px; font-family: 'Inter', sans-serif;
    font-weight: 600; font-size: 0.85rem; cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: inset 0 0 10px rgba(6, 182, 212, 0.1);
    display: flex; align-items: center; gap: 0.5rem;
}
.subscribe-btn:hover {
    background: rgba(6, 182, 212, 0.1);
    box-shadow: inset 0 0 15px rgba(6, 182, 212, 0.2), 0 0 15px rgba(6, 182, 212, 0.3);
    transform: translateY(-2px);
}
.subscribe-btn:active {
    transform: scale(0.95);
    background: var(--neon-cyan); color: #000;
}
.subscribe-btn.active {
    background: var(--neon-cyan); color: #000;
    box-shadow: 0 0 20px var(--neon-cyan-glow);
}

@media (max-width: 768px) {
    .glass-header { padding: 1.25rem; border-radius: 20px; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem;}
    .contest-card { padding: 1.25rem; }
    .card-content-row { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
    .card-right { align-items: flex-start; width: 100%; flex-direction: row-reverse; justify-content: space-between; align-items: center; }
    .contest-series { font-size: 1.3rem; }
    .timer-badge { font-size: 0.9rem; padding: 0.5rem 1rem; }
    .actions { width: 100%; justify-content: flex-end; display:flex;}
}

@media (max-width: 400px) {
    .app-container { padding: 1rem; }
    .contest-card { padding: 1.25rem 1rem; }
    .card-right { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .contest-series { font-size: 1.15rem; word-break: break-word; }
    .contest-platform { font-size: 0.75rem; }
    .timer-badge { font-size: 0.8rem; padding: 0.4rem 0.8rem; width: 100%; justify-content: center; }
    .actions { justify-content: center; width: 100%; }
    .subscribe-btn { width: 100%; justify-content: center; font-size: 0.8rem; }
    .glass-header { padding: 1rem; }
    .brand-text { font-size: 1.2rem; }
}

/* Splash Screen */
#splash-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background-color: var(--bg-base);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.splash-logo {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    box-shadow: 0 0 40px var(--neon-cyan-glow);
    animation: splashPulse 2s infinite alternate ease-in-out;
}

@keyframes splashPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 30px var(--neon-cyan-glow); }
    100% { transform: scale(1.05); box-shadow: 0 0 60px var(--neon-cyan-glow); }
}
