:root {
    --bg-color: #0d0e15;
    --surface-color: rgba(255, 255, 255, 0.03);
    --surface-hover: rgba(255, 255, 255, 0.05);
    --surface-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #0ea5e9;
    --font-family: 'Inter', sans-serif;
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    /* Subtler animated background */
    background-image: radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.08), transparent 25%),
                      radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.08), transparent 25%);
    background-attachment: fixed;
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--surface-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--surface-border);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

/* Layout */
.app-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    padding: 24px;
    display: flex;
    flex-direction: column;
    margin: 16px;
    height: calc(100vh - 32px);
    position: sticky;
    top: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--text-primary);
}

.logo i {
    font-size: 28px;
    color: var(--accent-primary);
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 10px;
    transition: var(--transition);
    font-weight: 500;
}

.nav-links li.active a, .nav-links a:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.nav-links li.active a i {
    color: var(--accent-primary);
}

.nav-links a i {
    font-size: 20px;
    transition: var(--transition);
}

.server-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 10px;
    color: var(--success);
    font-size: 14px;
    font-weight: 600;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
    animation: pulse 2s infinite;
}

/* Main Content */
.main-content {
    padding: 16px 32px 32px 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
}

header h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.user-profile:hover {
    background: var(--surface-hover);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.stat-card {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.15);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.stat-icon.info { background: rgba(14, 165, 233, 0.15); color: var(--info); }
.stat-icon.warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.stat-icon.success { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.stat-icon.primary { background: rgba(139, 92, 246, 0.15); color: var(--accent-secondary); }

.stat-details h3 {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 8px;
}

.stat-details p {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--surface-border);
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 20px;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

/* Tables */
.table-container {
    padding: 12px;
    overflow-x: auto;
}

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

th, td {
    padding: 16px 12px;
    text-align: left;
    border-bottom: 1px solid var(--surface-border);
}

th {
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

td {
    font-size: 14px;
    font-weight: 500;
}

tbody tr {
    transition: var(--transition);
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.league-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    font-size: 12px;
    color: var(--text-secondary);
}

/* Coupons List */
.coupons-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
}

.coupon-item {
    padding: 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--surface-border);
    transition: var(--transition);
}

.coupon-item:hover {
    background: var(--surface-hover);
}

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

.coupon-id {
    font-size: 14px;
    color: var(--accent-primary);
    font-weight: 600;
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge.won { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.badge.lost { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.badge.waiting { background: rgba(245, 158, 11, 0.15); color: var(--warning); }

.coupon-stats {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
}

.coupon-stats strong {
    color: var(--text-primary);
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Loaders */
.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent-primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Match Team Names */
.team-name {
    font-weight: 600;
}
.match-score {
    font-weight: 700;
    background: rgba(255,255,255,0.1);
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 2px;
}
