:root {
    --bg: #0b0f0c;
    --bg-card: #141a16;
    --bg-sidebar: #0e1310;
    --green: #39ff14;
    --green-dim: #2ecc40;
    --green-dark: #1a3d22;
    --text: #e8ffe8;
    --text-muted: #8fa893;
    --border: rgba(57, 255, 20, 0.15);
    --radius: 14px;
    --sidebar-w: 220px;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

.app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    padding: 24px 16px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
}

.brand {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--green);
    letter-spacing: 1px;
    margin-bottom: 24px;
    padding: 0 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(57, 255, 20, 0.08);
    color: var(--green);
}

.nav-item .icon { font-size: 1.1rem; width: 22px; text-align: center; }

.nav-spacer { flex: 1; }

.nav-item.logout { color: #ff6b6b; margin-top: auto; }

/* Main */
.main {
    margin-left: var(--sidebar-w);
    flex: 1;
    padding: 24px 28px 40px;
    max-width: 1400px;
}

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

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
}

.btn-voltar {
    background: var(--green);
    color: #0b0f0c;
    border: none;
    padding: 10px 22px;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
}

/* Categories */
.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.chip {
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.chip:hover,
.chip.active {
    background: var(--green);
    color: #0b0f0c;
    border-color: var(--green);
}

/* Providers */
.providers {
    margin-bottom: 20px;
}

.providers label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.providers-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.provider-pill {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--text-muted);
    font-size: 0.78rem;
    white-space: nowrap;
}

.provider-pill.active {
    border-color: var(--green);
    color: var(--green);
}

/* Winners */
.winners {
    margin-bottom: 22px;
}

.winners h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.winners-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.winner-card {
    flex: 0 0 200px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.winner-card img {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
}

.winner-info .name {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.winner-info .value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--green);
}

/* Search */
.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(57, 255, 20, 0.12);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 28px;
}

.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 1rem;
}

.search-bar input::placeholder { color: var(--text-muted); }

.search-icon { color: var(--green); font-size: 1.2rem; }

/* Game grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px;
}

.game-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.game-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(57, 255, 20, 0.15);
    border-color: var(--green);
}

.game-card-header {
    background: linear-gradient(90deg, var(--green-dark), #0f2918);
    padding: 8px 12px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-card-thumb {
    aspect-ratio: 1;
    overflow: hidden;
    background: #1a2420;
    position: relative;
}

.game-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.game-card:hover .game-card-thumb img {
    transform: scale(1.06);
}

.game-card-body {
    padding: 12px;
}

.game-card-provider {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.btn-jogar {
    display: block;
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: #1e2a22;
    color: var(--text);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.game-card:hover .btn-jogar {
    background: var(--green);
    color: #0b0f0c;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.hidden { display: none !important; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 64px;
        padding: 16px 8px;
    }

    .brand,
    .nav-item span.label { display: none; }

    .main { margin-left: 64px; padding: 16px; }

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
}
