/* ============================================
   PredictCup - TBC Vibe
   Dark Mode with Orange Accent & Custom Fonts
   ============================================ */

@font-face {
  font-family: 'Nexa';
  src: url('../fonts/Nexa-ExtraLight.ttf') format('truetype');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Nexa';
  src: url('../fonts/Nexa-Heavy.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'BebasNeue';
  src: url('../fonts/BebasNeue-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
    /* TBC Dark Theme */
    --black: #0A0A0A;
    --black-soft: #0E0E0E;
    --black-card: #141414;
    --black-elevated: #1a1a1a;
    
    --white: #D9D9D9; 
    --white-soft: #BFBFBF; 
    --gray: #8C8C8C; 
    --gray-dark: #333333;

    /* TBC Orange Accent */
    --gold: #FF8E3C; 
    --gold-deep: #ff6b35;
    --gold-glow: rgba(255, 142, 60, 0.35);

    --accent: var(--gold);
    --accent-hover: var(--gold-deep);
    --success: #10b981;
    --error: #ef4444;
    --info: #3b82f6;

    /* Semantic mappings */
    --accent-color: var(--gold);
    --primary-color: #0A0A0A;
    --secondary-color: #0E0E0E;
    --bg-card: #141414;
    --text-dark: #D9D9D9;
    --text-light: #D9D9D9;
    --text-gray: #8C8C8C;
    --bg-dark: #0A0A0A;

    --glass-bg: rgba(17, 17, 17, 0.6);
    --glass-border: rgba(191, 191, 191, 0.1);
    --glass-hover: rgba(191, 191, 191, 0.05);

    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-gold: 0 8px 30px var(--gold-glow);

    --radius: 12px;
    --radius-sm: 8px;

    --font-main: 'Nexa', system-ui, sans-serif;
    --font-display: 'BebasNeue', sans-serif;
}

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

html { scroll-behavior: smooth; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: normal;
    letter-spacing: 0.5px;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

img { max-width: 100%; }

::selection { background: var(--gold); color: var(--black); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--gold-deep); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 var(--gold-glow); }
    50% { box-shadow: 0 0 25px 4px var(--gold-glow); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes countUp {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    60% { transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(191, 191, 191, 0.1);
    z-index: 9999;
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    padding: 0 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-brand img {
    height: 40px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    flex-shrink: 0;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: rgba(191, 191, 191, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    position: relative;
    padding: 8px 0;
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: #fff;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, #ff6b35, #FF8E3C);
    opacity: 0;
    transform: translateY(4px);
    transition: all 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    opacity: 1;
    transform: translateY(0);
}

.nav-cta {
    background: linear-gradient(to right, #ff6b35, #FF8E3C, #ff6b35);
    background-size: 200% auto;
    color: #fff !important;
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    animation: gradient-x 3s ease infinite;
}

.nav-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255,107,53,0.3);
}

.mobile-menu-btn {
    display: none;
    background: rgba(10, 10, 10, 0.5);
    border: 1px solid rgba(191, 191, 191, 0.2);
    color: #BFBFBF;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    color: #fff;
    border-color: rgba(255, 142, 60, 0.3);
}

.mobile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 5%;
    width: 250px;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(191, 191, 191, 0.1);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95) translateY(-10px);
    transform-origin: top right;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
}

.mobile-dropdown .nav-link {
    display: block;
    padding: 10px 15px;
    border-radius: 8px;
}

.mobile-dropdown .nav-link:hover {
    background: rgba(255,255,255,0.05);
}

.mobile-dropdown .nav-link::after {
    display: none; /* Hide bottom border on mobile */
}

.mobile-dropdown .nav-cta {
    text-align: center;
    margin-top: 10px;
    display: block;
}

@keyframes gradient-x {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@media (max-width: 768px) {
    .navbar-menu { display: none; }
    .mobile-menu-btn { display: block; }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    padding: 0.85rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}
.btn:hover::before { left: 100%; }

.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-deep));
    color: var(--black);
    box-shadow: 0 4px 15px var(--gold-glow);
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--gold-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--gold);
}
.btn-secondary:hover {
    background: var(--gold);
    color: var(--black);
    transform: translateY(-3px);
}

