@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@500;600;700;800;900&display=swap');

:root {
    --bg-base: #020617;
    --bg-card: rgba(15, 23, 42, 0.7);
    --border-card: rgba(255, 255, 255, 0.08);
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #0ea5e9;
    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
}

/* Light Theme Variables */
body.light-theme {
    --bg-base: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.8);
    --border-card: rgba(15, 23, 42, 0.08);
    --accent: #4f46e5;
    --accent-glow: rgba(79, 70, 229, 0.1);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

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

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', sans-serif;
    min-height: 100vh;
    line-height: 1.6;
    background-attachment: fixed;
    transition: background-color 0.3s, color 0.3s;
}

body.dark-theme-grid {
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.04) 0px, transparent 50%);
}

body.light-theme {
    background-image: 
        radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.03) 0px, transparent 50%);
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Navbar */
.navbar {
    background: rgba(var(--bg-base), 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-card);
    padding: 18px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.nav-logo img {
    width: 40px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.4));
}

.nav-logo span {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: 0.5px;
    background: linear-gradient(to right, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn {
    text-decoration: none;
    padding: 10px 18px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 10px;
    color: var(--text-secondary);
    border: 1px solid transparent;
    transition: all 0.2s ease-in-out;
    text-transform: uppercase;
}

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

.nav-btn.active {
    color: #fff !important;
    background: var(--accent);
    box-shadow: 0 4px 15px var(--accent-glow);
}

/* Theme Toggle Button */
.theme-toggle {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-card);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.2s;
}

.theme-toggle:hover {
    background: rgba(255,255,255,0.1);
    transform: scale(1.05);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 20px;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3.2rem;
    font-weight: 900;
    margin: 0;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.15rem;
    margin-top: 12px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Statistics cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 20px 30px -10px var(--accent-glow);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.stat-val {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    margin-top: 4px;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Leaderboards & Sidebars */
.card-premium {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.title-premium {
    font-family: 'Outfit', sans-serif;
    font-weight: 850;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

/* Table styles */
.public-table-container {
    overflow-x: auto;
    border-radius: 20px;
    border: 1px solid var(--border-card);
    background: var(--bg-card);
}

.public-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.public-table th {
    padding: 18px 24px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-card);
    background: rgba(0, 0, 0, 0.05);
}

.public-table td {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-card);
    font-size: 0.92rem;
}

.public-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Custom interactive inputs */
.filter-form-premium {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 15px;
    background: rgba(0, 0, 0, 0.1);
    padding: 20px;
    border-radius: 20px;
    border: 1px solid var(--border-card);
    margin-bottom: 30px;
    align-items: center;
}

.input-premium {
    width: 100%;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-card);
    padding: 12px 18px;
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s;
}

.input-premium:focus {
    border-color: var(--accent);
    background: rgba(15, 23, 42, 0.6);
    box-shadow: 0 0 10px var(--accent-glow);
}

.btn-premium {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px var(--accent-glow);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-premium:hover {
    transform: translateY(-2px);
    opacity: 0.95;
    box-shadow: 0 6px 20px var(--accent-glow);
}

/* Badges */
.badge-custom {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.badge-custom.success { background: rgba(16, 185, 129, 0.1); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-custom.danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.2); }
.badge-custom.warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.2); }

/* responsive */
@media (max-width: 1024px) {
    .filter-form-premium {
        grid-template-columns: 1fr;
    }
}
