/* Global Variables & Reset */
:root {
    --bg-color: #000000;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.5);
    
    /* Accents & Parallax Gradients */
    --accent-blue-deep: #0055ff;
    --accent-blue-light: #00e5ff;
    --accent-gradient: linear-gradient(135deg, var(--accent-blue-deep) 0%, var(--accent-blue-light) 100%);
    
    /* Liquid Glass Aesthetic */
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-glow: rgba(0, 85, 255, 0.15);
    
    /* Fonts */
    --font-heading: 'Syne', sans-serif;
    --font-timer: 'Oswald', sans-serif;
    --font-ui: 'Outfit', sans-serif;
}

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

html, body {
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-ui);
    overflow: hidden;
    position: relative;
}

/* -------------------------------------------------------------
   Background Parallax & Ambient Glows
------------------------------------------------------------- */
.parallax-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

/* Glowing Neon Orbs */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: screen;
    filter: blur(100px);
    transition: transform 0.2s cubic-bezier(0.1, 0.8, 0.3, 1);
    opacity: 0.75;
}

.orb-1 {
    width: 50vw;
    height: 50vw;
    max-width: 600px;
    max-height: 600px;
    background: radial-gradient(circle, rgba(0, 85, 255, 0.4) 0%, rgba(0, 229, 255, 0.05) 50%, rgba(0, 0, 0, 0) 70%);
    top: -10%;
    left: -10%;
    animation: float-slow 25s infinite ease-in-out alternate;
}

.orb-2 {
    width: 45vw;
    height: 45vw;
    max-width: 550px;
    max-height: 550px;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.35) 0%, rgba(0, 85, 255, 0.05) 50%, rgba(0, 0, 0, 0) 70%);
    bottom: -10%;
    right: -10%;
    animation: float-reverse 30s infinite ease-in-out alternate;
}

.orb-3 {
    width: 35vw;
    height: 35vw;
    max-width: 450px;
    max-height: 450px;
    background: radial-gradient(circle, rgba(0, 85, 255, 0.25) 0%, rgba(0, 229, 255, 0.02) 60%, rgba(0, 0, 0, 0) 80%);
    top: 35%;
    left: 45%;
    animation: float-medium 20s infinite ease-in-out alternate;
}

/* Glass Floating Geometric Shapes */
.glass-shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.015);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    transition: transform 0.2s cubic-bezier(0.1, 0.8, 0.3, 1);
}

.shape-1 {
    width: 120px;
    height: 120px;
    top: 20%;
    right: 15%;
    transform: rotate(15deg);
    animation: rotate-slow 40s infinite linear;
}

.shape-2 {
    width: 160px;
    height: 160px;
    bottom: 25%;
    left: 10%;
    transform: rotate(-25deg);
    animation: rotate-slow-rev 50s infinite linear;
}

/* Animations Keyframes */
@keyframes float-slow {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, 30px) scale(1.05); }
    100% { transform: translate(-20px, -30px) scale(0.95); }
}

@keyframes float-reverse {
    0% { transform: translate(0, 0) scale(0.95); }
    50% { transform: translate(-30px, 50px) scale(1.05); }
    100% { transform: translate(20px, -20px) scale(1); }
}

@keyframes float-medium {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-50px, -40px) scale(1.1); }
    100% { transform: translate(30px, 40px) scale(0.9); }
}

@keyframes rotate-slow {
    0% { transform: rotate(15deg) translate(0, 0); }
    50% { transform: rotate(195deg) translate(15px, -15px); }
    100% { transform: rotate(375deg) translate(0, 0); }
}

@keyframes rotate-slow-rev {
    0% { transform: rotate(-25deg) translate(0, 0); }
    50% { transform: rotate(-205deg) translate(-20px, 20px); }
    100% { transform: rotate(-385deg) translate(0, 0); }
}

/* -------------------------------------------------------------
   Phase 1: Intro Overlay Sequence
------------------------------------------------------------- */
.intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1.2s cubic-bezier(0.76, 0, 0.24, 1), 
                transform 1.2s cubic-bezier(0.76, 0, 0.24, 1),
                filter 1.2s cubic-bezier(0.76, 0, 0.24, 1);
}