.btn:active { transform: translateY(-1px) scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ============================================
   HERO (TBC Dark)
   ============================================ */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: var(--bg-dark);
    position: relative;
    overflow: hidden;
}

.hero-container {
    width: 100%;
    max-width: 1400px;
    margin: auto;
    padding: 2rem 5%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content { flex: 1; z-index: 2; }

.hero h1 {
    color: #E5E5E5;
    font-size: clamp(3rem, 5vw, 5rem);
    line-height: 1.05;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.hero p {
    color: var(--gray);
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }
/* ============================================
   STATS
   ============================================ */
.stats {
    padding: 6rem 5%;
    background: var(--bg-dark);
    position: relative;
    overflow: hidden;
}

.stats::before {
    content: "";
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(
        circle,
        rgba(255,107,53,.25),
        transparent 70%
    );
    top: -200px;
    right: -150px;
}

.stats-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    z-index: 2;
}

.stats-header h2 {
    color: #fff;
    font-size: clamp(2rem,4vw,3rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.stats-header p {
    color: rgba(255,255,255,.7);
    max-width: 700px;
    margin: auto;
    font-size: 1.1rem;
}

.stats-grid {
    max-width: 1400px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
    gap: 2rem;
    position: relative;
    z-index: 2;
}

.stat-item {
    position: relative;
    padding: 2.5rem 2rem;
    text-align: center;
    border-radius: 20px;
    background: rgba(255,255,255,.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,.08);
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}

.stat-item::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(
        135deg,
        rgba(255,142,60,.15),
        rgba(255,107,53,.3)
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity .3s ease;
}

.stat-item:hover {
    transform: translateY(-8px);
    background: rgba(255,255,255,.06);
    border-color: rgba(255,142,60,.3);
    box-shadow:
        0 0 40px rgba(255,142,60,.15),
        0 20px 50px rgba(0,0,0,.4);
}

.stat-item:hover::before {
    opacity: 1;
}

.stat-icon-bg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-deep), var(--gold-deep));
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .3s ease;
    box-shadow: 0 0 30px rgba(37, 59, 119, 0.4);
}

.stat-item:hover .stat-icon-bg {
    transform: scale(1.1);
    box-shadow: 0 0 50px rgba(37, 59, 119, 0.6);
}

.stat-icon {
    font-size: 2.2rem;
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--gold);
    margin-bottom: 0.25rem;
    text-shadow:
        0 0 15px rgba(255,142,60,.3),
        0 0 30px rgba(255,107,53,.2);
    min-height: 3.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-label {
    color: rgba(255,255,255,.85);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: .9rem;
    font-weight: 700;
}

.stat-description {
    color: rgba(255,255,255,.5);
    font-size: .8rem;
    letter-spacing: 0.5px;
}

