:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --border-color: rgba(255, 255, 255, 0.1);
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --text-muted: #6b6b80;
  --accent-green: #00ff88;
  --accent-purple: #8b5cf6;
  --accent-gold: #f59e0b;
  --accent-red: #ef4444;
  --accent-blue: #3b82f6;
  --font-family: 'Inter', -apple-system, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-glow-green: 0 0 20px rgba(0, 255, 136, 0.3);
  --shadow-glow-purple: 0 0 20px rgba(139, 92, 246, 0.3);
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-family);
  margin: 0;
  line-height: 1.5;
}

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

.glass {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
}

.card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: background var(--transition-fast);
}

.card-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.card-body {
  padding: 1.5rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-green), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-purple);
  color: white;
}
.btn-primary:hover {
  background: #7c3aed;
  box-shadow: var(--shadow-glow-purple);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
}

.btn-discord {
  background: #5865F2;
  color: white;
}
.btn-discord:hover {
  background: #4752C4;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th, .table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.text-center { text-align: center; }
.p-0 { padding: 0 !important; }

/* Admin Nav */
.admin-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border-color);
}

.nav-brand {
  font-size: 1.25rem;
  font-weight: 700;
}

/* THEMES */
.theme-platty {
    --bg-primary: #1a1010;
    --bg-secondary: #221414;
    --accent-primary: #e53e3e;
    --accent-secondary: #f56565;
}
.theme-flyer {
    --bg-primary: #120e1a;
    --bg-secondary: #1a1425;
    --accent-primary: #8b5cf6;
    --accent-secondary: #a78bfa;
}
.theme-logan {
    --bg-primary: #0f1712;
    --bg-secondary: #141f17;
    --accent-primary: #10b981;
    --accent-secondary: #34d399;
}

/* LEADERBOARD UI */
.massive-title {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 0;
}
.text-uppercase { text-transform: uppercase; letter-spacing: 2px; font-weight: 600; font-size: 0.9rem; }

.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
    margin: 3rem 0;
    min-height: 400px;
}

.podium-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 250px;
    transition: transform 0.3s ease;
}
.podium-item:hover { transform: translateY(-10px); }

.podium-card {
    width: 100%;
    padding: 2rem 1rem;
    border-radius: 20px 20px 10px 10px;
    position: relative;
    border-top: 4px solid;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.podium-gold .podium-card { 
    height: 300px; 
    border-color: #fbbf24;
    background: linear-gradient(180deg, rgba(251,191,36,0.15) 0%, rgba(0,0,0,0.4) 100%);
}
.podium-silver .podium-card { 
    height: 250px; 
    border-color: #94a3b8;
    background: linear-gradient(180deg, rgba(148,163,184,0.15) 0%, rgba(0,0,0,0.4) 100%);
}
.podium-bronze .podium-card { 
    height: 230px; 
    border-color: #b45309;
    background: linear-gradient(180deg, rgba(180,83,9,0.15) 0%, rgba(0,0,0,0.4) 100%);
}

.rank-badge {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: #fbbf24;
    color: #000;
    font-weight: 800;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 1.2rem;
    box-shadow: 0 0 15px rgba(251,191,36,0.5);
}

.username {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 1rem 0;
    text-transform: uppercase;
}

.wagered-wrap {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 10px;
    margin-top: 10px;
    border: 1px solid rgba(255,255,255,0.05);
}

.wagered-val {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
}

.prize-cash {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fbbf24;
    text-shadow: 0 0 20px rgba(251,191,36,0.4);
}

.badge {
    display: inline-block;
    background: #10b981;
    color: #000;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    margin: 2px;
}
.badge.sm { font-size: 0.65rem; }

.countdown {
    display: flex;
    gap: 10px;
}
.cd-box {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}
.cd-box .val {
    font-size: 1.5rem;
    font-weight: 800;
}
.cd-box .lbl {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-weight: 600;
}

.lb-table { background: transparent; }
.lb-table th { 
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-bottom: 2px solid rgba(255,255,255,0.05);
}
.lb-table td {
    padding: 1.2rem 1rem;
    font-size: 1.1rem;
}
.rank-box {
    color: var(--text-muted);
    font-weight: 700;
    font-size: 1.2rem;
}
.prize-td {
    display: flex;
    align-items: center;
    gap: 10px;
}
.cash-text {
    color: #10b981;
    font-weight: 700;
}

.timeframe-filters {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* ADMIN PANEL OVERHAUL */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 100px);
    gap: 30px;
    margin-top: 2rem;
}

.admin-sidebar {
    width: 280px;
    padding: 2rem;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
}

.admin-sidebar .brand {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 2rem;
    text-align: center;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

.sidebar-nav .nav-link {
    color: var(--text-muted);
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
    background: rgba(255,255,255,0.02);
    border: 1px solid transparent;
}

.sidebar-nav .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

.sidebar-nav .nav-link.active {
    color: #fff;
    background: rgba(var(--primary-color), 0.15);
    border-color: rgba(var(--primary-color), 0.3);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 2rem;
}

.admin-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.admin-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

/* Bots */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}
.status-indicator.active {
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
}
.status-indicator.inactive {
    background: #ef4444;
    box-shadow: 0 0 10px #ef4444;
}

/* Log Viewer */
.log-terminal {
    background: #000;
    border-radius: 10px;
    padding: 1.5rem;
    font-family: monospace;
    font-size: 0.9rem;
    color: #a78bfa;
    height: 500px;
    overflow-y: auto;
    border: 1px solid rgba(255,255,255,0.1);
}
.log-terminal pre {
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
}
