/* =============================================================
   Epidemic Island — Main Stylesheet
   Dark theme with yellow/gold accents
   ============================================================= */

:root {
    --bg-primary:    #0a0a0a;
    --bg-secondary:  #111111;
    --bg-card:       #161616;
    --bg-card-hover: #1c1c1c;
    --accent:        #f5c400;
    --accent-dark:   #c49b00;
    --accent-glow:   rgba(245, 196, 0, 0.15);
    --text-primary:  #ffffff;
    --text-secondary:#a0a0a0;
    --text-muted:    #555555;
    --border:        #222222;
    --border-accent: rgba(245, 196, 0, 0.3);
    --danger:        #e53e3e;
    --success:       #38a169;
    --online:        #48bb78;
    --radius:        10px;
    --radius-sm:     6px;
    --shadow:        0 4px 24px rgba(0,0,0,0.4);
    --shadow-accent: 0 4px 24px rgba(245,196,0,0.1);
    --font:          'Inter', 'Segoe UI', system-ui, sans-serif;
    --font-mono:     'JetBrains Mono', 'Courier New', monospace;
}

/* --- Reset & Base ------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-dark); }

img { max-width: 100%; display: block; }

/* --- Typography -------------------------------------------- */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }
h1 { font-size: 2.5rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

.text-accent  { color: var(--accent); }
.text-muted   { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }

/* --- Layout ------------------------------------------------ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* --- Navigation -------------------------------------------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 0 20px;
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-logo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.navbar-logo span {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.5px;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.navbar-nav a {
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.navbar-nav a:hover,
.navbar-nav a.active {
    color: var(--accent);
    background: var(--accent-glow);
}

.navbar-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.status-dot.online {
    background: var(--online);
    box-shadow: 0 0 6px var(--online);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}

/* --- Hero -------------------------------------------------- */
.hero {
    text-align: center;
    padding: 80px 20px 60px;
    background: radial-gradient(ellipse at top, rgba(245,196,0,0.06) 0%, transparent 60%);
    border-bottom: 1px solid var(--border);
}

.hero-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 24px;
    border: 3px solid var(--border-accent);
    box-shadow: 0 0 40px rgba(245,196,0,0.2);
}

.hero h1 { margin-bottom: 12px; }
.hero h1 span { color: var(--accent); }
.hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto 28px;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Buttons ----------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: #000;
}

.btn-primary:hover {
    background: var(--accent-dark);
    color: #000;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(245,196,0,0.3);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--border-accent);
}

.btn-outline:hover {
    background: var(--accent-glow);
    transform: translateY(-1px);
}

/* --- Cards ------------------------------------------------- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-accent);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.card-icon {
    width: 32px;
    height: 32px;
    background: var(--accent-glow);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Stat Cards -------------------------------------------- */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: all 0.2s;
}

.stat-card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-accent);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.stat-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* --- Tables ------------------------------------------------ */
.table-wrap { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

thead th {
    text-align: left;
    padding: 10px 12px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

tbody tr:hover { background: rgba(255,255,255,0.03); }
tbody tr:last-child { border-bottom: none; }

tbody td {
    padding: 12px;
    color: var(--text-primary);
    vertical-align: middle;
}

.rank-1 { color: var(--accent); font-weight: 800; }
.rank-2 { color: #c0c0c0; font-weight: 700; }
.rank-3 { color: #cd7f32; font-weight: 700; }

.kd-positive { color: var(--success); }
.kd-negative { color: var(--danger); }
.kd-neutral  { color: var(--text-secondary); }

/* --- Kill Feed --------------------------------------------- */
.kill-feed-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.kill-feed-item:last-child { border-bottom: none; }

.kill-feed-item .killer { color: var(--accent); font-weight: 600; }
.kill-feed-item .victim { color: var(--text-secondary); }
.kill-feed-item .weapon { color: var(--text-muted); font-size: 0.8rem; }
.kill-feed-item .time   { color: var(--text-muted); font-size: 0.8rem; margin-left: auto; white-space: nowrap; }
.kill-feed-item .arrow  { color: var(--text-muted); }
.kill-feed-npc .killer  { color: var(--danger); }

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(229, 62, 62, 0.15);
    color: var(--danger);
    border: 1px solid rgba(229,62,62,0.3);
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.live-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--danger);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

/* --- Player List ------------------------------------------- */
.player-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.player-item:last-child { border-bottom: none; }

.player-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}

.player-avatar img { width: 100%; height: 100%; object-fit: cover; }

.player-name { font-weight: 600; font-size: 0.9rem; }
.player-meta { font-size: 0.8rem; color: var(--text-muted); }
.player-ping { margin-left: auto; font-size: 0.8rem; color: var(--text-muted); font-family: var(--font-mono); }

/* --- Weather Widget --------------------------------------- */
.weather-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.weather-item {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
}

.weather-icon { font-size: 1.5rem; margin-bottom: 4px; }
.weather-val  { font-size: 1rem; font-weight: 700; }
.weather-lbl  { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; }

/* --- Server Info Row --------------------------------------- */
.server-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.server-info-row:last-child { border-bottom: none; }
.server-info-row .label { color: var(--text-secondary); }
.server-info-row .value { font-weight: 600; }

/* --- Section Headers --------------------------------------- */
.section {
    padding: 48px 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-title .icon {
    color: var(--accent);
    font-size: 1.1rem;
}

.view-more {
    font-size: 0.85rem;
    color: var(--accent);
    opacity: 0.7;
    transition: opacity 0.2s;
}

.view-more:hover { opacity: 1; }

/* --- Footer ------------------------------------------------ */
.footer {
    border-top: 1px solid var(--border);
    padding: 32px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 48px;
}

.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--accent); }

/* --- Badges ------------------------------------------------ */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-gold   { background: rgba(245,196,0,0.15);  color: var(--accent);  border: 1px solid rgba(245,196,0,0.3); }
.badge-silver { background: rgba(192,192,192,0.15); color: #c0c0c0;        border: 1px solid rgba(192,192,192,0.3); }
.badge-bronze { background: rgba(205,127,50,0.15);  color: #cd7f32;        border: 1px solid rgba(205,127,50,0.3); }
.badge-online { background: rgba(72,187,120,0.15);  color: var(--online);  border: 1px solid rgba(72,187,120,0.3); }
.badge-offline{ background: rgba(85,85,85,0.15);    color: var(--text-muted); border: 1px solid var(--border); }

/* --- Scrollbar --------------------------------------------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* --- Responsive -------------------------------------------- */
@media (max-width: 900px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .navbar-nav { display: none; }
    h1 { font-size: 1.8rem; }
    .hero { padding: 40px 20px; }
    .stat-value { font-size: 1.5rem; }
}