.stat-loader {
    display: inline-block;
    animation: pulse 1.5s ease-in-out infinite;
    font-size: 1.5rem;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* ============================================
   FEATURES
   ============================================ */
.features {
    padding: 7rem 5%;
    background: var(--bg-dark);
    position: relative;
    overflow: hidden;
}

.features::before {
    content: "";
    position: absolute;
    width: 700px;
    height: 700px;
    background: radial-gradient(
        circle,
        rgba(255,107,53,.18),
        transparent 70%
    );
    left: -250px;
    top: -250px;
}

.section-header {
    text-align: center;
    max-width: 850px;
    margin: 0 auto 5rem;
    position: relative;
    z-index: 2;
}

.section-tag {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 50px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    color: rgba(255,255,255,.9);
    font-size: .85rem;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    color: #fff;
    font-size: clamp(2.2rem, 4vw, 3.8rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.section-header p {
    color: rgba(255,255,255,.7);
    font-size: 1.1rem;
    line-height: 1.8;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    position: relative;
    z-index: 2;
}
@media (max-width: 1200px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}
.feature-card {
    position: relative;
    padding: 2.5rem;
    border-radius: 24px;
    background: rgba(255,255,255,.03);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,.08);
    transition: all .4s ease;
    overflow: hidden;
}

.feature-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background: linear-gradient(
        135deg,
        rgba(255,255,255,.15),
        rgba(255,107,53,.9),
        rgba(255,255,255,.15)
    );
    pointer-events: none;
    opacity: 0;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow:
        0 0 30px rgba(255,107,53,.4),
        0 20px 50px rgba(0,0,0,.6);
}

.feature-icon {
    width: 70px;
    height: 70px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 18px;

    background: linear-gradient(
        135deg,
        var(--gold-deep),
        var(--gold)
    );

    color: #fff;
    font-size: 1.3rem;
    font-weight: 800;

    margin-bottom: 1.5rem;

    box-shadow:
        0 0 20px rgba(255,107,53,.5);

    transition: .4s;
}

.feature-card:hover .feature-icon {
    transform: rotate(-8deg) scale(1.1);
}

.feature-card h3 {
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: rgba(255,255,255,.7);
    line-height: 1.8;
}

@media (max-width: 768px) {

    .features {
        padding: 5rem 1.5rem;
    }

    .section-header {
        margin-bottom: 3rem;
    }

    .feature-card {
        padding: 2rem;
    }
}

/* ============================================
   SECTION TITLES
   ============================================ */
.section-title, h2.page-title {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--white);
}

/* ============================================
   MATCH CARD
   ============================================ */
.match-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.75rem;
    margin-bottom: 1.25rem;
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease backwards;
}

.match-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 5px; height: 100%;
    background: linear-gradient(var(--gold), var(--gold-deep));
    opacity: 0;
    transition: opacity 0.3s;
}
.match-card:hover::before { opacity: 1; }

.match-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
    box-shadow: var(--shadow-lg);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.match-team {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex: 1;
}
.match-team:last-child { justify-content: flex-end; }

.team-logo {
    width: 54px; height: 54px;
    border-radius: 50%;
    background: var(--black-elevated);
    border: 2px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--gold);
    font-size: 1.2rem;
    object-fit: cover;
    transition: transform 0.3s;
}
.match-card:hover .team-logo { transform: scale(1.1); }

.match-details { text-align: center; margin-bottom: 1.5rem; }

.match-time {
    color: var(--gold);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    font-family: var(--font-display);
}
.match-stadium { color: var(--gray); font-size: 0.85rem; }

.match-scores {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.score {
    font-family: var(--font-display);
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--white);
}

.score-input {
    width: 64px; height: 64px;
    background: var(--black-elevated);
    border: 2px solid var(--gold);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-size: 2rem;
    font-family: var(--font-display);
    text-align: center;
    transition: all 0.3s;
}
.score-input:focus {
    outline: none;
    box-shadow: 0 0 0 4px var(--gold-glow);
    transform: scale(1.05);
}

.match-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 1.75rem;
    border: 1px solid var(--glass-border);
    transition: all 0.4s;
    animation: fadeInUp 0.6s ease backwards;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-6px);
    border-color: var(--gold);
    box-shadow: var(--shadow-gold);
}

.stat-card h3 {
    color: var(--gray);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-card .stat-value {
    font-family: var(--font-display);
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
}

.stat-card .stat-label {
    color: var(--gold);
    font-size: 0.85rem;
    margin-top: 0.35rem;
}

/* ============================================
   LEADERBOARD / TABLES
   ============================================ */
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    animation: fadeIn 0.8s ease;
}

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

.leaderboard-table th {
    background: var(--black-elevated);
    color: var(--gold);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
}

.leaderboard-table tbody tr {
    transition: all 0.25s;
}
.leaderboard-table tbody tr:hover {
    background: var(--glass-hover);
    transform: scale(1.005);
}

