:root {
    /* Brand Colors */
    --brand-magenta: #ec4899;
    --brand-violet: #8b5cf6;
    --brand-cyan: #06b6d4;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--brand-magenta), var(--brand-violet));
    --gradient-glow: linear-gradient(45deg, var(--brand-magenta), var(--brand-violet), var(--brand-cyan), var(--brand-magenta));

    /* Backgrounds */
    --bg-dark: #09090b;
    --bg-card: rgba(24, 24, 27, 0.4);
    --bg-card-hover: rgba(39, 39, 42, 0.6);

    /* Text */
    --text-main: #fafafa;
    --text-muted: #a1a1aa;

    /* Borders */
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(236, 72, 153, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(236, 72, 153, 0.3);
}

.text-cyan {
    color: var(--brand-cyan);
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* Background Mesh Animation */
.mesh-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.15), transparent 30%),
        radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.15), transparent 30%),
        radial-gradient(circle at 50% 80%, rgba(6, 182, 212, 0.1), transparent 40%),
        var(--bg-dark);
    filter: blur(60px);
    animation: meshMove 20s ease-in-out infinite alternate;
}

@keyframes meshMove {
    0% {
        transform: scale(1) translate(0, 0);
    }

    50% {
        transform: scale(1.1) translate(-2%, 2%);
    }

    100% {
        transform: scale(1) translate(2%, -2%);
    }
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

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

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

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

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-10 {
    margin-bottom: 2.5rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.ml-2 {
    margin-left: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* Padding Utilities */
.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Display Utilities */
.inline-block {
    display: inline-block;
}

/* Width Constraints */
.max-w-6xl {
    max-width: 72rem;
}

/* Border Utilities */
.rounded-full {
    border-radius: 9999px;
}

/* Overflow Utilities */
.overflow-x-auto {
    overflow-x: auto;
}

/* Typography Utilities */
.text-white {
    color: #ffffff;
}

.text-magenta {
    color: var(--brand-magenta);
}

.text-cyan {
    color: var(--brand-cyan);
}

.text-sm {
    font-size: 0.875rem;
}

.text-lg {
    font-size: 1.125rem;
}

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

.font-bold {
    font-weight: 700;
}

.uppercase {
    text-transform: uppercase;
}

.tracking-wider {
    letter-spacing: 0.05em;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(9, 9, 11, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
    padding: 1rem 0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 900;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

/* Glass Panels & Cards */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-glass);
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    background: var(--bg-card-hover);
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6), 0 0 20px rgba(236, 72, 153, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--brand-violet), var(--brand-magenta));
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 30px -10px rgba(236, 72, 153, 0.6);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 1px solid var(--border-glass);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Inputs & Forms */
.input-group {
    margin-bottom: 1.5rem;
}

.input-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.input-field {
    width: 100%;
    padding: 0.75rem 1.25rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: 0.75rem;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.input-field:focus {
    border-color: var(--brand-magenta);
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.2);
}

/* Animations */
.fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Glowing Border for special cards */
.glow-border {
    position: relative;
    padding: 2px;
    border-radius: 1.5rem;
    background: var(--gradient-glow);
    background-size: 300%;
    animation: glowRotate 4s linear infinite;
}

.glow-border>div {
    background: var(--bg-dark);
    border-radius: calc(1.5rem - 2px);
    height: 100%;
    position: relative;
    z-index: 2;
}

@keyframes glowRotate {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Floating Animation */
.float {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 100;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border-radius: 9999px;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    width: max-content;
    max-width: 90vw;
}

.cookie-banner.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Tab Switcher */
.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: var(--brand-cyan);
    border-bottom-color: var(--brand-cyan);
}

.tab-btn:hover:not(.active) {
    color: white;
}

/* Stat Cards */
.stat-card {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.05), rgba(139, 92, 246, 0.05));
    border: 1px solid rgba(236, 72, 153, 0.15);
    padding: 1.25rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 700;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 900;
    line-height: 1.1;
}

/* Width Utilities */
.w-full {
    width: 100%;
}

.w-auto {
    width: auto;
}

/* Font Utilities */
.font-semibold {
    font-weight: 600;
}

/* Hover Utilities */
.hover\:text-white:hover {
    color: #ffffff;
}

/* Grid Layouts */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .md\:flex-row {
        flex-direction: row;
    }

    .md\:w-auto {
        width: auto;
    }

    .md\:gap-0 {
        gap: 0;
    }

    .md\:gap-6 {
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Avatar Ring */
.avatar-ring {
    background: var(--gradient-primary);
    padding: 2px;
    border-radius: 50%;
    display: inline-flex;
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.3);
}

.avatar-ring img {
    border-radius: 50%;
    background: var(--bg-dark);
}

/* Footer */
.footer {
    margin-top: auto;
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--border-glass);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    h1 { font-size: 1.8rem !important; }
    h2 { font-size: 1.5rem !important; }
    h3 { font-size: 1.25rem !important; }
    p { font-size: 0.9rem !important; }
    
    .dashboard-content, .page-content {
        padding-top: 4.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    .glass-panel, .host-panel {
        padding: 1rem !important;
    }
    
    .flex-col-mobile {
        flex-direction: column !important;
    }
    
    .input-group, .input-field {
        width: 100% !important;
    }
    
    .btn:not(.navbar .btn):not(.navbar a.btn):not(.navbar-btn) {
        width: 100% !important;
    }

    .input-field {
        padding: 0.5rem 1rem !important;
        font-size: 0.9rem !important;
    }

    .btn {
        padding: 0.6rem 1rem !important;
        font-size: 0.9rem !important;
    }
    
    .gap-4, .gap-6, .gap-8 {
        gap: 0.75rem !important;
    }

    .mobile-hide {
        display: none !important;
    }

    .mobile-float {
        display: none !important;
    }
    
    .mobile-text-hide {
        display: none !important;
    }

    .leaderboard-container {
        overflow-x: auto;
        display: block;
        width: 100%;
    }

    /* Top Bar Header scaling */
    .logo-container {
        font-size: 1.1rem !important;
    }

    .logo-icon {
        width: 1.8rem !important;
        height: 1.8rem !important;
        font-size: 1rem !important;
        border-radius: 0.5rem !important;
    }

    /* Cookie Banner — stack vertically, use rounded corners instead of pill */
    .cookie-banner {
        flex-direction: column !important;
        text-align: center;
        border-radius: 1.5rem !important;
        width: calc(100% - 2rem) !important;
        left: 1rem !important;
        right: 1rem !important;
        transform: translateX(0) translateY(100px) !important;
        padding: 1.25rem !important;
    }

    .cookie-banner.show {
        transform: translateX(0) translateY(0) !important;
    }

    .cookie-banner .flex {
        justify-content: center;
        width: 100%;
    }

    /* Navbar — keep compact on mobile */
    .navbar {
        padding: 0.5rem 0;
    }

    .navbar .container {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        justify-content: space-between;
    }

    .navbar .container > div:last-child {
        flex-direction: row !important;
        gap: 0.5rem !important;
        width: auto !important;
    }

    .navbar .container a.btn {
        padding: 0.4rem 0.5rem !important;
        font-size: 0.75rem !important;
        white-space: nowrap;
    }

    .navbar .container > div:last-child a {
        width: auto !important;
        font-size: 0.75rem !important;
        padding: 0.4rem 0.5rem !important;
        white-space: nowrap;
    }

    /* Features section — tighter padding on mobile */
    .features {
        padding: 3rem 0 !important;
    }

    .feature-card {
        padding: 1.5rem !important;
    }
}