:root {
    --bg-main: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-panel: rgba(26, 26, 36, 0.7);
    --gold-primary: #FFD700;
    --gold-secondary: #D4A017;
    --gold-dark: #B8860B;
    --text-main: #ffffff;
    --text-muted: #a0a0b0;
    --border-color: rgba(255, 215, 0, 0.2);
    --error-color: #ff4d4d;
    --success-color: #00cc66;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 { font-family: 'Outfit', sans-serif; }

.gold-text {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

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

/* Login */
.login-body { display: flex; align-items: center; justify-content: center; }
.login-container { width: 100%; max-width: 400px; padding: 20px; }
.login-card { text-align: center; }
.brand-title { font-size: 2rem; margin-bottom: 5px; }
.subtitle { color: var(--text-muted); margin-bottom: 30px; font-family: 'Outfit', sans-serif; text-transform: uppercase; letter-spacing: 2px;}

/* Forms */
.form-group { margin-bottom: 20px; text-align: left; }
.form-group.inline { display: inline-block; margin-right: 15px; margin-bottom: 0; }
.form-row { display: flex; gap: 15px; }
.half { flex: 1; }

label { display: block; margin-bottom: 8px; color: var(--text-muted); font-size: 0.9rem; }
input[type="text"], input[type="password"], input[type="number"], input[type="date"], select {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}
input:focus, select:focus { outline: none; border-color: var(--gold-primary); box-shadow: 0 0 0 2px rgba(255,215,0,0.1); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 1rem;
}
.btn-block { width: 100%; }
.btn-large { padding: 15px; font-size: 1.2rem; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }

.btn-gold {
    background: linear-gradient(135deg, var(--gold-secondary), var(--gold-primary));
    color: #000;
}
.btn-gold:hover { background: linear-gradient(135deg, var(--gold-primary), var(--gold-secondary)); transform: translateY(-1px); }
.btn-outline-gold {
    background: transparent;
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
}
.btn-outline-gold:hover { background: rgba(255,215,0,0.1); }

/* Header & Nav */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}
.header-brand { font-size: 1.5rem; font-family: 'Outfit', sans-serif; font-weight: 700; }
.header-user { display: flex; align-items: center; gap: 15px; }

.app-nav {
    display: flex;
    gap: 20px;
    padding: 15px 30px;
    background: rgba(18, 18, 26, 0.8);
    border-bottom: 1px solid #333;
}
.app-nav a { color: var(--text-muted); text-decoration: none; font-weight: 500; font-family: 'Outfit', sans-serif; }
.app-nav a:hover, .app-nav a.active { color: var(--gold-primary); }

/* Dashboard Grids */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card { text-align: center; padding: 25px; }
.stat-label { color: var(--text-muted); font-size: 0.9rem; text-transform: uppercase; margin-bottom: 10px; letter-spacing: 1px;}
.stat-value { font-size: 2.5rem; font-weight: 700; font-family: 'Outfit', sans-serif; }

.dashboard-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; }
.dashboard-grid h2 { margin-bottom: 20px; color: var(--gold-secondary); border-bottom: 1px solid #333; padding-bottom: 10px; }

/* Entry Layout */
.entry-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.entry-layout h2, .entry-layout h3 { margin-bottom: 20px; color: var(--gold-secondary); border-bottom: 1px solid #333; padding-bottom: 10px; }

/* Tables */
.table-responsive { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; text-align: left; }
.table th, .table td { padding: 12px 15px; border-bottom: 1px solid #333; }
.table th { color: var(--text-muted); font-weight: 500; text-transform: uppercase; font-size: 0.85rem; }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.bet-number { background: rgba(255, 215, 0, 0.1); color: var(--gold-primary); padding: 4px 8px; border-radius: 4px; font-weight: bold; font-family: monospace; font-size: 1.1rem; }

/* Utils */
.text-right { text-align: right; }
.text-center { text-align: center; }
.hidden { display: none !important; }

/* Spinner */
.spinner { width: 20px; height: 20px; border: 3px solid rgba(0,0,0,0.3); border-radius: 50%; border-top-color: #000; animation: spin 1s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { padding: 15px 25px; border-radius: 8px; color: white; font-weight: 500; box-shadow: 0 4px 12px rgba(0,0,0,0.3); animation: slideIn 0.3s ease forwards; opacity: 0; }
.toast.success { background: var(--success-color); }
.toast.error { background: var(--error-color); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Games List */
.game-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #333; }
.game-name { font-weight: 600; font-size: 1.1rem; }
.game-status { font-size: 0.8rem; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; margin-left: 10px; }
.game-status.open { background: rgba(0, 204, 102, 0.2); color: var(--success-color); }
.game-status.closed { background: rgba(255, 77, 77, 0.2); color: var(--error-color); }
.game-timer { font-family: monospace; font-size: 1.1rem; color: var(--gold-secondary); }

/* Filter Bar */
.filter-bar { display: flex; gap: 15px; margin-bottom: 20px; align-items: flex-end; }

/* Responsive */
@media (max-width: 768px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .entry-layout { grid-template-columns: 1fr; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .form-group.inline { margin-right: 0; }
}