.intro-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.intro-title-mask, .intro-subtitle-mask {
    overflow: hidden;
}

/* Blur-to-sharp fade-in */
.intro-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 7.5rem);
    font-weight: 800;
    letter-spacing: 0.15em;
    color: var(--text-primary);
    opacity: 0;
    filter: blur(20px);
    transform: scale(0.9);
}

.intro-title.play {
    animation: blur-to-sharp 1.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* Sliding up mask-in */
.intro-subtitle {
    font-family: var(--font-ui);
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 300;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    transform: translateY(100%);
    opacity: 0;
}

.intro-subtitle.play {
    animation: slide-up-mask 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.8s;
}

/* Dissolve/Scale out container */
.intro-overlay.fade-out {
    opacity: 0;
    transform: scale(1.15);
    filter: blur(30px);
    pointer-events: none;
}

@keyframes blur-to-sharp {
    0% {
        opacity: 0;
        filter: blur(20px);
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        filter: blur(0px);
        transform: scale(1);
    }
}

@keyframes slide-up-mask {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* -------------------------------------------------------------
   Phase 2: Main Dashboard Reveal
------------------------------------------------------------- */
#dashboard {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 3rem;
    z-index: 5;
    opacity: 0;
    transform: scale(0.95);
    filter: blur(10px);
    transition: opacity 1.5s cubic-bezier(0.25, 1, 0.5, 1),
                transform 1.5s cubic-bezier(0.25, 1, 0.5, 1),
                filter 1.5s cubic-bezier(0.25, 1, 0.5, 1);
}

#dashboard.active {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
}

/* Header */
.header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1) 0.5s,
                transform 1s cubic-bezier(0.25, 1, 0.5, 1) 0.5s;
}

#dashboard.active .header {
    opacity: 1;
    transform: translateY(0);
}

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.75rem;
    letter-spacing: 0.1em;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #00e5ff;
    border-radius: 50%;
    box-shadow: 0 0 10px #00e5ff;
    animation: pulse 2s infinite;
}

.badge-text {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.6; box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.7); }
    70% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 6px rgba(0, 229, 255, 0); }
    100% { transform: scale(0.9); opacity: 0.6; box-shadow: 0 0 0 0 rgba(0, 229, 255, 0); }
}

/* Center Stage Timer Section */
.timer-section {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    flex-grow: 1;
}

.timer-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

/* Timer Cards & Staggering */
.timer-card-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    transform: translateY(50px) scale(0.9);
}

#dashboard.active .timer-card-wrapper {
    animation: spring-in 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: calc(var(--stagger-delay) * 0.15s + 0.5s);
}

.timer-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2rem 2.5rem;
    min-width: 160px;
    height: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 
                inset 0 1px 0 rgba(255, 255, 255, 0.1),
                0 0 40px rgba(0, 85, 255, 0.02);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1),
                box-shadow 0.3s cubic-bezier(0.25, 1, 0.5, 1),
                border-color 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.timer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top left, rgba(255,255,255,0.06), transparent 70%);
    pointer-events: none;
}

.timer-card:hover {
    transform: translateY(-8px) scale(1.03);
    border-color: rgba(0, 229, 255, 0.3);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 
                inset 0 1px 0 rgba(255, 255, 255, 0.2),
                0 0 30px rgba(0, 85, 255, 0.15);
}

.timer-value {
    font-family: var(--font-timer);
    font-size: 5.5rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text-primary);
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
    font-variant-numeric: tabular-nums;
}

.timer-label {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.4em;
    color: var(--text-secondary);
    text-indent: 0.4em; /* offset letter spacing for perfect centering */
    text-transform: uppercase;
}

/* Colons Staggering */
.timer-colon {
    font-family: var(--font-timer);
    font-size: 4rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.2);
    align-self: center;
    margin-bottom: 2rem;
    opacity: 0;
    text-shadow: 0 0 10px rgba(0, 85, 255, 0.2);
}

