@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;600;700&family=Orbitron:wght@400;700;900&display=swap');

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

:root {
    --bg:           #0c0c0f;
    --bg-card:      #131318;
    --bg-row:       #1a1a22;
    --bg-row-alt:   #16161e;
    --accent:       #9e6232;
    --accent2:      #b87c42;
    --gold:         #c8a042;
    --text:         #d0d0e0;
    --text-dim:     #666680;
    --border:       #2a2a3a;
    --glow:         0 0 20px #9e623240;
    --glow-strong:  0 0 30px #9e623260;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Rajdhani', sans-serif;
    font-size: 16px;
    line-height: 1.4;
    min-height: 100vh;
}

/* ── BACKGROUND SLIDESHOW ────────────────────────────── */
#bg-a, #bg-b {
    position: fixed;
    inset: 0;
    z-index: -2;
    background-size: cover;
    background-position: center;
    transition: opacity 2.5s ease;
}

#bg-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to bottom, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.65) 100%);
}

/* ── HEADER ─────────────────────────────────────────── */
/* blur background band — sits behind weapon tabs (z-index 2 < 5) */
header#header-bg {
    border: none;
    padding: 0;
    height: calc(clamp(220px, 31vw, 364px) - 80px);
    background: rgba(10,10,13,0.55);
    backdrop-filter: blur(4px);
    position: relative;
    z-index: 2;
    pointer-events: none;
}

/* logo floats above everything as its own layer */
#logo-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    text-align: center;
    line-height: 0;
    z-index: 10;
    pointer-events: none;
}

.header-logo {
    display: inline-block;
    height: clamp(220px, 31vw, 364px);
    width: auto;
    object-fit: contain;
    pointer-events: none;
}

.subtitle {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    color: var(--text-dim);
    letter-spacing: 0.35em;
    margin-top: 0.5rem;
}

/* ── WEAPON TABS ─────────────────────────────────────── */
.weapon-tabs {
    display: flex;
    justify-content: center;
    background: rgba(10,10,13,0.75);
    border-bottom: 1px solid var(--border);
    border-top: 1px solid var(--border);
    padding: 0 2rem;
    overflow-x: auto;
    gap: 0;
    backdrop-filter: blur(4px);
    position: relative;
    z-index: 5;
}

.tab-btn {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-dim);
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    padding: 1.2rem 2.5rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab-btn:hover { color: var(--text); background: #ffffff08; }

.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    text-shadow: 0 0 12px var(--accent);
}

.tab-weapon-img {
    display: block;
    height: 44px;
    width: auto;
    margin: 0 auto 0.3rem;
    object-fit: contain;
    filter: brightness(0.7);
    transition: filter 0.2s;
}

.tab-btn:hover .tab-weapon-img,
.tab-btn.active .tab-weapon-img {
    filter: brightness(1);
}

.tab-btn span { display: block; }

/* ── PANELS ──────────────────────────────────────────── */
.weapon-panel { display: none; padding: 2rem; max-width: 1100px; margin: 0 auto; }
.weapon-panel.active { display: block; }

.weapon-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.panel-weapon-img {
    height: 80px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.weapon-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: var(--accent);
    text-shadow: var(--glow);
    margin: 0;
}

