*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg:          #060d1a;
    --bg-card:     #0d1a2d;
    --bg-card2:    #0a1525;
    --border:      #1a2d45;
    --border2:     #223548;
    --text:        #e2e8f0;
    --text-2:      #94a3b8;
    --muted:       #4b6280;
    --accent:      #f4a62a;
    --accent-dim:  #b37a1a;
    --accent-glow: rgba(244,166,42,.15);
    --teal:        #22d3ee;
    --danger:      #ef4444;
    --warn:        #f59e0b;
    --hero-bg-a:   url('images/93bafec1-3aea-4032-bbcd-80c4de5ee598.png');
    --hero-bg-b:   url('images/aa91426c-8339-44f9-b592-2feae8d57129.png');
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

.container { max-width: 1400px; margin: 0 auto; padding: 0 24px; }

/* ── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg-layer {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.8s ease-in-out;
    animation: kenBurns 24s ease-in-out infinite alternate;
}

.hero-bg-layer.active { opacity: 1; }

/* Initial-Bilder (Fallback). Die laufende Rotation wird von script.js gesteuert
   und zieht die Liste aus HERO_IMAGES — neue Bilder dort eintragen. */
#heroBg0 { background-image: var(--hero-bg-a); animation-duration: 24s; }
#heroBg1 { background-image: var(--hero-bg-b); animation-duration: 20s; animation-delay: -10s; }

@keyframes kenBurns {
    from { transform: scale(1)    translate(0,    0);   }
    to   { transform: scale(1.08) translate(-2%, 1.5%); }
}

.hero-gradient {
    position: absolute; inset: 0;
    background:
        linear-gradient(to right, rgba(6,13,26,.92) 0%, rgba(6,13,26,.45) 55%, transparent 100%),
        linear-gradient(to top,   rgba(6,13,26,1)   0%, transparent 55%);
    z-index: 1;
}

.hero-content {
    position: relative; z-index: 2;
    padding: 90px 0 80px;
}

.status-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.14);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 6px 18px;
    font-size: 13px;
    color: var(--text-2);
    margin-bottom: 22px;
}

.status-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--muted);
    flex-shrink: 0;
    transition: background .4s, box-shadow .4s;
}
.status-dot.online  { background: #4ade80; box-shadow: 0 0 10px #4ade80; animation: pulse 2s infinite; }
.status-dot.offline { background: var(--danger); }

@keyframes pulse {
    0%,100% { opacity: 1; }
    50%      { opacity: .4; }
}

.hero-title {
    font-family: 'Cinzel', Georgia, serif;
    font-weight: 900;
    font-size: clamp(48px, 8vw, 96px);
    line-height: 1;
    color: #fff;
    text-shadow:
        0 0 60px rgba(244,166,42,.5),
        0 2px 40px rgba(0,0,0,.9);
    margin-bottom: 14px;
    letter-spacing: .04em;
}

.hero-sub {
    font-size: clamp(14px, 2vw, 18px);
    color: rgba(226,232,240,.65);
    margin-bottom: 36px;
    font-weight: 300;
    max-width: 480px;
}

.address-row {
    display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
}

.address-chip {
    display: flex; flex-direction: column;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 10px 18px;
}

.address-label {
    font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px;
    color: var(--muted); margin-bottom: 2px;
}

.address-val {
    font-size: 15px; font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}
.address-val:hover { color: #fbbf24; }

.copy-btn {
    display: flex; align-items: center; gap: 7px;
    background: var(--accent);
    color: #000;
    text-decoration: none;
    border: none; border-radius: 10px;
    padding: 11px 22px;
    font-size: 14px; font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .1s;
    font-family: inherit;
}
.copy-btn:hover  { background: #fbbf24; }
.copy-btn:active { transform: scale(.97); }

/* ── Sections ──────────────────────────────────────────────────────────────── */
.section { padding: 28px 0; }

/* ── Stats row ─────────────────────────────────────────────────────────────── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 26px 20px;
    text-align: center;
    transition: border-color .25s, transform .25s;
}
.stat-card:hover { border-color: var(--accent-dim); transform: translateY(-3px); }

.stat-icon  { font-size: 28px; margin-bottom: 10px; }
.stat-value {
    font-size: 30px; font-weight: 700;
    color: var(--accent); margin-bottom: 4px;
    font-family: 'Cinzel', serif;
}
.stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; }

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.card-header {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}

.header-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.card-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 16px; font-weight: 600;
}

.live-dot {
    display: inline-block;
    width: 8px; height: 8px; border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 8px #4ade80;
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

.pill {
    background: var(--accent-glow);
    color: var(--accent);
    border: 1px solid var(--accent-dim);
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 13px; font-weight: 600;
}

.range-select {
    background: var(--bg-card2);
    border: 1px solid var(--border2);
    color: var(--text);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 13px;
    cursor: pointer;
    outline: none;
    font-family: inherit;
}
.range-select:focus { border-color: var(--accent-dim); }

.icon-btn {
    background: transparent;
    border: 1px solid var(--border2);
    color: var(--text-2);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 768px) { .two-col { grid-template-columns: 1fr; } }

/* ── Online list ───────────────────────────────────────────────────────────── */
.online-list { padding: 12px 22px; min-height: 80px; }

.online-player {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.online-player:last-child { border-bottom: none; }
.player-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #4ade80; flex-shrink: 0;
    box-shadow: 0 0 6px #4ade80;
}

/* ── Charts ────────────────────────────────────────────────────────────────── */
.chart-wrap    { padding: 16px 20px; height: 260px; }
.chart-wrap-lg { padding: 16px 20px; height: 320px; }

/* ── Leaderboard ───────────────────────────────────────────────────────────── */
.tab-bar {
    display: flex; flex-wrap: wrap; gap: 4px;
    padding: 16px 22px 0;
}

.tab {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-2);
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}
.tab:hover  { border-color: var(--accent-dim); color: var(--text); }
.tab.active { background: var(--accent-glow); border-color: var(--accent); color: var(--accent); font-weight: 600; }

.table-wrap { overflow-x: auto; padding: 12px 22px 20px; }

.lb-table { width: 100%; border-collapse: collapse; font-size: 14px; }

.lb-table th {
    text-align: left; padding: 10px 12px;
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .5px; color: var(--muted);
    border-bottom: 1px solid var(--border);
}
.lb-table td { padding: 12px; border-bottom: 1px solid var(--border); }
.lb-table tr:last-child td { border-bottom: none; }
.lb-table tr:hover td { background: rgba(255,255,255,.025); }

.th-rank, .td-rank { width: 48px; text-align: center; }

.rank-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%;
    font-weight: 700; font-size: 13px;
}
.rank-1 { background: #fbbf24; color: #000; }
.rank-2 { background: #94a3b8; color: #000; }
.rank-3 { background: #b45309; color: #fff; }
.rank-n { background: var(--border); color: var(--muted); font-size: 12px; }

.player-name { font-weight: 600; }
.val-accent  { color: var(--accent); font-weight: 600; }

/* ── Empty / loading ───────────────────────────────────────────────────────── */
.empty-msg { color: var(--muted); font-size: 13px; padding: 16px 0; }

/* ── History banner ────────────────────────────────────────────────────────── */
.history-banner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 22px;
    background: rgba(245,158,11,.08);
    border-bottom: 1px solid rgba(245,158,11,.25);
    font-size: 13px; color: var(--warn); gap: 12px;
}
.history-back-btn {
    background: transparent;
    border: 1px solid rgba(245,158,11,.4);
    color: var(--warn);
    border-radius: 6px; padding: 4px 12px;
    font-size: 12px; cursor: pointer;
    font-family: inherit; white-space: nowrap;
    transition: all .15s;
}
.history-back-btn:hover { background: rgba(245,158,11,.12); }

/* ── Timeline ──────────────────────────────────────────────────────────────── */
.timeline-wrap {
    border-top: 1px solid var(--border);
    padding: 16px 22px 20px;
}

.timeline-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px;
}

.tl-label {
    font-size: 12px; font-weight: 600;
    color: var(--muted); text-transform: uppercase; letter-spacing: .5px;
}

.tl-current {
    font-size: 14px; font-weight: 600;
    color: var(--accent); transition: color .2s;
}
.tl-current.historical { color: var(--warn); }

.tl-row { display: flex; align-items: center; gap: 14px; }

.tl-edge {
    font-size: 11px; color: var(--muted);
    white-space: nowrap; flex-shrink: 0;
}

.tl-slider {
    flex: 1;
    -webkit-appearance: none; appearance: none;
    height: 4px; border-radius: 2px;
    background: var(--border);
    outline: none; cursor: pointer;
}
.tl-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--accent); cursor: pointer;
    box-shadow: 0 0 0 4px var(--accent-glow);
    transition: transform .15s, box-shadow .15s;
}
.tl-slider:hover::-webkit-slider-thumb {
    transform: scale(1.25); box-shadow: 0 0 0 8px var(--accent-glow);
}
.tl-slider::-moz-range-thumb {
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--accent); cursor: pointer;
    border: none; box-shadow: 0 0 0 4px var(--accent-glow);
}

