/* Agzamov Test — The Broadcast */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #000;
    --bg-panel: #0a0a0a;
    --border: #222;
    --text: #d8e0d8;
    --text-muted: #889088;
    --accent: #00ff00;
    --accent-dim: rgba(0, 255, 0, 0.08);
    --accent-glow: rgba(0, 255, 136, 0.15);
    --red: #ff4444;
    --font: "JetBrains Mono", ui-monospace, monospace;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-shadow: 0.5px 0.5px 1px var(--accent-glow);
}

/* CRT grid */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 255, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 0, 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    z-index: 9999;
}

/* Scanlines */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg, transparent, transparent 2px,
        rgba(0, 0, 0, 0.06) 2px, rgba(0, 0, 0, 0.06) 4px
    );
    pointer-events: none;
    z-index: 9999;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { text-decoration: underline; }

.container { max-width: 960px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

.muted { color: var(--text-muted); font-size: 0.9rem; }
.hl { color: var(--accent); }

/* --- Progress Bar --- */

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    z-index: 10000;
    width: 0;
    transition: width 0.1s linear;
}

/* --- Hero --- */

.hero {
    text-align: center;
    padding: 100px 0 72px;
    position: relative;
    overflow: hidden;
}

/* Radial glow behind hero */
.hero::before {
    content: "";
    position: absolute;
    top: 30%;
    left: 50%;
    width: 800px;
    height: 800px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 0, 0.06) 0%, rgba(0, 255, 0, 0.02) 35%, transparent 70%);
    animation: hero-breathe 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes hero-breathe {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

.hero-badge {
    display: inline-block;
    padding: 5px 20px;
    border: 1px solid rgba(0, 255, 0, 0.4);
    border-radius: 2px;
    font-size: 0.65rem;
    letter-spacing: 4px;
    color: var(--accent);
    margin-bottom: 32px;
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.4);
    background: rgba(0, 255, 0, 0.04);
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    color: var(--accent);
    text-shadow:
        0 0 10px rgba(0, 255, 0, 0.5),
        0 0 40px rgba(0, 255, 0, 0.2),
        0 0 80px rgba(0, 255, 0, 0.08);
    line-height: 1.1;
}

.tagline {
    font-size: 1.15rem;
    color: var(--text);
    max-width: 540px;
    margin: 0 auto 48px;
    line-height: 1.8;
}

.tagline-sub {
    color: var(--text-muted);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

/* Matchup card — framed esports style */
.matchup-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0 auto 48px;
    max-width: 480px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.015);
    overflow: hidden;
}

.matchup-side {
    text-align: center;
    flex: 1;
    padding: 24px 20px;
}

.side-icon {
    font-size: 2.8rem;
    line-height: 1;
    margin-bottom: 10px;
}

.side-a .side-icon { color: var(--accent); text-shadow: 0 0 16px rgba(0, 255, 0, 0.35); }
.side-b .side-icon { color: var(--red); text-shadow: 0 0 16px rgba(255, 68, 68, 0.35); }

.side-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.side-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.matchup-vs {
    font-size: 0.75rem;
    font-weight: 700;
    color: #444;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 0 4px;
    position: relative;
    flex-shrink: 0;
}

.matchup-vs::before,
.matchup-vs::after {
    content: "";
    position: absolute;
    left: 50%;
    width: 1px;
    height: 20px;
    background: var(--border);
    transform: translateX(-50%);
}
.matchup-vs::before { bottom: 100%; margin-bottom: 4px; }
.matchup-vs::after { top: 100%; margin-top: 4px; }

/* Hero stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 48px;
}

.stat {
    text-align: center;
    padding: 0 36px;
    position: relative;
}

.stat + .stat::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: var(--border);
}

.stat-num {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--accent);
    text-shadow: 0 0 16px rgba(0, 255, 0, 0.3);
    line-height: 1;
}

.stat-pct {
    font-size: 1.6rem;
    color: var(--accent);
    opacity: 0.6;
}

.stat-label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 8px;
}

/* Hero buttons */
.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-primary {
    padding: 12px 32px;
    background: var(--accent);
    color: #000;
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 2px;
    transition: all 0.2s;
    text-shadow: none;
    text-transform: uppercase;
}
.btn-primary:hover {
    text-decoration: none;
    box-shadow: 0 0 24px rgba(0, 255, 0, 0.5), 0 0 48px rgba(0, 255, 0, 0.15);
    transform: translateY(-1px);
}

.btn-secondary {
    padding: 12px 28px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    border-radius: 2px;
    transition: all 0.2s;
}
.btn-secondary:hover {
    text-decoration: none;
    border-color: var(--accent);
    color: var(--text);
    background: var(--accent-dim);
    transform: translateY(-1px);
}

/* --- Segment breaks --- */

.segment-break {
    width: 100%;
    height: 48px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(0, 255, 0, 0.04) 20%,
        rgba(0, 255, 0, 0.06) 50%,
        rgba(0, 255, 0, 0.04) 80%,
        transparent 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
}
.segment-break::after {
    content: attr(data-label);
    font-size: 10px;
    letter-spacing: 3px;
    color: #333;
    text-transform: uppercase;
}

/* --- Watch Links --- */

.watch-links {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

.watch-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text);
    transition: all 0.2s;
    min-width: 200px;
}

