:root {
    --bg-image: none;
    --text-main: rgba(255, 255, 255, 0.92);
    --text-soft: rgba(255, 255, 255, 0.5);
    --text-faint: rgba(255, 255, 255, 0.3);
    --dot-live: #6ee7a0;
    --dot-stale: #d4a84b;
    --dot-error: #b05050;
    --font-display:
        "SF Pro Display", "Bahnschrift", "Microsoft JhengHei", system-ui,
        sans-serif;
    --font-body:
        "SF Pro Text", -apple-system, "Segoe UI", "Microsoft JhengHei",
        system-ui, sans-serif;
    --font-mono: "SF Mono", "Cascadia Code", "Consolas", monospace;
}

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

html,
body {
    height: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background: #000;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── full-bleed background image ── */

.page-shell {
    position: relative;
    width: 100%;
    height: 100vh;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* dark vignette overlay for readability */
.overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at center,
        rgba(0, 0, 0, 0.45) 0%,
        rgba(0, 0, 0, 0.65) 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* ── content: dead center ── */

.content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    animation: fade-in 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ── title ── */

.title {
    font-family: var(--font-display);
    font-size: clamp(2.64rem, 5.6vw, 4.48rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: none;
    color: var(--text-main);
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
    margin-bottom: 78px;
}

/* ── metrics row ── */

.metrics {
    display: flex;
    align-items: center;
    gap: 0;
}

.metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.metric-divider {
    width: 1px;
    height: 120px;
    background: rgba(255, 255, 255, 0.12);
    margin: 0 84px;
    align-self: center;
}

.metric-label {
    font-size: clamp(1.44rem, 2.8vw, 2.2rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: none;
    color: var(--text-main);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.metric-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.04em;
    font-family: var(--font-display);
    font-size: clamp(5.8rem, 14vw, 10.5rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--text-main);
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.55);
}

/* ── rolling number digits ── */

.rolling-digit,
.rolling-separator {
    display: inline-flex;
    align-items: flex-start;
    justify-content: center;
    height: 1em;
}

.rolling-digit {
    width: 0.62em;
    overflow: hidden;
}

.rolling-separator {
    width: 0.28em;
    color: var(--text-faint);
}

.digit-track {
    display: flex;
    flex-direction: column;
    transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.digit-track span,
.rolling-separator {
    height: 1em;
    line-height: 1em;
}

/* ── bottom bar: dot + timestamp, pinned to bottom center ── */

.bottom-bar {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--dot-live);
    box-shadow: 0 0 4px rgba(110, 231, 160, 0.4);
    animation: blink 2.6s ease-in-out infinite;
    transition:
        background 0.4s ease,
        box-shadow 0.4s ease;
}

.status-dot.is-stale {
    background: var(--dot-stale);
    box-shadow: 0 0 4px rgba(212, 168, 75, 0.35);
}

.status-dot.is-error {
    background: var(--dot-error);
    box-shadow: 0 0 4px rgba(176, 80, 80, 0.35);
    animation: none;
}

.ts {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-faint);
    letter-spacing: 0.02em;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.powered-by {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    margin-top: 1.2rem;
    padding: 0.35em 0.85em 0.35em 0.65em;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(6px);
    font-size: 0.72rem;
    letter-spacing: 0.03em;
    color: rgba(255, 255, 255, 0.38);
    transition: border-color 0.25s, background 0.25s;
}

.powered-by:hover {
    border-color: rgba(145, 71, 255, 0.45);
    background: rgba(145, 71, 255, 0.07);
}

.powered-by-text {
    font-weight: 400;
}

.powered-by-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: color 0.2s;
}

.powered-by-link:hover {
    color: #b47eff;
}

.powered-by-icon {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.powered-by-link:hover .powered-by-icon {
    transform: scale(1.2);
}
/* ── animations ── */

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* ── responsive ── */

@media (max-width: 600px) {
    .title {
        font-size: clamp(1.92rem, 7.2vw, 2.56rem);
        letter-spacing: 0.04em;
        margin-bottom: 40px;
    }

    .metrics {
        flex-direction: column;
        gap: 36px;
    }

    .metric-divider {
        width: 84px;
        height: 1px;
        margin: 0;
    }

    .metric-label {
        font-size: clamp(1.2rem, 4.8vw, 1.5rem);
    }

    .metric-value {
        font-size: clamp(4.4rem, 18vw, 6.4rem);
    }

    .bottom-bar {
        bottom: 24px;
    }
}
