:root { --bg: #0f172a; --card: #1e293b; --text: #f1f5f9; --green: #22c55e; --red: #ef4444; --blue: #3b82f6; --amber: #f59e0b; }
body { background-color: var(--bg); color: var(--text); font-family: -apple-system, system-ui, sans-serif; margin: 0; padding: 20px; }
.container { max-width: 1500px; margin: 0 auto; display: none; }

/* Login */
#login-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg); display: flex; justify-content: center; align-items: center; z-index: 1000; }
.login-card { background: var(--card); padding: 40px; border-radius: 12px; width: 100%; max-width: 350px; text-align: center; box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3); }
button { width: 100%; padding: 12px; background: var(--blue); color: white; border: none; border-radius: 6px; cursor: pointer; font-weight: bold; margin-top: 10px; }
button:hover { opacity: 0.9; }
.error-toast { color: var(--red); font-size: 0.9em; margin-top: 10px; min-height: 20px; }

/* Dashboard */
h1 { font-weight: 300; margin-bottom: 30px; border-bottom: 1px solid #334155; padding-bottom: 20px; display: flex; justify-content: space-between; align-items: center; }
.logout-btn { font-size: 0.6em; background: transparent; border: 1px solid #475569; width: auto; padding: 5px 15px; margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(450px, 1fr)); gap: 20px; }
.card { background: var(--card); border-radius: 12px; padding: 15px; min-height: 250px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }
.card-header { font-size: 0.9em; color: #94a3b8; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 15px; }
.stat-huge { font-size: 3em; font-weight: 700; }
.stat-sub { color: #94a3b8; margin-top: 5px; }

/* Toggle Switch */
.toggle-container { display: flex; align-items: center; gap: 10px; font-size: 0.8em; color: #94a3b8; cursor: pointer; user-select: none; }
.toggle-switch { position: relative; width: 36px; height: 20px; background: #334155; border-radius: 20px; transition: 0.3s; }
.toggle-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: #cbd5e1; border-radius: 50%; transition: 0.3s; }
.toggle-input { display: none; }

/* Checked State */
.toggle-input:checked + .toggle-switch { background: var(--blue); }
.toggle-input:checked + .toggle-switch::after { transform: translateX(16px); background: #fff; }

/* Badges */
.status-badge { display: inline-block; padding: 5px 12px; border-radius: 20px; font-size: 0.8em; font-weight: bold; }
.status-ok { background: rgba(34, 197, 94, 0.2); color: var(--green); }
.status-err { background: rgba(239, 68, 68, 0.2); color: var(--red); }
.status-warn { background: rgba(245, 158, 11, 0.2); color: var(--amber); }
.status-off { background: rgba(148, 163, 184, 0.2); color: #94a3b8; }

/* League Drawer Styles */
.league-pill { background: #334155; border-radius: 6px; margin-bottom: 8px; overflow: hidden; transition: background 0.2s; }
.league-header { padding: 12px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.league-header:hover { background: #475569; }
.drawer-content { display: none; background: #1e293b; padding: 10px; border-top: 1px solid #475569; }
.drawer-item { padding: 8px; border-bottom: 1px solid #334155; font-size: 0.85em; color: #cbd5e1; display: flex; justify-content: space-between; }
.drawer-item:last-child { border-bottom: none; }
.game-time { color: #64748b; font-family: monospace; }

/* API Usage Bars */
.usage-row { margin-bottom: 15px; }
.usage-label { display: flex; justify-content: space-between; font-size: 0.8em; margin-bottom: 5px; color: #cbd5e1; }
.progress-track { background: #334155; height: 6px; border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--blue); transition: width 0.5s; }
.fill-warn { background: var(--amber); }
.fill-crit { background: var(--red); }

.refresh-btn { background: #334155; font-size: 0.8em; padding: 5px 10px; border-radius: 4px; display: inline-block; margin-left: 10px; }

::-webkit-scrollbar {
    width: 10px; /* Width of the vertical scrollbar */
    height: 10px; /* Height of the horizontal scrollbar */
}

::-webkit-scrollbar-track {
    background: #1e1e1e; /* Match your card background or slightly darker */
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #475569; /* Slate gray handle */
    border-radius: 4px;
    border: 2px solid #1e1e1e; /* Creates a padding effect around the handle */
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b; /* Lighter gray on hover */
}

/* Firefox Scrollbar Support (Standard CSS) */
* {
    scrollbar-width: thin;
    scrollbar-color: #475569 #1e1e1e;
}