/* BDV Annacon 0x7EA — Back to the Future theme */

@font-face {
    font-family: 'DSEG7';
    src: url('/fonts/DSEG7Classic-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: block;
}

@font-face {
    font-family: 'DSEG14';
    src: url('/fonts/DSEG14Classic-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: block;
}

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

:root {
    --bg-primary: #05070f;
    --primary-bg:
        radial-gradient(ellipse at 50% -10%, rgba(0, 140, 255, 0.22) 0%, transparent 55%),
        radial-gradient(ellipse at 0% 110%, rgba(255, 90, 0, 0.16) 0%, transparent 45%),
        radial-gradient(ellipse at 100% 110%, rgba(255, 90, 0, 0.16) 0%, transparent 45%),
        linear-gradient(180deg, #070b1a 0%, #05070f 60%, #090507 100%);

    --electric: #36b9ff;
    --electric-light: #a8e6ff;
    --electric-glow: rgba(0, 170, 255, 0.55);
    --flame-yellow: #ffe14d;
    --flame-orange: #ff8a00;
    --flame-red: #ff3d00;
    --flame-gradient: linear-gradient(180deg, #fff7a8 0%, var(--flame-yellow) 22%, var(--flame-orange) 58%, var(--flame-red) 85%, #c40000 100%);
    --chrome-gradient: linear-gradient(180deg, #ffffff 0%, #dff4ff 45%, #8fb7cc 55%, #f2fbff 100%);

    --accent-color: var(--electric);
    --text-primary: #ffffff;
    --text-secondary: #b3bfd1;
    --text-muted: #7f8aa0;
    --border-color: rgba(54, 185, 255, 0.18);
    --panel-bg: rgba(7, 11, 24, 0.74);
    --success-color: #3dff6e;
    --warning-color: #ffb300;
    --error-color: #ff4747;
    --blood-color: #ff3b5c;
    --gold: #ffd23f;
    --silver: #d6dee8;
    --bronze: #e08a4a;

    --tc-red: #ff2b2b;
    --tc-green: #3dff6e;
    --tc-amber: #ffb300;

    --footer-h: 72px;
}

[hidden] {
    display: none !important;
}

html {
    background: var(--bg-primary);
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--primary-bg);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1.5rem 2rem calc(var(--footer-h) + 1.5rem);
}

/* ==========================================
   FLUX CAPACITOR (background)
   ========================================== */

.flux-capacitor {
    position: fixed;
    top: 55%;
    left: 50%;
    width: 0;
    height: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.16;
    filter: drop-shadow(0 0 12px rgba(160, 225, 255, 0.9));
    animation: fluxGlow 3s ease-in-out infinite;
}

.flux-capacitor::after {
    content: '';
    position: absolute;
    width: 3.5vmin;
    height: 3.5vmin;
    left: -1.75vmin;
    top: -1.75vmin;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 0%, #a8e6ff 40%, transparent 70%);
}

.flux-capacitor span {
    position: absolute;
    top: 0;
    left: -0.6vmin;
    width: 1.2vmin;
    height: 34vmin;
    transform-origin: 50% 0;
    border-radius: 1vmin;
    background:
        repeating-linear-gradient(to bottom, transparent 0 2.2vmin, rgba(235, 250, 255, 0.95) 2.2vmin 3vmin, transparent 3vmin 5vmin),
        linear-gradient(to bottom, rgba(168, 230, 255, 0.6), rgba(54, 185, 255, 0.15));
    background-size: 100% 5vmin, 100% 100%;
    animation: fluxFlow 0.7s linear infinite;
}

.flux-capacitor span:nth-child(1) { transform: rotate(0deg); }
.flux-capacitor span:nth-child(2) { transform: rotate(120deg); }
.flux-capacitor span:nth-child(3) { transform: rotate(-120deg); }

@keyframes fluxFlow {
    from { background-position: 0 5vmin, 0 0; }
    to { background-position: 0 0, 0 0; }
}

@keyframes fluxGlow {
    0%, 100% { opacity: 0.12; }
    50% { opacity: 0.2; }
}

/* ==========================================
   HEADER
   ========================================== */

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-width: 0;
}

.header-logo {
    width: auto;
    height: 150px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 18px rgba(0, 150, 255, 0.45));
}

.header-titles {
    min-width: 0;
}

.title {
    font-family: 'Exo 2', 'Inter', sans-serif;
    font-style: italic;
    font-weight: 900;
    font-size: 3.6rem;
    line-height: 1;
    letter-spacing: 0.01em;
    padding-right: 0.15em;
    background: var(--flame-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter:
        drop-shadow(0 0 1px var(--electric-light))
        drop-shadow(0 3px 0 #0b3e8c)
        drop-shadow(0 0 16px var(--electric-glow));
    margin-bottom: 0.75rem;
}

.ctf-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
}

.ctf-status {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.ctf-status .fas {
    color: var(--flame-orange);
}

.live-status,
.freeze-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    border: 1px solid currentColor;
    background: rgba(0, 0, 0, 0.35);
}

.live-status { color: var(--text-secondary); }
.live-status[data-state="live"] { color: var(--success-color); }
.live-status[data-state="stale"] { color: var(--warning-color); }
.live-status[data-state="error"] { color: var(--error-color); }

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
}

.live-status[data-state="live"] .live-dot {
    animation: livePulse 2s ease-in-out infinite;
}

.freeze-badge {
    color: var(--electric-light);
}

.freeze-badge .fas {
    margin-right: 0;
}

@keyframes livePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(61, 255, 110, 0.6); }
    50% { box-shadow: 0 0 0 6px rgba(61, 255, 110, 0); }
}