.watch-card:hover {
    text-decoration: none;
    border-color: var(--accent);
    background: var(--accent-dim);
}

.watch-icon {
    font-size: 1.2rem;
    color: var(--accent);
    opacity: 0.6;
}

.watch-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.watch-status {
    margin-left: auto;
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* --- Sections --- */

.section {
    padding: 64px 0;
    border-bottom: 1px solid var(--border);
}

.section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text);
    text-shadow: 2px 0 1px rgba(0, 255, 136, 0.2), 0 0 4px rgba(0, 255, 136, 0.1);
}

.section p { margin-bottom: 12px; max-width: 720px; }

.lead {
    font-size: 1.15rem;
    color: var(--text);
    margin-bottom: 16px !important;
}

/* --- Annotated Screenshot --- */

.section-screenshot {
    padding: 48px 0;
    border: none;
}

.annotated-screenshot {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.screenshot-img {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 2px;
    display: block;
    transition: transform 0.4s ease;
}

.screenshot-img:hover {
    transform: scale(1.01);
}

.callout {
    position: absolute;
    background: rgba(0, 0, 0, 0.88);
    border: 1px solid var(--accent);
    border-radius: 2px;
    padding: 6px 14px;
    font-size: 0.7rem;
    color: var(--text);
    white-space: nowrap;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s, transform 0.4s;
    pointer-events: none;
}

.callout.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Position callouts over the screenshot */
.callout-1 { top: 20%; left: 2%; }
.callout-2 { top: 35%; right: 2%; }
.callout-3 { top: 55%; right: 2%; }
.callout-4 { bottom: 18%; right: 2%; }

/* --- Protocol Grid --- */

.protocol-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.protocol-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 20px 24px;
    transition: all 0.2s;
}

.protocol-card:hover {
    background: var(--accent-dim);
    border-color: rgba(0, 255, 0, 0.2);
}

.protocol-card.done {
    border-left: 3px solid var(--accent);
}

.protocol-card.active {
    border-left: 3px solid var(--accent);
    background: rgba(0, 255, 0, 0.03);
}

.protocol-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.protocol-num {
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 50%;
    border: 2px solid var(--border);
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.protocol-card.done .protocol-num {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 6px rgba(0, 255, 0, 0.2);
}

.protocol-card.active .protocol-num {
    border-color: var(--accent);
    background: var(--accent);
    color: #000;
}

.protocol-status {
    font-size: 0.6rem;
    letter-spacing: 2px;
    color: #444;
    text-transform: uppercase;
}

.protocol-card.done .protocol-status { color: var(--accent); }
.protocol-card.active .protocol-status { color: var(--accent); }

.protocol-status.pulse {
    animation: status-pulse 2s ease-in-out infinite;
}

@keyframes status-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.protocol-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.protocol-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.protocol-result {
    margin-top: 10px;
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 1px;
}

/* --- Carousel --- */

.carousel {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.carousel-slide {
    display: none;
}

.carousel-slide.active {
    display: block;
}

.slide-caption {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 12px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s;
}

.dot.active {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 6px rgba(0, 255, 0, 0.3);
}

.dot:hover {
    border-color: var(--accent);
}

code {
    background: rgba(0, 255, 0, 0.08);
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 0.85em;
    color: var(--accent);
}

/* --- Concepts Grid --- */

.concepts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 24px;
}

.concept-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-left: 2px solid var(--accent);
    border-radius: 2px;
    padding: 24px;
    transition: background 0.2s;
}

.concept-card:hover { background: var(--accent-dim); }

.concept-card h3 {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 4px;
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
}

.concept-name {
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 12px !important;
    font-weight: 600;
}

.concept-card p:last-child {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* --- Footer --- */

.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 12px;
}

.footer-cite {
    font-size: 0.8rem;
    color: var(--text-muted);
    max-width: 560px;
    line-height: 1.5;
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-shrink: 0;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.footer-links a:hover { color: var(--accent); }

.footer-legal {
    font-size: 0.75rem;
    color: #444;
}
.footer-legal a { color: #555; }

/* --- Responsive --- */

@media (max-width: 768px) {
    .hero { padding: 64px 0 48px; }
    .hero h1 { font-size: 2.5rem; }
    .tagline { font-size: 0.95rem; margin-bottom: 36px; }
    .section { padding: 40px 0; }

    .matchup-card { max-width: 100%; }
    .matchup-side { padding: 16px 12px; }
    .side-icon { font-size: 2rem; }
    .hero-stats { gap: 0; }
    .stat { padding: 0 20px; }
    .stat-num { font-size: 2rem; }

    .protocol-grid { grid-template-columns: 1fr; }
    .concepts-grid { grid-template-columns: 1fr; }
    .footer-grid { flex-direction: column; }

    .callout { display: none; }

    .broadcast-bottombar { gap: 16px; font-size: 0.6rem; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.8rem; }
    .container, .container-wide { padding: 0 16px; }
    .concept-card { padding: 16px; }
    .matchup-card { flex-direction: column; border: none; background: none; }
    .matchup-side { padding: 12px; border: 1px solid var(--border); border-radius: 3px; }
    .matchup-vs::before, .matchup-vs::after { display: none; }
    .hero-actions { flex-direction: column; align-items: center; }
}