/* ── MAP BLOCK ───────────────────────────────────────── */
.map-block {
    margin-bottom: 2.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.map-name {
    background: #15101a;
    border-bottom: 1px solid var(--border);
    color: var(--accent2);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.22em;
    padding: 0.75rem 1.5rem;
}

/* ── RESULT TABLE ────────────────────────────────────── */
.results-table { border-collapse: collapse; width: 100%; }

.results-table th {
    background: #0f0f15;
    color: var(--text-dim);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    padding: 0.7rem 1.5rem;
    text-align: left;
}

.results-table td {
    padding: 0.7rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.results-table tbody tr { background: var(--bg-row); transition: background 0.15s; }
.results-table tbody tr:nth-child(even) { background: var(--bg-row-alt); }
.results-table tbody tr:hover { background: #1e1e2a; }

.results-table tbody tr.winner-row {
    background: #e85d0415 !important;
    border-left: 3px solid var(--accent);
}

td.rank   { color: var(--text-dim); font-size: 1rem; width: 3rem; }
td.nick   { color: #fff; font-weight: 700; font-size: 1.2rem; }
td.frags  { font-family: 'Orbitron', sans-serif; font-weight: 700; font-size: 1.25rem; color: var(--accent2); }
td.acc    { color: #90b4ff; font-weight: 600; }

.winner-row td.nick { color: var(--accent); text-shadow: 0 0 8px var(--accent); }

/* ── WEAPON PODIUM (piedestal vítěze) ────────────────── */
.weapon-podium {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, #1a1000, #220d00);
    border: 1px solid var(--accent);
    border-radius: 3px;
    box-shadow: var(--glow-strong);
    margin-bottom: 2rem;
    padding: 1.6rem 2rem;
    text-align: center;
}
.podium-trophy { font-size: 2.6rem; line-height: 1; filter: drop-shadow(0 0 16px var(--gold)); }
.podium-label  { color: var(--text-dim); font-family: 'Orbitron', sans-serif; font-size: 0.7rem; letter-spacing: 0.4em; margin-bottom: 1rem; }
.podium-name   { color: var(--gold); font-family: 'Orbitron', sans-serif; font-size: 2.2rem; font-weight: 900; text-shadow: 0 0 30px var(--gold), 0 0 60px #ffd60a50; }
.podium-name--pending { color: var(--border); font-size: 0.95rem; font-weight: 600; letter-spacing: 0.15em; text-shadow: none; opacity: 0.6; }
.podium-weapon-img { height: 112px; width: auto; object-fit: contain; margin-top: 0.5rem; filter: drop-shadow(0 0 12px var(--accent)); }

/* ── CATEGORY WINNER ─────────────────────────────────── */
.category-winner {
    background: linear-gradient(135deg, #1a1000, #220d00);
    border: 1px solid var(--accent);
    border-radius: 3px;
    box-shadow: var(--glow-strong);
    margin-top: 1.5rem;
    padding: 2rem;
    text-align: center;
}

.trophy       { font-size: 2.5rem; margin-bottom: 0.4rem; }
.winner-label { color: var(--text-dim); font-family: 'Orbitron', sans-serif; font-size: 0.7rem; letter-spacing: 0.4em; margin-bottom: 0.5rem; }
.winner-name  { color: var(--gold); font-family: 'Orbitron', sans-serif; font-size: 2.2rem; font-weight: 900; text-shadow: 0 0 30px var(--gold), 0 0 60px #ffd60a50; }

/* ── SEASON 30 DIGEST ────────────────────────────────── */
.s30-hero {
    background: linear-gradient(135deg, #1a1000, #220d00);
    border: 1px solid var(--accent);
    border-radius: 3px;
    box-shadow: var(--glow-strong);
    padding: 1.5rem 1.8rem;
    margin-bottom: 2rem;
}
.s30-hero-badge {
    display: inline-block;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.3em;
    color: var(--gold);
    border: 1px solid var(--gold);
    border-radius: 2px;
    padding: 0.25rem 0.7rem;
    margin-bottom: 0.8rem;
    text-shadow: 0 0 12px var(--gold);
}
.s30-hero-text { color: var(--text); font-size: 1.05rem; line-height: 1.6; margin: 0; }
.s30-hero-text strong { color: var(--gold); }

.s30-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.2rem;
}
.s30-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 3px;
    padding: 1.2rem 1.4rem;
}
.s30-card--warn { border-left-color: var(--gold); }
.s30-card--wide { grid-column: 1 / -1; }

/* CTA karta — odkaz na celý CZ changelog */
.s30-card--cta {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    background: linear-gradient(135deg, #1a1000, #220d00);
    border: 1px solid var(--accent);
    border-left: 3px solid var(--gold);
    box-shadow: var(--glow);
    transition: box-shadow .18s, transform .18s, border-color .18s;
}
.s30-card--cta:hover { box-shadow: var(--glow-strong); transform: translateY(-2px); border-color: var(--gold); }
.s30-cta-icon { font-size: 2rem; line-height: 1; margin-bottom: 0.4rem; filter: drop-shadow(0 0 12px var(--gold)); }
.s30-card--cta .s30-card-title { color: var(--gold); }
.s30-cta-text { color: var(--text-dim); line-height: 1.5; margin: 0 0 1rem; flex-grow: 1; }
.s30-cta-text strong { color: #fff; }
.s30-cta-go {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    color: var(--gold);
    text-shadow: 0 0 12px #ffd60a40;
}
.s30-card-lead { color: var(--text); font-size: 0.98rem; line-height: 1.5; margin: 0 0 1rem; opacity: 0.92; }
.s30-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0.4rem 2.2rem; }
.s30-sub {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    color: var(--text-dim);
    margin: 0.9rem 0 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--border);
}
.s30-cols > div > .s30-sub:first-child { margin-top: 0; }
.s30-card-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.02rem;
    color: var(--accent2);
    margin: 0 0 0.8rem;
    letter-spacing: 0.03em;
}
.s30-card--warn .s30-card-title { color: var(--gold); }
.s30-card ul { margin: 0; padding-left: 1.1rem; }
.s30-card li { color: var(--text-dim); margin-bottom: 0.5rem; line-height: 1.45; }
.s30-card li strong { color: #fff; }

.s30-source {
    display: inline-block;
    margin-top: 1.8rem;
    color: var(--accent2);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s;
}
.s30-source:hover { border-bottom-color: var(--accent2); }
.s30-links { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1.8rem; }
.s30-links .s30-source { margin-top: 0; }

/* ── PENDING placeholder ─────────────────────────────── */
.pending {
    border: 1px dashed var(--border);
    border-radius: 3px;
    color: var(--text-dim);
    font-style: italic;
    padding: 3rem;
    text-align: center;
}

/* ── OVERALL STANDINGS ───────────────────────────────── */
.overall-standings { max-width: 1100px; margin: 0 auto 4rem; padding: 0 2rem; }

.section-title {
    color: var(--gold);
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 0.2em;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    text-shadow: 0 0 20px var(--gold);
}

.standings-table { background: var(--bg-card); border: 1px solid var(--border); border-collapse: collapse; width: 100%; }

.standings-table th {
    background: #0f0f15;
    color: var(--text-dim);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.22em;
    padding: 0.7rem 1.5rem;
    text-align: left;
}

.standings-table td { border-bottom: 1px solid var(--border); padding: 1rem 1.5rem; }

.standings-table tr.champion td {
    background: linear-gradient(90deg, #1c1200, #0c0c0f);
    color: var(--gold);
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    text-shadow: 0 0 12px var(--gold);
}

/* ── TAB ICON (non-weapon tabs) ──────────────────────── */
.tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    font-size: 1.6rem;
    margin: 0 auto 0.3rem;
    line-height: 1;
}

/* ── PANEL ICON (header) ─────────────────────────────── */
.panel-icon { font-size: 2.5rem; line-height: 1; flex-shrink: 0; }

/* ── PLAYERS GRID ────────────────────────────────────── */
.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    padding-bottom: 2rem;
}

.player-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 1.75rem 1.5rem 1.5rem;
    text-align: center;
    position: relative;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.player-card:hover {
    border-color: var(--accent2);
    box-shadow: var(--glow);
}

.player-card--champion {
    border-color: var(--gold);
    background: linear-gradient(135deg, #1a1000, #0c0c15);
    box-shadow: 0 0 30px #c8a04230;
}

.player-card-crown {
    position: absolute;
    top: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.4rem;
    line-height: 1;
}

.player-nick {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 0.3rem;
    word-break: break-all;
}

.player-card--champion .player-nick {
    color: var(--gold);
    text-shadow: 0 0 16px var(--gold);
}

.player-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.player-title {
    font-size: 0.85rem;
    color: var(--text-dim);
    letter-spacing: 0.08em;
    font-style: italic;
}

.player-champion {
    font-size: 0.8rem;
    color: var(--accent);
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.06em;
    background: #9e623218;
    border: 1px solid #9e623230;
    border-radius: 2px;
    padding: 0.1rem 0.4rem;
}

.player-profile-stats {
    margin-bottom: 0.75rem;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 0;
}

.pps-row {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-bottom: 0.3rem;
}
.pps-row:last-child { margin-bottom: 0; }

.pps-item { display: flex; flex-direction: column; align-items: center; }

.pps-val {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent2);
    line-height: 1.2;
}

.pps-lbl {
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 0.15em;
    margin-top: 0.1rem;
}

.pps-row--secondary {
    font-size: 0.85rem;
    color: var(--text-dim);
    letter-spacing: 0.05em;
    gap: 1rem;
}
.pps-row--secondary strong { color: var(--text); }

.mode-tag {
    color: #fff;
}

.pps-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0.6rem 0;
    width: 100%;
}

.player-weapon-acc {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.75rem;
}

.pwa-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff05;
    border-radius: 2px;
    padding: 0.3rem 0.6rem;
}

.pwa-img { height: 20px; width: auto; object-fit: contain; filter: brightness(0.75); flex-shrink: 0; }

.pwa-acc {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent2);
    flex: 1;
    text-align: right;
}

.pwa-kill { font-size: 0.82rem; color: #90b4ff; width: 4rem; text-align: right; }

.player-no-stats {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-style: italic;
    text-align: center;
    padding: 0.75rem 0;
}

.player-audio {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.audio-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.4rem;
}

.audio-play-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-ring 2.5s ease-in-out infinite;
    transition: border-color 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.audio-btn.playing .audio-play-circle {
    animation: none;
    box-shadow: 0 0 12px #e85d0480, 0 0 28px #e85d0430;
}

.audio-icon {
    color: var(--accent);
    font-size: 1.2rem;
    line-height: 1;
    margin-left: 3px;
}

.audio-btn.playing .audio-icon { margin-left: 0; }

@keyframes pulse-ring {
    0%, 100% { box-shadow: 0 0 0 0 rgba(232, 93, 4, 0.45); }
    50%       { box-shadow: 0 0 0 9px rgba(232, 93, 4, 0); }
}

.audio-waves {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 28px;
}

.wave-bar {
    width: 3px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
    opacity: 0.25;
    transition: opacity 0.2s;
}

.audio-btn.playing .wave-bar { opacity: 0.85; animation: wave-dance 0.8s ease-in-out infinite; }
.audio-btn.playing .wave-bar:nth-child(1) { animation-duration: 0.9s;  animation-delay: 0s;    }
.audio-btn.playing .wave-bar:nth-child(2) { animation-duration: 0.65s; animation-delay: 0.15s; }
.audio-btn.playing .wave-bar:nth-child(3) { animation-duration: 1.1s;  animation-delay: 0.3s;  }

@keyframes wave-dance {
    0%, 100% { height: 4px; }
    50%       { height: 22px; }
}

.audio-label {
    color: var(--text-dim);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.62rem;
    letter-spacing: 0.28em;
}

/* ── RULEZ ───────────────────────────────────────────── */
.rulez-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding-bottom: 2rem;
}

.rulez-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 1.5rem;
}

.rulez-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    color: var(--accent2);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.rulez-list {
    list-style: none;
    padding: 0;
}

.rulez-list li {
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.6;
    padding: 0.4rem 0;
    padding-left: 1.1rem;
    position: relative;
    border-bottom: 1px solid #ffffff06;
}

.rulez-list li:last-child { border-bottom: none; }

.rulez-list li::before {
    content: '›';
    color: var(--accent);
    position: absolute;
    left: 0;
    font-weight: 700;
}