#dashboard.active .timer-colon {
    animation: fade-in-colon 1s ease-out forwards;
    animation-delay: calc(var(--stagger-delay) * 0.15s + 0.5s);
}

@keyframes spring-in {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fade-in-colon {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Footer Section */
.footer {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1) 0.5s,
                transform 1s cubic-bezier(0.25, 1, 0.5, 1) 0.5s;
}

#dashboard.active .footer {
    opacity: 1;
    transform: translateY(0);
}

.instagram-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: color 0.4s cubic-bezier(0.25, 1, 0.5, 1),
                border-color 0.4s cubic-bezier(0.25, 1, 0.5, 1),
                background-color 0.4s cubic-bezier(0.25, 1, 0.5, 1),
                box-shadow 0.4s cubic-bezier(0.25, 1, 0.5, 1),
                transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.instagram-icon {
    width: 18px;
    height: 18px;
    transition: stroke 0.4s ease, transform 0.4s ease;
}

.instagram-text {
    transition: text-shadow 0.4s ease;
}

.instagram-link:hover {
    color: #00e5ff;
    border-color: rgba(0, 229, 255, 0.25);
    background-color: rgba(0, 85, 255, 0.05);
    box-shadow: 0 10px 25px rgba(0, 85, 255, 0.1),
                0 0 15px rgba(0, 229, 255, 0.05);
    transform: translateY(-2px);
}

.instagram-link:hover .instagram-icon {
    stroke: #00e5ff;
    transform: rotate(5deg) scale(1.1);
}

.instagram-link:hover .instagram-text {
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}

/* -------------------------------------------------------------
   Responsive Breakpoints (Mobile Optimization)
------------------------------------------------------------- */
@media (max-width: 900px) {
    .timer-card {
        min-width: 130px;
        height: 130px;
        padding: 1.5rem;
    }
    
    .timer-value {
        font-size: 4rem;
    }
    
    .timer-colon {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    body {
        overflow-y: auto; /* Allow scrolling if keyboard or small screens overlap content */
    }

    #dashboard {
        padding: 2rem 1.5rem;
        min-height: 100vh;
        height: auto;
        justify-content: space-between;
        gap: 3rem;
    }

    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .logo {
        font-size: 1.5rem;
    }

    /* Stacked Timer Grid for Mobile: 2 Columns, 2 Rows */
    .timer-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 1.5rem;
        width: 100%;
        max-width: 450px;
        position: relative;
    }

    /* Hide the desktop colons completely */
    .timer-colon {
        display: none !important;
    }

    .timer-card-wrapper {
        width: 100%;
        gap: 0.75rem;
    }

    /* We style the card to look massive, filling the grid columns */
    .timer-card {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1; /* keep cards square */
        min-width: unset;
        padding: 1.5rem 1rem;
        border-radius: 20px;
    }

    .timer-value {
        font-size: clamp(3rem, 12vw, 4.5rem);
    }

    .timer-label {
        font-size: 0.65rem;
        letter-spacing: 0.25em;
        text-indent: 0.25em;
    }

    /* Apply a visual divider '|' using flex-based or grid-based layout.
       Since we want Days | Hours and Mins | Secs, we can put a border on the right
       of the first column cards, or use an absolute separator line. Let's make the cards
       themselves look amazing, and use a divider between the grid blocks.
    */
    
    /* Let's draw a glowing vertical separator line directly down the middle,
       and horizontal line between rows, to make it look like a sleek glass pane grid!
    */
    .timer-container::after {
        content: '';
        position: absolute;
        top: 10%;
        left: 50%;
        width: 1px;
        height: 80%;
        background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.15) 50%, transparent);
        pointer-events: none;
    }

    .timer-container::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 10%;
        width: 80%;
        height: 1px;
        background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.15) 50%, transparent);
        pointer-events: none;
    }

    .footer {
        padding-top: 1rem;
    }
}

@media (max-width: 360px) {
    .timer-container {
        gap: 1rem;
    }
    
    .timer-card {
        padding: 1rem 0.5rem;
    }
    
    .timer-value {
        font-size: 2.75rem;
    }
}