/* Fire trails under the header */
.fire-trails {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 1.25rem 0 1.5rem;
    pointer-events: none;
}

.fire-trails span {
    display: block;
    height: 3px;
    border-radius: 3px;
    background:
        linear-gradient(90deg, transparent 0%, rgba(255, 61, 0, 0.0) 4%, var(--flame-red) 20%, var(--flame-orange) 55%, var(--flame-yellow) 85%, #fff8c4 97%, transparent 100%);
    box-shadow: 0 0 10px rgba(255, 110, 0, 0.8), 0 0 22px rgba(255, 60, 0, 0.45);
    animation: flicker 2.4s ease-in-out infinite;
}

.fire-trails span:nth-child(2) {
    animation-delay: -1.1s;
    opacity: 0.85;
}

.fire-trails.small {
    margin: 0.9rem auto 0;
    width: 70%;
    gap: 5px;
}

.fire-trails.small span {
    height: 2px;
}

@keyframes flicker {
    0%, 100% { opacity: 0.95; filter: brightness(1); }
    20% { opacity: 0.75; }
    35% { opacity: 1; filter: brightness(1.25); }
    60% { opacity: 0.8; }
    80% { opacity: 1; filter: brightness(1.1); }
}

/* ==========================================
   TIME CIRCUITS
   ========================================== */

.time-circuits {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.6rem;
    border-radius: 10px;
    background: linear-gradient(180deg, #2b2f36 0%, #1a1d22 50%, #23272d 100%);
    border: 1px solid #454b55;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 30px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

.tc-row {
    --led: var(--tc-green);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.6rem 0.4rem;
    border-radius: 6px;
    background: linear-gradient(180deg, #16181c, #0f1114);
    border: 1px solid #33373e;
}

.tc-red { --led: var(--tc-red); }
.tc-green { --led: var(--tc-green); }
.tc-amber { --led: var(--tc-amber); }

.tc-fields {
    display: flex;
    align-items: flex-end;
    gap: 0.55rem;
}

.tc-field {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.tc-plate {
    font-family: 'Inter', sans-serif;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: #e9edf2;
    background: #3a0d0d;
    padding: 0.05rem 0.4rem;
    border-radius: 2px;
}

.tc-amber .tc-plate { background: #3a2a05; }
.tc-green .tc-plate { background: #0c3315; }

.tc-display {
    position: relative;
    display: inline-block;
    font-family: 'DSEG7', 'JetBrains Mono', monospace;
    font-size: 1.75rem;
    line-height: 1;
    padding: 0.3rem 0.4rem;
    border-radius: 3px;
    color: var(--led);
    background: #050505;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.9), 0 0 0 1px #000;
    text-shadow: 0 0 6px var(--led), 0 0 14px color-mix(in srgb, var(--led) 60%, transparent);
    font-variant-numeric: tabular-nums;
    white-space: pre;
}

.tc-display.seg14 {
    font-family: 'DSEG14', 'JetBrains Mono', monospace;
}

/* Unlit segments behind the digits, like a real LED display. */
.tc-display::before {
    content: attr(data-ghost);
    position: absolute;
    inset: 0.3rem 0.4rem;
    color: var(--led);
    opacity: 0.1;
    text-shadow: none;
}

.tc-colon {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding-bottom: 0.65rem;
}

.tc-colon span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--led);
    box-shadow: 0 0 6px var(--led);
}

.tc-colon.blink span {
    animation: colonBlink 1s steps(1, end) infinite;
}

@keyframes colonBlink {
    50% { opacity: 0.15; box-shadow: none; }
}

.tc-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    padding: 0.12rem 0.9rem;
    border-radius: 2px;
    color: #f2f2f2;
    background: linear-gradient(180deg, #111, #000);
    border: 1px solid #3c3c3c;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.tc-amber[data-phase="final"] .tc-display {
    animation: finalPulse 1s ease-in-out infinite;
}

.tc-amber[data-phase="final"] {
    --led: var(--tc-red);
}

.tc-amber[data-phase="ended"] .tc-display {
    opacity: 0.55;
}

@keyframes finalPulse {
    50% { filter: brightness(1.6); }
}

/* ==========================================
   PANELS
   ========================================== */

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.panel {
    position: relative;
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem 1.75rem 1.75rem;
    backdrop-filter: blur(10px);
    box-shadow: inset 0 0 50px rgba(0, 140, 255, 0.06), 0 20px 50px rgba(0, 0, 0, 0.35);
    min-width: 0;
}

.panel::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--electric), var(--electric-light), var(--electric), transparent);
    box-shadow: 0 0 12px var(--electric-glow);
}

.section-title {
    font-family: 'Exo 2', 'Inter', sans-serif;
    font-style: italic;
    font-weight: 800;
    font-size: 1.45rem;
    color: #eaf7ff;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 0 14px rgba(0, 170, 255, 0.45);
}

.section-count {
    font-family: 'Inter', sans-serif;
    font-style: normal;
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.75em;
    margin-left: 0.5rem;
    text-shadow: none;
}

.panel-body {
    scrollbar-width: thin;
    scrollbar-color: var(--electric) transparent;
}

.scoreboard,
.submissions-list {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.placeholder {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-style: italic;
}

.placeholder.error {
    color: var(--error-color);
    font-style: normal;
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--border-color);
    border-top-color: var(--electric);
    border-radius: 50%;
    vertical-align: -2px;
    margin-right: 0.5rem;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================
   SCOREBOARD
   ========================================== */

.scoreboard {
    gap: 0.5rem;
}

.scoreboard-entry {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 0.9rem 1.4rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.scoreboard-entry::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--electric-light), var(--electric));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scoreboard-entry:hover::before {
    opacity: 1;
}

.scoreboard-entry:hover {
    border-color: var(--border-color);
    background: rgba(54, 185, 255, 0.06);
}

.rank {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-family: 'Exo 2', 'Inter', sans-serif;
    font-style: italic;
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text-secondary);
    min-width: 64px;
}

.rank .rank-icon {
    margin-right: 0;
    font-size: 0.85em;
}

.rank-icon.gold { color: var(--gold); filter: drop-shadow(0 0 6px rgba(255, 200, 0, 0.6)); }
.rank-icon.silver { color: var(--silver); }
.rank-icon.bronze { color: var(--bronze); }

.team-info {
    margin-left: 1.25rem;
    min-width: 0;
}

.team-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bracket {
    margin-left: 0.5rem;
    padding: 0.05rem 0.45rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    vertical-align: middle;
    color: var(--electric-light);
    border: 1px solid var(--border-color);
}

.team-score-info {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.score {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--flame-yellow);
    text-shadow: 0 0 12px rgba(255, 138, 0, 0.55);
    text-align: right;
    margin-left: 1rem;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.scoreboard-entry.top-1 {
    background: linear-gradient(100deg, rgba(255, 190, 0, 0.2), rgba(255, 70, 0, 0.1) 60%, rgba(255, 255, 255, 0.02));
    border-color: rgba(255, 190, 0, 0.55);
    box-shadow: 0 0 24px rgba(255, 120, 0, 0.2), inset 0 0 20px rgba(255, 160, 0, 0.08);
}

.scoreboard-entry.top-1 .team-name {
    background: var(--flame-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.scoreboard-entry.top-2 {
    background: linear-gradient(100deg, rgba(214, 222, 232, 0.14), rgba(255, 255, 255, 0.02));
    border-color: rgba(214, 222, 232, 0.35);
}

.scoreboard-entry.top-3 {
    background: linear-gradient(100deg, rgba(224, 138, 74, 0.14), rgba(255, 255, 255, 0.02));
    border-color: rgba(224, 138, 74, 0.35);
}

.scoreboard-entry.top-1 .rank { color: var(--gold); }
.scoreboard-entry.top-2 .rank { color: var(--silver); }
.scoreboard-entry.top-3 .rank { color: var(--bronze); }

/* ==========================================
   SUBMISSIONS FEED
   ========================================== */

.submissions-list {
    gap: 0.65rem;
}

.submission-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 0.85rem 1.4rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.submission-item:hover {
    border-color: var(--border-color);
    background: rgba(54, 185, 255, 0.06);
}

.submission-item.is-new {
    animation: newSolve 3s ease-out;
}

.submission-item.first-blood {
    border-color: rgba(255, 59, 92, 0.4);
    background: linear-gradient(90deg, rgba(255, 59, 92, 0.1), rgba(255, 255, 255, 0.02) 60%);
}

@keyframes newSolve {
    0% { background: rgba(54, 185, 255, 0.25); border-color: var(--electric-light); box-shadow: 0 0 24px var(--electric-glow); }
    100% { background: rgba(255, 255, 255, 0.03); border-color: rgba(255, 255, 255, 0.05); box-shadow: none; }
}

.submission-score {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 700;
    color: var(--electric-light);
    text-shadow: 0 0 10px var(--electric-glow);
    min-width: 64px;
    text-align: center;
    white-space: nowrap;
}

.submission-info {
    margin-left: 1rem;
    min-width: 0;
}

.submission-challenge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
    min-width: 0;
}

.challenge-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.first-blood-tag {
    flex-shrink: 0;
    margin-left: 0.5rem;
    padding: 0.1rem 0.45rem;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--blood-color);
    border: 1px solid rgba(255, 59, 92, 0.5);
    background: rgba(255, 59, 92, 0.1);
}

.first-blood-tag .fas {
    margin-right: 0.3rem;
}

.submission-team {
    font-size: 0.9rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.submission-team .solver {
    color: var(--text-muted);
}

.submission-category {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.2rem;
}

.submission-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: right;
    margin-left: 1rem;
    white-space: nowrap;
}

/* ==========================================
   ICONS
   ========================================== */

.fas, .far, .fab {
    margin-right: 0.5rem;
}

.section-title .fas {
    color: var(--flame-orange);
    margin-right: 0.75rem;
    filter: drop-shadow(0 0 6px rgba(255, 120, 0, 0.6));
}

.rank .fas,
.submission-score .fas,
.submission-team .fas,
.submission-time .fas,
.team-score-info .fas,
.score .fas {
    margin-right: 0.3rem;
}

.submission-challenge .fas { color: var(--electric); }
.team-score-info .fas { color: var(--electric); }
.submission-score .fas { color: var(--electric); }
.submission-team .fas,
.submission-time .fas { color: var(--text-muted); }
.score .fas {
    color: var(--electric-light);
    text-shadow: 0 0 10px var(--electric-glow);
}

.category-icon-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
    border-radius: 4px;
    background: rgba(54, 185, 255, 0.1);
    flex-shrink: 0;
}

.category-icon {
    width: 14px;
    height: 14px;
    color: var(--accent-color);
}

.category-icon-container[data-category="OSINT"] { background: rgba(76, 175, 80, 0.12); }
.category-icon-container[data-category="OSINT"] .category-icon { color: #4CAF50; }
.category-icon-container[data-category="CRYPTO"] { background: rgba(255, 152, 0, 0.12); }
.category-icon-container[data-category="CRYPTO"] .category-icon { color: #FF9800; }
.category-icon-container[data-category="WEB"] { background: rgba(33, 150, 243, 0.12); }
.category-icon-container[data-category="WEB"] .category-icon { color: #42A5F5; }
.category-icon-container[data-category="FORENSICS"] { background: rgba(156, 39, 176, 0.12); }
.category-icon-container[data-category="FORENSICS"] .category-icon { color: #BA68C8; }
.category-icon-container[data-category="REVERSE ENGINEERING"] { background: rgba(244, 67, 54, 0.12); }
.category-icon-container[data-category="REVERSE ENGINEERING"] .category-icon { color: #F44336; }
.category-icon-container[data-category="NETWORK"] { background: rgba(0, 188, 212, 0.12); }
.category-icon-container[data-category="NETWORK"] .category-icon { color: #00BCD4; }
.category-icon-container[data-category="AI"] { background: rgba(103, 58, 183, 0.12); }
.category-icon-container[data-category="AI"] .category-icon { color: #9575CD; }
.category-icon-container[data-category="QUANTUM"] { background: rgba(233, 30, 99, 0.12); }
.category-icon-container[data-category="QUANTUM"] .category-icon { color: #EC407A; }
.category-icon-container[data-category="MISC"] { background: rgba(158, 158, 158, 0.12); }
.category-icon-container[data-category="MISC"] .category-icon { color: #BDBDBD; }

/* ==========================================
   FIRST BLOOD BANNER
   ========================================== */

.first-blood-banner {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    min-width: min(620px, 90vw);
    padding: 1rem 2.5rem 1.1rem;
    text-align: center;
    border-radius: 16px;
    border: 1px solid var(--electric);
    background: linear-gradient(180deg, rgba(10, 18, 40, 0.97), rgba(5, 7, 15, 0.97));
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 40px var(--electric-glow), 0 0 90px rgba(255, 90, 0, 0.25);
}

.first-blood-kicker {
    font-family: 'Exo 2', sans-serif;
    font-style: italic;
    font-weight: 800;
    letter-spacing: 0.3em;
    font-size: 0.85rem;
    color: var(--electric-light);
}

.first-blood-title {
    font-family: 'Exo 2', sans-serif;
    font-style: italic;
    font-weight: 900;
    font-size: 2.4rem;
    letter-spacing: 0.06em;
    background: var(--flame-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 0 #0b3e8c) drop-shadow(0 0 12px var(--electric-glow));
}

.first-blood-title .fas {
    margin: 0 0.4rem;
    -webkit-text-fill-color: var(--electric-light);
    font-size: 0.75em;
}

.first-blood-detail {
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.first-blood-detail strong {
    color: var(--text-primary);
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--footer-h);
    background: linear-gradient(180deg, rgba(10, 14, 30, 0.96), rgba(5, 7, 15, 0.98));
    backdrop-filter: blur(10px);
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--electric) 18%, var(--electric-light) 35%, var(--flame-yellow) 55%, var(--flame-orange) 72%, var(--flame-red) 88%, transparent 100%);
    box-shadow: 0 0 14px rgba(255, 120, 0, 0.5), 0 0 10px var(--electric-glow);
}

.footer-content {
    max-width: 1600px;
    height: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.sponsor {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.sponsor-logo-img {
    display: block;
    height: 46px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 8px var(--electric-glow));
}

.sponsor-title {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.footer-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
    text-align: right;
}

.footer-copy {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-hex {
    margin-left: 0.4rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--electric-light);
    text-shadow: 0 0 8px var(--electric-glow);
}

.footer-love {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.noscript {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: var(--bg-primary);
    color: var(--text-secondary);
    z-index: 3000;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

/* Large screens / projectors: both panels fill the viewport between header and footer. */
@media (min-width: 1201px) {
    .container {
        height: 100vh;
        display: flex;
        flex-direction: column;
    }

    .main-content {
        flex: 1;
        min-height: 0;
        align-items: stretch;
    }

    .panel {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .panel-body {
        flex: 1;
        min-height: 0;
        overflow: hidden;
        mask-image: linear-gradient(to bottom, #000 calc(100% - 32px), transparent);
    }

    #scoreboard-scroller:hover {
        overflow-y: auto;
    }

    /* Compact header: circuits side by side so the panels get the vertical space. */
    .header-logo { height: 96px; }
    .title { font-size: 2.9rem; margin-bottom: 0.5rem; }
    .time-circuits { flex-direction: row; align-items: stretch; }
    .tc-display { font-size: 1.3rem; }
    .fire-trails { margin: 0.9rem 0 1.1rem; }
    #tc-present { display: none; }
}

@media (min-width: 1700px) {
    #tc-present { display: flex; }
}

@media (min-width: 1800px) {
    .container,
    .footer-content { max-width: 1840px; }
    .header-logo { height: 110px; }
    .title { font-size: 3.2rem; }
    .tc-display { font-size: 1.5rem; }
    .team-name { font-size: 1.3rem; }
    .score, .rank { font-size: 1.8rem; }
    .challenge-name { font-size: 1.1rem; }
}

@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .header {
        flex-direction: column;
        align-items: stretch;
    }

    .time-circuits {
        align-self: center;
    }
}

@media (max-width: 768px) {
    :root {
        --footer-h: 92px;
    }

    .container {
        padding: 1rem 1rem calc(var(--footer-h) + 1rem);
    }

    .header-left {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .header-logo {
        height: 120px;
    }

    .title {
        font-size: 2.6rem;
    }

    .ctf-info {
        justify-content: center;
    }

    .time-circuits {
        width: 100%;
    }

    .tc-fields {
        gap: 0.3rem;
    }

    .tc-display {
        font-size: 1.05rem;
        padding: 0.25rem 0.3rem;
    }

    .tc-display::before {
        inset: 0.25rem 0.3rem;
    }

    .tc-plate {
        font-size: 0.5rem;
        letter-spacing: 0.08em;
    }

    .tc-colon {
        gap: 0.3rem;
        padding-bottom: 0.45rem;
    }

    .tc-colon span {
        width: 4px;
        height: 4px;
    }

    .panel {
        padding: 1.25rem;
    }

    .scoreboard-entry,
    .submission-item {
        padding: 0.75rem 1rem;
    }

    .rank {
        min-width: 48px;
        font-size: 1.3rem;
    }

    .team-info {
        margin-left: 0.75rem;
    }

    .score {
        font-size: 1.25rem;
    }

    .footer-content {
        flex-direction: column;
        justify-content: center;
        gap: 0.4rem;
        padding: 0 1rem;
    }

    .sponsor-logo-img {
        height: 32px;
    }

    .footer-info {
        align-items: center;
        text-align: center;
    }

    .footer-love {
        display: none;
    }

    .first-blood-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2.1rem;
    }

    .submission-item {
        grid-template-columns: auto 1fr;
    }

    .submission-time {
        grid-column: 2;
        text-align: left;
        margin-left: 1rem;
    }

    .submission-score {
        min-width: 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
