.timer-hero {
    position: relative;
    max-width: 1180px;
    margin: 0 auto;
    padding-top: clamp(48px, 8vw, 112px);
}

.hero-top {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.82fr);
    align-items: center;
    gap: clamp(36px, 6vw, 84px);
}

.hero-top .section-heading {
    min-width: 0;
}

.timer-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4.8rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.035em;
    max-width: 650px;
    margin-top: 12px;
    background: linear-gradient(180deg, #ffffff 40%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-top .panel-visual {
    justify-self: end;
    width: min(100%, 480px);
    margin: 0;
    transform: translateY(8px);
}

.hero-top .panel-visual::before {
    content: "";
    position: absolute;
    inset: 12% 8%;
    background: radial-gradient(circle, rgba(104, 224, 119, 0.18), rgba(111, 76, 255, 0.08) 45%, transparent 72%);
    filter: blur(32px);
    pointer-events: none;
}

.hero-copy {
    max-width: 560px;
    margin-top: 18px;
    color: var(--text-secondary);
    font-size: clamp(1rem, 2vw, 1.22rem);
}

.timer-container {
    position: relative;
    isolation: isolate;
    margin-top: clamp(36px, 6vw, 70px);
    padding: clamp(24px, 5vw, 56px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 28px;
    background:
        radial-gradient(circle at 50% -20%, rgba(255, 255, 255, 0.14), transparent 38%),
        linear-gradient(145deg, rgba(17, 17, 21, 0.96), rgba(5, 5, 7, 0.98));
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.timer-container::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.22;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.timer-topline,
.timer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.source-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 30px;
    padding: 5px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.045);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.72rem;
}

.source-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.7);
}

.source-badge[data-state="live"] .source-dot {
    background: var(--accent-green);
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.75);
}

.source-badge[data-state="loading"] .source-dot {
    animation: source-pulse 1.4s ease-in-out infinite;
}

.timer-kicker {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.timer-label {
    margin: clamp(42px, 7vw, 78px) 0 22px;
    color: var(--text-secondary);
    font-size: clamp(0.92rem, 2vw, 1.08rem);
    font-weight: 500;
    text-align: center;
}

.timer-display {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) repeat(3, auto minmax(0, 1fr));
    align-items: start;
    gap: clamp(7px, 1.8vw, 24px);
    font-family: var(--font-mono);
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.time-unit {
    display: grid;
    min-width: 0;
    gap: 10px;
    text-align: center;
}

.time-value {
    display: block;
    overflow: hidden;
    color: #fff;
    font-size: clamp(2.3rem, 7vw, 6.9rem);
    font-weight: 600;
    line-height: 0.95;
    letter-spacing: -0.08em;
    text-overflow: clip;
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.08);
}

.time-label {
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: clamp(0.67rem, 1.2vw, 0.82rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.time-separator {
    color: var(--text-subtle);
    font-size: clamp(1.8rem, 5.5vw, 5rem);
    font-weight: 300;
    line-height: 0.95;
}

.timer-footer {
    margin-top: clamp(42px, 7vw, 76px);
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.82rem;
}

.timer-footer time {
    color: var(--text-secondary);
}

.timer-footer a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-weight: 600;
}

.timer-footer a:hover {
    color: #fff;
}

.timer-footer i {
    font-size: 0.7rem;
}

.secondary-content {
    max-width: 1180px;
    margin: 0 auto;
    padding-top: 28px;
    padding-bottom: 80px;
}

.panel-info {
    padding: 32px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    background: rgba(12, 12, 15, 0.75);
    backdrop-filter: blur(20px);
}

.panel-info h3 {
    margin-top: 12px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.panel-note {
    margin-top: 18px;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-style: italic;
}

.panel-visual {
    position: relative;
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

.photo-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 512px;
    margin: 0 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(18, 17, 26, 0.98), rgba(7, 7, 10, 0.98));
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    transition: border-color 0.25s ease;
}

.photo-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 512 / 118;
    display: block;
    object-fit: cover;
    opacity: 0.92;
    filter: saturate(0.92) contrast(1.02);
    transition: opacity 0.25s ease, filter 0.25s ease;
}

.photo-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.photo-card:hover img {
    opacity: 1;
    filter: saturate(1) contrast(1.02);
}

.photo-overlay {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(90deg, rgba(17, 17, 22, 0.98), rgba(10, 10, 13, 0.98));
    padding: 10px 16px;
    border-top: 1px solid var(--border-subtle);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.photo-index {
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

@keyframes source-pulse {
    50% { opacity: 0.35; transform: scale(0.75); }
}

@keyframes timer-scan {
    0%, 25% { transform: translateX(0) skewX(-18deg); opacity: 0; }
    45% { opacity: 0.25; }
    70%, 100% { transform: translateX(850%) skewX(-18deg); opacity: 0; }
}

@media (max-width: 980px) {
    .site-header {
        grid-template-columns: auto minmax(0, 1fr);
        height: auto;
        border-radius: 24px;
    }

    .main-nav {
        grid-column: 1 / -1;
        justify-self: stretch;
        justify-content: flex-start;
        min-width: 0;
        width: 100%;
        padding-top: 4px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
    }

    .main-nav::-webkit-scrollbar {
        display: none;
    }

    .main-nav a {
        flex: 0 0 auto;
    }
}

@media (max-width: 860px) {
    .hero-top {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }

    .hero-top .panel-visual {
        justify-self: center;
        width: min(100%, 512px);
        transform: none;
    }

    .photo-card {
        margin: 0 auto;
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .site-header {
        gap: 10px;
        padding: 10px 12px;
    }

    .brand-tag,
    .status-pill,
    .cmd-trigger-btn kbd {
        display: none;
    }

    .header-right {
        gap: 6px;
    }

    .cmd-trigger-btn {
        width: 34px;
        height: 34px;
        justify-content: center;
        padding: 0;
    }

    .timer-hero {
        padding-top: 42px;
    }

    .timer-container {
        padding: 22px 16px 20px;
        border-radius: 22px;
    }

    .timer-topline,
    .timer-footer {
        align-items: flex-start;
        flex-direction: column;
    }


    .timer-label {
        margin-top: 42px;
    }

    .timer-display {
        gap: 5px;
    }

    .time-value {
        font-size: clamp(2rem, 12vw, 3.35rem);
    }

    .time-separator {
        font-size: clamp(1.5rem, 9vw, 2.6rem);
    }

    .time-label {
        font-size: 0.58rem;
        letter-spacing: 0.02em;
        text-transform: none;
    }

    .timer-footer {
        gap: 10px;
        margin-top: 42px;
    }

    .photo-overlay {
        padding: 8px 12px;
        font-size: 0.68rem;
    }

    .photo-index {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .source-dot,
    .timer-scanline {
        animation: none;
    }
}
