/* ═══════════════════════════════════════════
   Monke Panel - Dark Jungle Theme
   ═══════════════════════════════════════════ */

:root {
    --bg-primary: #0f1117;
    --bg-secondary: #161921;
    --bg-card: #1c1f2b;
    --bg-card-hover: #242838;
    --bg-input: #12141c;
    --text-primary: #e4e4e7;
    --text-secondary: #8b8d97;
    --text-muted: #5c5e68;
    --accent: #e9b44c;
    --accent-hover: #f0c56e;
    --green: #4ecca3;
    --red: #e74c3c;
    --blue: #3498db;
    --purple: #9b59b6;
    --border: #2a2d3a;
    --border-light: #353849;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --radius: 12px;
    --radius-sm: 8px;
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', monospace;
}

/* ── Reset ─────────────────────────────── */

*, *::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;
    display: flex;
    flex-direction: column;
}

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

a:hover {
    color: var(--accent-hover);
}

/* ── Container ─────────────────────────── */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* ── Navbar ─────────────────────────────── */

.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(22, 25, 33, 0.9);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-primary);
}

.nav-brand:hover {
    color: var(--accent);
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), #d4943c);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: #0f1117;
}

.nav-links {
    display: flex;
    gap: 8px;
}

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

.nav-link:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* ── Hero ───────────────────────────────── */

.hero {
    text-align: center;
    padding: 80px 0 48px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.15rem;
    margin-bottom: 28px;
}

/* ── Buttons ───────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-accent {
    background: var(--accent);
    color: #0f1117;
}

.btn-accent:hover {
    background: var(--accent-hover);
    color: #0f1117;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(233, 180, 76, 0.3);
}

/* ── Sections ──────────────────────────── */

.section {
    padding: 48px 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 28px;
    color: var(--text-primary);
}

.page-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
    padding-top: 40px;
}

.page-subtitle {
    color: var(--text-secondary);
    margin-bottom: 36px;
}

/* ── Grid ──────────────────────────────── */

.grid {
    display: grid;
    gap: 20px;
}

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

/* ── Cards ─────────────────────────────── */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all 0.25s;
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.bot-card {
    border-top: 3px solid var(--card-accent, var(--border));
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.card-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ── Stat Cards ────────────────────────── */

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    transition: all 0.25s;
}

.stat-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.stat-card.big {
    padding: 36px 28px;
}

.stat-icon {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ── Table ─────────────────────────────── */

.table-container {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

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

.table th {
    background: var(--bg-secondary);
    padding: 14px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background: var(--bg-card-hover);
}

.rank-cell {
    width: 50px;
    text-align: center;
    font-weight: 700;
}

.medal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 0.85rem;
}

.medal.gold { background: #FFD70030; color: #FFD700; }
.medal.silver { background: #C0C0C030; color: #C0C0C0; }
.medal.bronze { background: #CD7F3230; color: #CD7F32; }

.player-cell strong {
    color: var(--text-primary);
}

.tag {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-left: 2px;
}

.tier-badge {
    font-weight: 700;
    font-size: 0.9rem;
}

.win { color: var(--green); font-weight: 600; }
.loss { color: var(--red); font-weight: 600; }

.winrate-bar {
    position: relative;
    background: var(--bg-input);
    border-radius: 6px;
    height: 26px;
    min-width: 100px;
    overflow: hidden;
}

.winrate-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--green), #3ba882);
    border-radius: 6px;
    transition: width 0.5s ease;
}

.winrate-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* ── Commands Page ─────────────────────── */

.bot-section {
    margin-bottom: 48px;
}

.bot-heading {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--bot-color, var(--border));
}

.command-category {
    margin-bottom: 24px;
}

.category-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding-left: 4px;
}

.command-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.command-item {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
}

.command-item:hover {
    background: var(--bg-card);
}

.command-name {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    color: var(--accent);
    background: var(--bg-input);
    padding: 3px 10px;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.command-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ── Empty State ───────────────────────── */

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.empty-state code {
    font-family: var(--font-mono);
    background: var(--bg-card);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--accent);
}

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

/* ── Footer ────────────────────────────── */

.footer {
    margin-top: auto;
    padding: 28px 0;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ── Responsive ────────────────────────── */

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .nav-links { gap: 4px; }
    .nav-link { padding: 6px 10px; font-size: 0.8rem; }
    .stat-value { font-size: 2rem; }
    .command-item { flex-direction: column; gap: 4px; }
    .table th, .table td { padding: 10px 12px; font-size: 0.85rem; }
}

@media (max-width: 480px) {
    .nav-content { height: 56px; }
    .nav-brand span:last-child { display: none; }
    .hero { padding: 48px 0 32px; }
    .section { padding: 32px 0; }
    .container { padding: 0 16px; }
}
