:root {
    --bg: #05080F;
    --line: rgba(255, 255, 255, .1);
    --line-2: rgba(255, 255, 255, .16);
    --glass: rgba(8, 13, 22, .58);
    --text: #F5F7FA;
    --text-2: #C3CBD6;
    --text-3: #8A94A3;
    --accent: #4DABF7;
    --accent-2: #74C0FC;
    --accent-3: #A5D8FF;
    --accent-strong: #228BE6;
    --green: #40C057;
    --green-l: #69DB7C;
    --font: 'Poppins', 'Inter', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: inherit; }

.scene {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    background: var(--bg);
}

.bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(.85) brightness(.62) contrast(1.1);
}

.tint {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #1E63B4, #0E3C78);
    mix-blend-mode: color;
    opacity: .6;
}

.beam {
    position: absolute;
    bottom: -12vh;
    width: max(36vw, 280px);
    height: 135vh;
    opacity: .5;
    filter: blur(16px);
    mix-blend-mode: screen;
    transform-origin: 50% 100%;
}

.beam::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(165, 216, 255, .75), rgba(116, 192, 252, .22) 45%, transparent 88%);
    clip-path: polygon(48% 100%, 52% 100%, 100% 0, 0 0);
}

.beam-l {
    left: -2vw;
    transform: rotate(22deg);
    animation: sweep-l 12s ease-in-out infinite alternate;
}

.beam-r {
    right: -2vw;
    transform: rotate(-22deg);
    animation: sweep-r 14s ease-in-out infinite alternate;
}

.shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 48% 42% at 50% 54%, rgba(5, 8, 15, .62), transparent 100%),
        radial-gradient(ellipse 120% 95% at 50% 40%, transparent 35%, rgba(2, 4, 9, .9) 100%),
        linear-gradient(180deg, rgba(5, 8, 15, .5) 0%, rgba(5, 8, 15, .25) 30%, rgba(5, 8, 15, .7) 72%, var(--bg) 100%);
}

.grain {
    position: absolute;
    inset: 0;
    opacity: .08;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.fx {
    position: fixed;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 44px 20px 16px;
    text-align: center;
}

.brand {
    position: relative;
    display: grid;
    place-items: center;
    margin-bottom: 26px;
}

.halo {
    position: absolute;
    width: 130%;
    aspect-ratio: 1.6;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(77, 171, 247, .42), rgba(34, 139, 230, .1) 45%, transparent 70%);
    filter: blur(12px);
    animation: breathe 5s ease-in-out infinite;
}

.logo {
    position: relative;
    width: clamp(220px, 27vw, 330px);
    height: auto;
    filter: drop-shadow(0 16px 36px rgba(34, 139, 230, .55));
    animation: float 6s ease-in-out infinite;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 16px;
    border-radius: 999px;
    border: 1px solid rgba(116, 192, 252, .38);
    background: rgba(20, 60, 105, .35);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: var(--accent-3);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    box-shadow: 0 0 24px -6px rgba(77, 171, 247, .5);
}

.chip-live {
    border-color: rgba(105, 219, 124, .4);
    background: rgba(30, 90, 45, .3);
    color: var(--green-l);
    box-shadow: 0 0 24px -6px rgba(64, 192, 87, .5);
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 2s infinite;
}

h1 {
    margin: 20px 0 12px;
    font-size: clamp(38px, 7vw, 82px);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -.03em;
    text-shadow: 0 8px 34px rgba(0, 0, 0, .55);
}

.shine {
    background: linear-gradient(100deg, var(--accent-2) 0%, var(--accent) 28%, #EAF6FF 48%, var(--accent) 66%, var(--accent-strong) 100%);
    background-size: 240% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
    filter: drop-shadow(0 0 26px rgba(77, 171, 247, .35));
    animation: shine 6s linear infinite;
}

.lead {
    max-width: 590px;
    margin: 0 0 36px;
    color: var(--text-2);
    font-size: clamp(14.5px, 1.6vw, 16.5px);
    line-height: 1.75;
    text-shadow: 0 2px 14px rgba(0, 0, 0, .6);
}

.timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 1.3vw, 14px);
    margin-bottom: 26px;
}

