:root {
    --primary: #49C5E3;
    --primary-glow: 0 0 18px #49c5e366;
    --accent: #22e3c8;
    --dark-bg: #0a0a0a;
    --container-glass: rgba(18, 26, 37, 0.82);
    --light: #fff;
    --footer-glass: rgba(15,18,24,0.76);
    --transition: .32s cubic-bezier(.42,0,.58,1);
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Roboto', system-ui, Arial, sans-serif;
    background: var(--dark-bg);
    color: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Background Canvas */
canvas#bgCanvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    filter: blur(0.5px) brightness(1.1);
}

/* Container – Glassy Card Effect */
.container {
    position: relative;
    z-index: 1;
    max-width: 600px;
    width: 92%;
    margin: 0 auto;
    padding: 2.5rem 2rem 2rem;
    background: linear-gradient(120deg, rgba(18,26,37,0.93) 60%, rgba(73,197,227,0.12) 100%);
    border-radius: 2rem;
    border: 3px solid rgba(73,197,227,0.07);
    box-shadow: 0 4px 18px #49c5e31a, 0 2px 12px #0003;
    backdrop-filter: blur(16px) saturate(135%);
    animation: fadeIn 1.1s var(--transition);
    transition: background var(--transition), box-shadow var(--transition);
}

/* Logo */
.logo {
    display: block;
    width: 100%;
    max-width: 172px;
    height: auto;
    margin: 0 auto 1.5rem;
    filter: drop-shadow(0 2px 12px #0003);
}

/* Typography */
h1 {
    position: relative;
    font-size: 2.7rem;
    font-weight: 600;
    background: linear-gradient(90deg, var(--primary), #41e3bc 75%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
    text-shadow: 0 1px 4px #49c5e321;
}
h1::after {
    content: '';
    display: block;
    width: 54px;
    height: 3px;
    margin: 0.6rem auto 0;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0.8;
    animation: underlineGrow 1.2s cubic-bezier(.4,0,.2,1) 0.3s both;
}
@keyframes underlineGrow {
    from { transform: scaleX(0); opacity: 0; }
    to { transform: scaleX(1); opacity: 0.85; }
}

p {
    font-size: 1.13rem;
    margin-bottom: 2.1rem;
    opacity: 0.86;
    line-height: 1.6;
    text-shadow: 0 1px 3px #0002;
}

/* Countdown */
#countdown {
    display: flex;
    gap: .7rem;
    justify-content: center;
    margin-bottom: 2.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}
@media (max-width: 600px) {
    #countdown {
        padding-left: 0.3rem;
        padding-right: 0.3rem;
    }
}

.time-box {
    flex: 1 1 0;
    background: linear-gradient(120deg, rgba(73,197,227,0.07), rgba(34,227,200,0.06));
    padding: 1.18rem 0.6rem;
    border-radius: 16px;
    box-shadow: 0 1px 4px #49c5e31a, 0 0 0 transparent;
    backdrop-filter: blur(4px);
    transition: box-shadow var(--transition), background var(--transition);
    position: relative;
}
.time-box h2 {
    margin: 0;
    font-size: 2.15rem;
    letter-spacing: 0.04em;
    font-weight: 600;
    text-shadow: 0 2px 12px #49c5e3a0;
}
.time-box span {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    opacity: .72;
    margin-top: .19rem;
    letter-spacing: 0.1em;
}
.time-box:hover, .time-box:focus-within {
    box-shadow: 0 0 6px 1px var(--primary), 0 1px 8px #49c5e333;
    background: linear-gradient(120deg, rgba(73,197,227,0.11), rgba(34,227,200,0.09));
}

/* Social Icons */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2.1rem;
}
.social-links a {
    font-size: 1.8rem;
    color: var(--light);
    border-radius: 50%;
    background: transparent;
    transition: color var(--transition), transform var(--transition), box-shadow var(--transition);
    outline: none;
    box-shadow: 0 0 0 #49c5e300;
}
.social-links a:focus-visible, .social-links a:hover {
    color: var(--primary);
    transform: translateY(-3px) scale(1.13);
    box-shadow: 0 4px 14px #49c5e33a;
    background: rgba(34,227,200,0.12);
}

/* Footer – Glassmorphism Pill */
.footer {
    position: fixed;
    bottom: 1.2rem;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--footer-glass);
    color: var(--light);
    padding: 0.58rem 1.25rem;
    border-radius: 20px;
    font-size: 0.98rem;
    box-shadow: 0 4px 36px #49c5e326;
    opacity: 0.7;
    transition: opacity var(--transition), background var(--transition);
    white-space: nowrap;
    z-index: 20;
}
.footer:hover, .footer:focus-within {
    opacity: 1;
    background: rgba(34,227,200,0.13);
}
.footer p { margin: 0; }

/* Base: always hide overlay */
#rotate-overlay { 
    display: none; 
}

/* Responsive Overrides */
@media (max-width: 600px) {
    .container { padding: 1.6rem 0.8rem 1.3rem; }
    h1 { font-size: 2rem; }
    .time-box h2 { font-size: 1.23rem; }
    .logo { max-width: 128px; }
    .footer { font-size: 0.93rem; padding: 0.42rem 1rem; }
}
@media (max-width: 480px) and (orientation: portrait) {
    .container { padding: 1rem 0.1rem 0.8rem; }
    h1 { font-size: 1.25rem; }
    p { font-size: 1rem; }
    .time-box { padding: 0.69rem 0.19rem; }
}
/* Show overlay in landscape on most devices */
@media (orientation: landscape) and (max-width: 1200px) {
    #rotate-overlay {
        display: flex !important;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.88);
        color: #fff;
        font-size: 1.22rem;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 1.2rem;
        z-index: 9999;
        transition: opacity 0.3s;
    }
    .container { display: none !important; }
}


/* Animations */
@keyframes fadeIn {
    0% { opacity: 0; transform: scale(0.98) translateY(18px); }
    100% { opacity: 1; transform: none; }
}