/* ── Xbox N/A indicator ────────────────────────────────────────────────────── */
.xbox-unavail {
    display: inline-block; color: var(--muted);
    border-bottom: 1px dashed var(--muted);
    cursor: help; font-style: italic; font-size: .9em; padding: 0 2px;
}
.xbox-unavail:hover { color: var(--warn); border-color: var(--warn); outline: none; }

/* ── Map ───────────────────────────────────────────────────────────────────── */
.map-wrap {
    position: relative;
    height: 620px;
    background: var(--bg-card2);
}

.breeding-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 112px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background:
        linear-gradient(110deg, rgba(244,166,42,.22), rgba(34,211,238,.13) 58%, rgba(13,26,45,.95)),
        var(--bg-card2);
    color: var(--text);
    text-decoration: none;
    transition: filter .18s, transform .18s;
}

.breeding-banner:hover {
    filter: brightness(1.08);
}

.breeding-kicker,
.breeding-title {
    display: block;
}

.breeding-kicker {
    margin-bottom: 4px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .8px;
    text-transform: uppercase;
}

.breeding-title {
    font-size: clamp(22px, 3vw, 34px);
    font-weight: 800;
    line-height: 1.05;
}

.breeding-action {
    flex-shrink: 0;
    border: 1px solid rgba(244,166,42,.5);
    border-radius: 10px;
    padding: 10px 16px;
    background: rgba(244,166,42,.14);
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
}

.map-loading {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: var(--muted);
    z-index: 1; pointer-events: none;
}
.map-loading a { color: var(--accent); }
.map-frame {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    border: none; display: block;
}
.map-note {
    padding: 10px 22px;
    font-size: 12px; color: var(--muted);
    border-top: 1px solid var(--border);
}
.map-note a { color: var(--accent); text-decoration: none; }
.map-note a:hover { text-decoration: underline; }

@media (max-width: 768px) {
    .map-wrap { height: 520px; }
    .breeding-banner {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ── Footer ────────────────────────────────────────────────────────────────── */
.footer {
    margin-top: 48px; padding: 20px 0;
    border-top: 1px solid var(--border);
    font-size: 12px; color: var(--muted);
}
.footer-inner {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 8px;
}
.muted { color: var(--muted); }