.timer.no-days .unit-d, .timer.no-days .sep-d { display: none; }

.unit {
    --fs: clamp(42px, 7.6vw, 90px);
    --h: calc(var(--fs) * 1.46);
    --r: clamp(12px, 1.5vw, 18px);
    position: relative;
    width: clamp(86px, 15vw, 164px);
}

.flip {
    position: relative;
    height: var(--h);
    border-radius: var(--r);
    font-size: var(--fs);
    font-weight: 800;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
    perspective: calc(var(--h) * 4);
    box-shadow:
        0 28px 50px -16px rgba(0, 0, 0, .9),
        0 0 56px -14px rgba(77, 171, 247, .6),
        0 0 0 1px rgba(116, 192, 252, .22);
}

.flip::after {
    content: '';
    position: absolute;
    z-index: 4;
    left: 0;
    right: 0;
    top: calc(50% - 1px);
    height: 2px;
    background: rgba(2, 5, 11, .9);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .05);
}

.half, .flap {
    position: absolute;
    left: 0;
    right: 0;
    height: 50%;
    overflow: hidden;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.top, .front {
    top: 0;
    border-radius: var(--r) var(--r) 0 0;
    background: linear-gradient(180deg, #1D2E47, #15253C);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
}

.bottom, .back {
    bottom: 0;
    border-radius: 0 0 var(--r) var(--r);
    background: linear-gradient(180deg, #111E32, #0B1526);
}

.front {
    z-index: 2;
    transform-origin: 50% 100%;
}

.back {
    z-index: 3;
    transform-origin: 50% 0;
    transform: rotateX(90deg);
}

.half span, .flap span {
    position: absolute;
    left: 0;
    right: 0;
    height: var(--h);
    line-height: var(--h);
    text-align: center;
    background: linear-gradient(180deg, #FFFFFF 0%, #FFFFFF 50%, #D6ECFF 50%, #8CC8FF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 16px rgba(77, 171, 247, .5));
}

.top span, .front span { top: 0; }

.bottom span, .back span { bottom: 0; }

.flap::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.front::after { background: linear-gradient(180deg, rgba(0, 0, 0, .1), rgba(0, 0, 0, .6)); }

.back::after { background: linear-gradient(0deg, rgba(0, 0, 0, .1), rgba(0, 0, 0, .6)); }

.flip.go .front { animation: flip-down .3s cubic-bezier(.55, 0, .9, .45) forwards; }

.flip.go .front::after { animation: shade-in .3s ease-in forwards; }

.flip.go .back { animation: flip-up .32s cubic-bezier(.15, .65, .35, 1.25) .3s forwards; }

.flip.go .back::after { animation: shade-out .32s ease-out .3s both; }

.unit small {
    position: relative;
    display: block;
    margin-top: clamp(12px, 1.6vw, 16px);
    color: #8DB4DC;
    font-size: clamp(9px, 1.1vw, 12px);
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
}

.sep {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 1.5vw, 16px);
    margin-bottom: clamp(26px, 3vw, 32px);
}

.sep::before, .sep::after {
    content: '';
    width: clamp(6px, .8vw, 9px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #FFFFFF, var(--accent-2) 45%, var(--accent-strong));
    box-shadow: 0 0 12px rgba(77, 171, 247, .9), 0 0 26px rgba(34, 139, 230, .55);
    animation: blink 2s ease-in-out infinite;
}

.date {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 30px;
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--glass);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: var(--text-2);
    font-size: 14.5px;
    white-space: nowrap;
}

.date i { color: var(--accent); font-size: 18px; }

.date b { color: var(--text); font-weight: 700; }

.divider {
    width: 1px;
    height: 16px;
    margin: 0 6px;
    background: var(--line-2);
}

.connect {
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(100%, 460px);
    height: 56px;
    margin-bottom: 26px;
    padding: 0 8px 0 18px;
    border-radius: 16px;
    border: 1px solid var(--line-2);
    background: var(--glass);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: var(--text-2);
}

.connect > i { color: var(--accent); font-size: 19px; }

.connect code {
    flex: 1;
    text-align: left;
    font-family: Consolas, 'Cascadia Code', monospace;
    font-size: 14.5px;
    color: var(--text);
}

.connect button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 15px;
    border: 0;
    border-radius: 11px;
    background: rgba(77, 171, 247, .16);
    color: var(--accent-3);
    font: 600 13px var(--font);
    cursor: pointer;
    transition: background .15s;
}

.connect button:hover { background: rgba(77, 171, 247, .28); }

.actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 52px;
    padding: 0 26px;
    border-radius: 15px;
    overflow: hidden;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
}

.btn i { position: relative; font-size: 20px; }

.btn-primary {
    background: linear-gradient(180deg, #5DB7FA, var(--accent-strong));
    color: #fff;
    box-shadow: 0 16px 36px -8px rgba(34, 139, 230, .7), inset 0 1px 0 rgba(255, 255, 255, .35);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -60%;
    width: 40%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
    transform: skewX(-20deg);
    animation: gloss 5s ease-in-out infinite;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 44px -8px rgba(34, 139, 230, .85), inset 0 1px 0 rgba(255, 255, 255, .35);
}

.btn-ghost {
    border: 1px solid var(--line-2);
    background: var(--glass);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.btn-ghost:hover {
    transform: translateY(-2px);
    border-color: rgba(116, 192, 252, .55);
    background: rgba(20, 60, 105, .4);
}

.foot {
    padding: 20px 20px 24px;
    color: var(--text-3);
    font-size: 12.5px;
    text-align: center;
}

.foot a { text-decoration: none; }

.foot a:hover { color: var(--accent-2); }

.post { display: none; }

.is-open .pre { display: none; }

.is-open .chip.post { display: inline-flex; }

.is-open h1.post, .is-open .lead.post { display: block; }

.is-open .connect.post, .is-open .actions.post { display: flex; }

.is-open .shine {
    background-image: linear-gradient(100deg, var(--green-l) 0%, var(--green) 30%, #EBFBEE 48%, var(--green) 66%, #2F9E44 100%);
    filter: drop-shadow(0 0 26px rgba(64, 192, 87, .35));
}

@keyframes flip-down {
    from { transform: rotateX(0); }
    to { transform: rotateX(-90deg); }
}

@keyframes flip-up {
    from { transform: rotateX(90deg); }
    to { transform: rotateX(0); }
}

@keyframes shade-in {
    to { opacity: 1; }
}

@keyframes shade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes sweep-l {
    from { transform: rotate(30deg); }
    to { transform: rotate(-4deg); }
}

@keyframes sweep-r {
    from { transform: rotate(-30deg); }
    to { transform: rotate(4deg); }
}

@keyframes breathe {
    0%, 100% { opacity: .75; transform: scale(.96); }
    50% { opacity: 1; transform: scale(1.04); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

@keyframes shine {
    from { background-position: 100% 0; }
    to { background-position: -140% 0; }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 currentColor; }
    70% { box-shadow: 0 0 0 8px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

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

@keyframes gloss {
    0%, 62% { left: -60%; }
    100% { left: 130%; }
}

@media (max-width: 600px) {
    .sep { display: none; }
    .timer { gap: 8px; }
    .unit { --fs: 38px; --r: 10px; width: calc((100vw - 64px) / 4); max-width: 96px; }
    .timer.no-days .unit { width: calc((100vw - 56px) / 3); max-width: 120px; }
    .unit small { letter-spacing: .08em; font-size: 8.5px; }
    .date { gap: 7px; font-size: 12.5px; padding: 9px 15px; }
    .date i { font-size: 16px; }
    .divider { margin: 0 3px; }
}

@media (max-width: 420px) {
    .btn { width: 100%; justify-content: center; }
    .connect code { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    .beam, .halo, .logo, .shine, .dot, .sep::before, .sep::after, .btn-primary::after { animation: none; }
    .btn { transition: none; }
}