.rank-1 { color: var(--gold); font-weight: 700; font-size: 1.1rem; }
.rank-2 { color: #c0c0c0; font-weight: 700; }
.rank-3 { color: #cd7f32; font-weight: 700; }

/* ============================================
   ROOM CARD
   ============================================ */
.room-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: all 0.4s;
    animation: fadeInUp 0.6s ease backwards;
}

.room-card:hover {
    transform: translateY(-6px);
    border-color: var(--gold);
    box-shadow: var(--shadow-lg);
}

.room-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.room-name {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--white);
    letter-spacing: 0.5px;
}

.room-info {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.room-info span { color: var(--gray); font-size: 0.85rem; }
.room-info .icon { display: inline-flex; align-items: center; gap: 0.25rem; }

/* ============================================
   FORMS
   ============================================ */
.form-group { margin-bottom: 1.5rem; animation: fadeInUp 0.5s ease backwards; }

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--white-soft);
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: var(--black-elevated);
    color: var(--white);
    font-size: 1rem;
    font-family: var(--font-main);
    transition: all 0.3s;
}

.form-input::placeholder { color: var(--gray-dark); }

.form-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-glow);
    background: var(--black-card);
}

.form-input.error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(255, 77, 79, 0.25);
}

select.form-input { cursor: pointer; }
select.form-input option { background: var(--black-card); color: var(--white); }

.form-text {
    display: block;
    margin-top: 0.5rem;
    color: var(--gray);
    font-size: 0.85rem;
}

/* Auth card wrapper */
.auth-card {
    background: var(--glass-bg);
    backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    animation: bounceIn 0.6s ease;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    border-left: 4px solid;
    background: var(--glass-bg);
    animation: slideInLeft 0.5s ease;
}
.alert-success { border-color: var(--success); color: var(--success); }
.alert-error { border-color: var(--error); color: var(--error); }
.alert-warning { border-color: var(--gold); color: var(--gold); }
.alert-info { border-color: var(--info); color: var(--info); }

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-success { background: rgba(30, 215, 96, 0.2); color: var(--success); }
.badge-warning { background: var(--gold-glow); color: var(--gold); }
.badge-danger { background: rgba(255, 77, 79, 0.2); color: var(--error); }

/* Achievement badge */
.achievement-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    text-align: center;
    transition: all 0.4s;
}
.achievement-badge:hover {
    transform: translateY(-6px) scale(1.03);
    border-color: var(--gold);
    box-shadow: var(--shadow-gold);
}
.achievement-badge .badge-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-deep));
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    animation: float 4s ease-in-out infinite;
}
.achievement-badge.locked { opacity: 0.4; filter: grayscale(1); }

/* ============================================
   TABS
   ============================================ */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tab {
    padding: 0.6rem 1.4rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--gray);
    font-weight: 500;
}
.tab:hover { color: var(--white); border-color: var(--gold); }
.tab.active {
    background: linear-gradient(135deg, var(--gold), var(--gold-deep));
    color: var(--black);
    border-color: var(--gold);
    font-weight: 600;
}

/* ============================================
   MODAL
   ============================================ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(6px);
    z-index: 1001;
    align-items: center;
    justify-content: center;
}
.modal.active { display: flex; animation: fadeIn 0.3s ease; }

.modal-content {
    background: var(--black-card);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: bounceIn 0.4s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.modal-title { font-size: 1.5rem; color: var(--white); font-family: var(--font-display); }
.modal-close {
    background: none; border: none; color: var(--gray);
    font-size: 1.5rem; cursor: pointer; transition: color 0.3s;
}
.modal-close:hover { color: var(--error); }

/* ============================================
   TOAST
   ============================================ */
.toast {
    position: fixed;
    bottom: 20px; right: 20px;
    background: var(--black-elevated);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
    z-index: 9999;
    max-width: 380px;
    box-shadow: var(--shadow-lg);
}
.toast.active { transform: translateX(0); }
.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--error); }
.toast-warning { border-left: 4px solid var(--gold); }
.toast-content { display: flex; align-items: center; gap: 1rem; }
.toast-message { flex: 1; color: var(--white); }
.toast-close { background: none; border: none; color: var(--gray); font-size: 1.25rem; cursor: pointer; }

