/* =========================================================
   1. VARIABEL TEMA (DARK MODE & LIGHT MODE)
========================================================= */
[data-theme="dark"] {
    --bg-main: #0a0e17;
    --bg-card: #121824;
    --bg-card-hover: #182030;
    --bg-navbar: #121824;
    --text-primary: #ffffff;
    --text-secondary: #8a96aa;
    --accent-gold: #e5a93b;
    --accent-gold-dark: #b8860b;
    --accent-green: #25e66b;
    --accent-red: #f87171;
    --border-color: #232d3f;
    --shadow-color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] {
    --bg-main: #f4f6fa;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-navbar: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --accent-gold: #b8860b;
    --accent-gold-dark: #936b08;
    --accent-green: #16a34a;
    --accent-red: #dc2626;
    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 0, 0, 0.08);
}

/* =========================================================
   2. RESET & BASE UTAMA
========================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
    padding-bottom: 60px;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 15px;
}

/* =========================================================
   3. NAVBAR / TOPBAR STEAM E-SPORTS
========================================================= */
.topbar {
    background-color: var(--bg-navbar);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.brand {
    font-size: 20px;
    font-weight: 900;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    background-color: var(--border-color);
    color: var(--text-primary);
}

/* =========================================================
   4. TOMBOL (BUTTONS & BADGES)
========================================================= */
.btn {
    padding: 9px 18px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    text-transform: uppercase;
    display: inline-block;
    text-align: center;
}

.btn-gold {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
    color: #000;
    box-shadow: 0 4px 15px rgba(229, 169, 59, 0.25);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 169, 59, 0.4);
}

.btn-outline {
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    background: transparent;
}

.btn-outline:hover {
    background: rgba(229, 169, 59, 0.1);
}

.badge-live {
    background-color: var(--accent-green);
    color: #000;
    font-weight: 900;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 10px;
}

/* =========================================================
   5. HERO BANNER TURNAMEN
========================================================= */
.hero {
    background: linear-gradient(135deg, rgba(18, 24, 36, 0.88), rgba(10, 14, 23, 0.95)),
                linear-gradient(45deg, #3a2203, #0a1e2e);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    box-shadow: 0 15px 35px var(--shadow-color);
}

.hero h1 {
    font-size: 32px;
    font-weight: 900;
    color: var(--accent-gold);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.hero p {
    color: var(--text-secondary);
    font-size: 14px;
    max-width: 550px;
}

/* =========================================================
   6. GRID PERMAINAN (7 GAME TRADISIONAL)
========================================================= */
.section-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--accent-gold);
    padding-left: 10px;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 35px;
}

.game-card,
.workspace-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 18px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
}

.game-card:hover,
.workspace-card:hover,
.game-card.selected,
.workspace-card.selected {
    border-color: var(--accent-gold);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(229, 169, 59, 0.15);
    background-color: var(--bg-card-hover);
}

.game-icon,
.wc-icon {
    font-size: 36px;
    margin-bottom: 10px;
    color: var(--accent-gold);
}

.game-title,
.workspace-card strong {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: block;
}

.game-online,
.workspace-card span {
    font-size: 11px;
    color: var(--accent-green);
    font-weight: 600;
}

/* =========================================================
   7. PANEL & LEADERBOARD (2 KOLOM)
========================================================= */
.two-col {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
}

.panel {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 10px 25px var(--shadow-color);
}

.panel h3 {
    font-size: 16px;
    color: var(--accent-gold);
    margin-bottom: 15px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.lb-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

.lb-item:last-child {
    border-bottom: 0;
}

.lb-rank {
    font-weight: 800;
    color: var(--accent-gold);
    width: 30px;
}

.lb-name {
    flex: 1;
    font-weight: 600;
    color: var(--text-primary);
}

.lb-elo {
    font-weight: 800;
    color: var(--accent-green);
}

/* =========================================================
   8. STEAM WALLET & CARD KELAS JAGOAN
========================================================= */
.wallet-panel {
    background: linear-gradient(145deg, var(--bg-card), var(--bg-main));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.wallet-info h2 {
    font-size: 22px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.wallet-balance strong {
    font-size: 28px;
    font-weight: 900;
    color: var(--accent-green);
    display: block;
}

/* =========================================================
   9. TOAST NOTIFIKASI
========================================================= */
.toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    padding: 12px 18px;
    border: 1px solid var(--accent-gold);
    background-color: var(--bg-card);
    color: var(--text-primary);
    border-radius: 8px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.25s ease;
    z-index: 9999;
    font-weight: bold;
    box-shadow: 0 10px 25px var(--shadow-color);
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================
   10. MEDIA QUERIES (HP & TABLET)
========================================================= */
@media screen and (max-width: 850px) {
    .two-col {
        grid-template-columns: 1fr;
    }
    .hero {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .nav-links {
        display: none;
    }
}