:root {
    --bg-color: #0d0f14;
    --card-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.5);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

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

/* Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    filter: blur(80px);
}

.blob {
    position: absolute;
    width: 40vw;
    height: 40vw;
    border-radius: 50%;
    opacity: 0.2;
}

.blob-1 {
    background: var(--accent);
    top: -10%;
    left: -10%;
}

.blob-2 {
    background: #8b5cf6;
    bottom: -10%;
    right: -10%;
}

.blob-3 {
    background: #ec4899;
    top: 40%;
    left: 30%;
}

/* Header */
header {
    padding: 3rem 0;
    text-align: center;
}

h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.accent {
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
}

.status-badge {
    display: inline-block;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    backdrop-filter: blur(10px);
}

/* Navigation */
.header-nav {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: var(--accent);
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--glass-border);
}

/* Sections */
main {
    padding-bottom: 5rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin: 3rem 0 1.5rem;
    display: flex;
    align-items: center;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--glass-border), transparent);
    margin-left: 1.5rem;
}

/* Glass Cards */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass:hover {
    box-shadow: 0 0 30px rgba(0,0,0,0.3);
}

/* Leaderboard */
.leaderboard-card {
    overflow: hidden;
    margin-bottom: 4rem;
}

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

th {
    text-align: left;
    padding: 1.5rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid var(--glass-border);
}

td {
    padding: 1.5rem;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.text-center { text-align: center; }

tr:last-child td { border-bottom: none; }

.rank { font-weight: 800; color: var(--accent); }
.manager-name { font-weight: 600; }
.points { font-weight: 800; font-size: 1.4rem; }
.alive-count { color: var(--success); font-weight: 600; }

/* Rosters Grid */
.rosters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.roster-card {
    padding: 1.5rem;
}

.roster-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.roster-header h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
}

.roster-stats {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.team-list {
    list-style: none;
}

.team-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.team-item:last-child { border-bottom: none; }

.team-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.seed {
    background: rgba(255,255,255,0.1);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.team-name {
    font-weight: 500;
}

.team-wins {
    font-weight: 700;
    color: var(--accent);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 0.5rem;
}

.status-alive { background-color: var(--success); box-shadow: 0 0 10px var(--success); }
.status-out { background-color: var(--danger); opacity: 0.5; }

.team-out { opacity: 0.5; }

/* Games Grid */
.games-grid {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 0.5rem 0.5rem 1.5rem;
    scroll-snap-type: x mandatory;
}

.game-card {
    min-width: 280px;
    padding: 1.25rem;
    scroll-snap-align: start;
}

.game-status {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 1rem;
    display: block;
}

.game-score-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem 0;
}

.game-score {
    font-weight: 800;
    font-size: 1.2rem;
}

/* Footer */
footer {
    padding: 4rem 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Classic Grid */
.classic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 3rem;
}

.classic-card {
    padding: 1.5rem;
    overflow-x: auto;
}

.classic-card h3 {
    margin-bottom: 1rem;
    font-family: var(--font-heading);
    color: var(--accent);
    text-align: center;
    font-size: 1.8rem;
}

.classic-table {
    font-size: 0.8rem;
    text-align: center;
}

.classic-table th, .classic-table td {
    padding: 0.5rem;
    border: 1px solid var(--glass-border);
}

.classic-table th {
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
}

.classic-table .team-cell {
    text-align: left;
    font-weight: 600;
    min-width: 120px;
}

.win-active {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    font-weight: 800;
}

.win-lost {
    opacity: 0.4;
}

.totals-row {
    background: rgba(59, 130, 246, 0.2);
    font-weight: 800;
    color: var(--accent);
}

.totals-row td {
    border-top: 2px solid var(--accent) !important;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    .rosters-grid { grid-template-columns: 1fr; }
    .classic-grid { grid-template-columns: 1fr; }
    td, th { padding: 1rem; }
    .points { font-size: 1.1rem; }
}