/* ============================================
   LOADING SPINNER
   ============================================ */
.loading {
    display: inline-block;
    width: 18px; height: 18px;
    border: 2px solid var(--glass-border);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--black-soft);
    border-top: 1px solid var(--glass-border);
    padding: 3.5rem 0 2rem;
    margin-top: 4rem;
    position: relative;
}
.footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
}
.footer h4 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-family: var(--font-display);
    letter-spacing: 1px;
    text-transform: uppercase;
}
.footer p { color: var(--gray); }
.footer a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s;
    line-height: 2;
}
.footer a:hover { color: var(--gold); padding-left: 4px; }

.footer-bottom {
    text-align: center;
    color: var(--gray-dark);
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================
   UTILITIES
   ============================================ */
.text-gold { color: var(--gold); }
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

.page-section { padding: 2.5rem 0; animation: fadeInUp 0.6s ease; }

.card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: all 0.4s;
}
.card:hover { border-color: var(--gold); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .navbar-menu { gap: 1rem; font-size: 0.85rem; }
}

@media (max-width: 768px) {
    .navbar-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.85rem;
    }
    .hero { min-height: 70vh; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .match-scores { gap: 1rem; }
    .leaderboard-table { display: block; overflow-x: auto; white-space: nowrap; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .hero-buttons .btn { width: 100%; max-width: 280px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .stat-number { font-size: 2.25rem; }
}

/* ============================================
   AVATAR / USER MENU / MISC COMPAT
   ============================================ */
.user-menu {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}
.avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--gold-glow);
}

.avatar-lg {
    width: 120px; height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--gold);
    box-shadow: var(--shadow-gold);
}

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

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

/* Profile header banner */
.profile-banner {
    background:
        linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.9)),
        url('https://picsum.photos/seed/wcprofile/1200/300') center/cover no-repeat;
    border-radius: var(--radius);
    padding: 2.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--glass-border);
    animation: fadeIn 0.8s ease;
}

/* Page hero header (smaller hero for inner pages) */
.page-hero {
    text-align: center;
    padding: 3rem 1.5rem 2rem;
    animation: fadeInUp 0.6s ease;
}
.page-hero h1, .page-hero h2 {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--white);
}
.page-hero h1::after, .page-hero h2::after {
    content: '';
    display: block;
    width: 80px; height: 3px;
    background: var(--gold);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* ============================================
   TBC DARK & ORANGE VIBE
   ============================================ */

.tbc-hero {
    background: linear-gradient(to bottom, #0E0E0E, #0A0A0A);
    min-height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--glass-border);
}

.tbc-btn-primary {
    background: linear-gradient(to right, #ff6b35, #FF8E3C);
    color: #fff !important;
    border: none;
    box-shadow: 0 8px 30px rgba(255,107,53,0.35);
    border-radius: 50px;
    padding: 16px 32px;
    font-weight: 600;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.tbc-btn-primary:hover {
    box-shadow: 0 12px 40px rgba(255,107,53,0.5);
    transform: translateY(-2px);
    background: linear-gradient(to right, #FF8E3C, #ff6b35);
}

.tbc-btn-secondary {
    background: rgba(255,255,255,0.04);
    color: #D9D9D9 !important;
    border: 1px solid rgba(191,191,191,0.2);
    border-radius: 50px;
    padding: 16px 32px;
    font-weight: 600;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.tbc-btn-secondary:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(217,217,217,0.5);
}

/* ============================================
   PAGE LOADER
   ============================================ */

#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-dark);
    z-index: 9999999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#page-loader img {
    height: 90px;
    width: auto;
    animation: loaderPulse 1s infinite alternate ease-in-out;
}

@keyframes loaderPulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    100% { transform: scale(1.1); opacity: 1; }
}

.loader-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
}


