/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

@keyframes gradient-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- Basic Reset & Body Style --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #000000; /* CHANGED from #929292 to PURE BLACK */
    color: #ffffff;
	padding-top: 78px;
}
/* Ensure no hero gradients interfere */
.hero {
    background: #000000; 
}

/* --- Global Container --- */
.container {
    width: 90%;
    max-width: 1200px; /* Default max-width for most pages */
    margin: 0 auto;
}

/* ========================================= */
/* === UPDATED PREMIUM NAVBAR STYLES === */
/* ========================================= */

.navbar {
    /* 1. Remove side padding so the container dictates the width */
    padding: 1rem 0; 
    
    /* Keep your existing Glassmorphism settings */
    background-color: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.08); 
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    
    /* Layout */
	width: 100%;
	max-width: 100%;
    position: fixed;
    top: 0;
    z-index: 1000;
}

/* 3. THE ANIMATED GRADIENT BORDER */
.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px; /* Slightly thicker to be seen */
    
    /* The flowing gradient */
    background: linear-gradient(90deg, #cf0000, #3b82f6, #cf0000, #3b82f6);
    background-size: 300% 100%; /* stretched so it flows smoothly */
    animation: gradientFlow 6s linear infinite;
    z-index: 1001;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* --- The "Arena Switch" (Styled Dropdown Toggle) --- */
.nav-arena-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 0.5rem 1.25rem; /* Slightly larger hit area */
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative; /* Needed for dropdown positioning */
}

.nav-arena-switch:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

/* 4. FIXING THE TEXT COLORS */
/* Default State */
.nav-arena-switch .nav-choose { color: #888; transition: color 0.3s ease; }
.nav-arena-switch .nav-arena  { color: #888; transition: color 0.3s ease; }
.nav-arena-switch .arrow      { color: #555; transition: color 0.3s ease; }

/* Hover State - Specific colors */
.nav-arena-switch:hover .nav-choose { color: #cf0000 !important; } /* Red */
.nav-arena-switch:hover .nav-arena  { color: #3b82f6 !important; } /* Blue */
.nav-arena-switch:hover .arrow      { color: #fff; }

/* ========================================= */
/* === FINAL DROPDOWN FIX (Stable) === */
/* ========================================= */

.nav-dropdown {
    position: relative; /* Anchor for the menu */
    height: 100%; /* Ensure full height for hover detection */
    display: flex;
    align-items: center;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    
    /* Horizontal Centering */
    left: 50%;
    transform: translateX(-50%);
    
    /* Vertical Positioning (The Gap) */
    top: 100%; 
    margin-top: 10px; /* visual gap */
    
    /* Styling */
    min-width: 220px;
    background-color: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 0.5rem 0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    z-index: 1100;
}

/* THE INVISIBLE BRIDGE (The Fix) */
/* This creates a safe zone covering the gap so mouse doesn't lose focus */
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -20px; /* Reaches up 20px to touch the navbar */
    left: 0;
    width: 100%;
    height: 20px; /* Height of the safe zone */
    background: transparent; 
}

/* Hover State */
.nav-dropdown:hover .nav-dropdown-menu {
    display: block;
    animation: menuFadeIn 0.2s ease-out forwards;
}

@keyframes menuFadeIn {
    from { opacity: 0; margin-top: 20px; } /* Start slightly lower */
    to   { opacity: 1; margin-top: 10px; } /* End at 10px gap */
}

/* LINKS (Left Aligned) */
.nav-dropdown-menu li {
    display: block;
    width: 100%;
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #ccc;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    text-align: left; /* FIXED: Back to left alignment */
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-dropdown-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding-left: 1.75rem; /* Slight nudge effect on hover */
}

/* Headers inside dropdown (Rap Hub / Beatbox Hub text) */
.nav-dropdown-header {
    text-align: left; /* Ensure headers are left aligned too */
    padding: 0.75rem 1.5rem 0.25rem;
}

/* --- Dropdown Link Hover Effects --- */
.nav-dropdown-menu a.nav-link-rap:hover {
    color: #cf0000 !important; /* Rap Red */
    padding-left: 2rem; /* Slide effect */
}

.nav-dropdown-menu a.nav-link-beats:hover {
    color: #3b82f6 !important; /* Beat Blue */
    padding-left: 2rem; /* Slide effect */
}

/* --- Fix Broken Headers --- */
.nav-dropdown-header {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #666; /* Muted text */
    font-weight: 800;
    padding: 1rem 1.5rem 0.5rem 1.5rem; /* Better spacing */
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,255,255,0.05); /* Subtle divider */
    margin-bottom: 0.25rem;
}

/* 2. FORCE EXACT ALIGNMENT WITH PAGE CONTENT */
.navbar-container {
    width: 90%; /* Matches your global .container */
    max-width: 1200px; /* Matches your global .container */
    margin: 0 auto; /* Centers it */
    
    /* Keep Flexbox layout for Logo/Links/User alignment */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Styling */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
}
.nav-logo img {
    height: 40px;
    width: auto;
    display: block;
}

/* Center Links Flexbox */
.nav-center-links {
    display: flex;
    align-items: center; /* Vertically align text and buttons */
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

/* Default Nav Links (The Scoop, Forum) */
.nav-center-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding-bottom: 0.25rem;
    position: relative;
    transition: color 0.3s ease;
}
.nav-center-links a:hover {
    color: #cf0000;
}



/* --- NEW: The "Arena Switch" (Pill Button) --- */
.nav-arena-switch {
    /* Button Reset */
    appearance: none;
    -webkit-appearance: none;
    border: none;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    
    /* Flexbox for internal alignment */
    display: flex;
    align-items: center;
    gap: 0.5rem;
    
    /* Pill Shape & Glass Style */
    background: rgba(255, 255, 255, 0.08); /* Subtle white tint */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Subtle border */
    border-radius: 50px; /* Fully rounded */
    padding: 0.5rem 1.25rem;
    color: #fff;
    
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-arena-switch:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.nav-arena-switch .nav-choose { color: #aaa; font-weight: 400; } /* "Choose" is subtle */
.nav-arena-switch .nav-arena { color: #fff; font-weight: 700; }  /* "Arena" is bold */
.nav-arena-switch .arrow { font-size: 0.7rem; color: #888; }

/* Active/Hover states for Switch Text */
.nav-arena-switch:hover .nav-arena { color: #cf0000; } 
.nav-arena-switch:hover .arrow { color: #cf0000; }


/* --- "More" Dropdown Toggle --- */
.nav-link-more {
    background: none;
    border: none;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.3s ease;
}
.nav-link-more:hover {
    color: #cf0000;
}
.nav-link-more .arrow {
    font-size: 0.7rem;
    margin-top: 2px;
}


/* --- Right Side Actions --- */
.nav-right-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.sign-in-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: color 0.3s ease;
}

.sign-in-link:hover {
    color: #cf0000;
}

.cta-button {
    background-color: #cf0000;
    color: #ffffff;
    padding: 0.40rem 0.80rem; /* Fixed padding */
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.3s ease, background-color 0.3s ease;
    align-items: center;
    justify-content: center;
    display: inline-block;
    min-width: 100px;
    text-align: center;
}
.cta-button:hover {
    background-color: #b30000;
    transform: scale(1.05);
    color: #ffffff;
}

/* --- Hamburger Menu --- */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1200;
}
.nav-toggle .bar {
    width: 2rem;
    height: 0.25rem;
    background-color: white;
    border-radius: 10px;
    transition: all 0.3s linear;
}
.nav-toggle.active .bar:nth-child(1) { transform: translateY(11px) rotate(45deg); }
.nav-toggle.active .bar:nth-child(2) { opacity: 0; }
.nav-toggle.active .bar:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }


/* ========================================= */
/* === PREMIUM MOBILE NAV REDESIGN (2025) === */
/* ========================================= */

.mobile-nav-menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -100%; /* Hidden by default */
    width: 100%; /* Full width on mobile for better immersion */
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(135deg, #050505 0%, #0a0a0a 100%); /* Premium gradient */
    z-index: 99999;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1); /* Smooth easing */
}

.mobile-nav-menu.active {
    right: 0;
}

/* --- 1. HEADER (Fixed at top) --- */
.mobile-menu-header {
    flex-shrink: 0;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.5);
}

.mobile-menu-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 3px;
    text-transform: uppercase;
    background: linear-gradient(90deg, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* NEW: Close Button Styling */
.mobile-close-btn {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}
.mobile-close-btn svg {
    width: 32px;
    height: 32px;
}
.mobile-close-btn:hover {
    background: rgba(207, 0, 0, 0.2); /* Red tint on hover */
    color: #cf0000;
    transform: rotate(90deg); /* Cool spin effect */
}

/* --- 2. SCROLLABLE CONTENT --- */
.mobile-scroll-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 2rem;
    background: radial-gradient(circle at top right, rgba(20, 20, 20, 0.5), transparent);
}

/* The Arena Dropdown Group */
.mobile-nav-group {
    margin-bottom: 2rem;
    background-color: #0c0c0c;
    border: 1px solid #222;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.mobile-dropdown-toggle {
    width: 100%;
    background: linear-gradient(90deg, #111, #0a0a0a);
    color: #fff;
    padding: 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
    border-bottom: 1px solid #222;
    cursor: pointer;
}

/* Rap Hub Section (Red) */
.hub-rap-premium {
    padding: 1rem 1.5rem;
    border-left: 4px solid #cf0000;
    background: linear-gradient(90deg, rgba(207, 0, 0, 0.05) 0%, transparent 100%);
    margin-bottom: 1px;
}
.hub-rap-premium .mobile-hub-title {
    color: #cf0000;
    font-size: 0.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    display: block;
    letter-spacing: 1px;
}

/* Beatbox Hub Section (Blue) */
.hub-beats-premium {
    padding: 1rem 1.5rem;
    border-left: 4px solid #3b82f6;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.05) 0%, transparent 100%);
}
.hub-beats-premium .mobile-hub-title {
    color: #3b82f6;
    font-size: 0.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    display: block;
    letter-spacing: 1px;
}

/* Links inside the Hubs */
.mobile-hub-section a {
    display: block;
    color: #ccc;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.4rem 0;
    font-weight: 500;
    transition: transform 0.2s ease, color 0.2s ease;
}
.hub-rap-premium a:hover { color: #fff; transform: translateX(5px); }
.hub-beats-premium a:hover { color: #fff; transform: translateX(5px); }

/* Regular Page Links */
.mobile-links-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
a.mobile-link {
    display: block;
    color: #eee;
    text-decoration: none;
    font-size: 1.25rem; /* Larger font */
    font-weight: 700;
    padding: 1rem;
    border-radius: 8px;
    transition: background 0.3s ease;
}
a.mobile-link:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
    padding-left: 1.5rem; /* Slide animation */
}
a.admin-link {
    color: #ffd700;
    border: 1px dashed #ffd700;
    margin-top: 1rem;
    text-align: center;
}

/* --- 3. FOOTER (Bottom Actions) --- */
.mobile-menu-footer {
    flex-shrink: 0;
    padding: 2rem;
    padding-bottom: calc(2rem + env(safe-area-inset-bottom)); 
    background-color: #050505;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-profile-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
}

.mobile-auth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.mobile-btn-login, .mobile-btn-join {
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}
.mobile-btn-login { 
    border: 1px solid #444; 
    color: #fff; 
    background: transparent;
}
.mobile-btn-join { 
    background: #cf0000; 
    color: #fff; 
    box-shadow: 0 4px 15px rgba(207, 0, 0, 0.4);
}

/* Logout Button */
.mobile-logout-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 1rem;
    color: #aaa;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    border: 1px solid #333;
    border-radius: 8px;
    margin-top: 1rem;
}
.mobile-logout-btn:hover {
    color: #fff;
    background: #111;
}

/* --- Hero Section Styles --- */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(to bottom, #222222, #000000);
    min-height: calc(100vh - 81px); /* Adjusted for typical navbar height */
}

.hero-tag {
    background-color: #cc0000;
    color: #ffffff;
    font-weight: 700;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-bottom: 2rem;
    border: none;
}

.hero-image {
    max-width: 100%;
    width: 500px; /* Doubled from 500px */
    height: auto;
    margin-bottom: 2rem;
}

.hero-description {
    max-width: 600px;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer; /* Ensure buttons look clickable */
}

.btn:hover {
    transform: translateY(-3px);
}

.btn-primary {
    background-color: #cf0000;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #b30000;
}

/* This is the larger CTA button */



.btn-primary-cta {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    background-color: #cf0000;
    color: #ffffff;
    display: inline-block;
    margin-top: 1rem;
}

.btn-primary-cta:hover {
    background-color: #b30000;
    transform: translateY(-3px);
}


.btn-secondary {
    background-color: #ffffff;
    color: #000000;
    border: 2px solid #ffffff;
}

.btn-secondary:hover {
    background-color: transparent;
    color: #ffffff;
}

.btn .icon-mic {
    width: 20px;
    height: 20px;
}

/* Small button variant */
.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}


/* --- Active Battles Section --- */
.battles {
    padding: 4rem 0;
    background-color: #000;
}

.battles-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 2.5rem;
}

.battles-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.battles-header p {
    font-size: 1.1rem;
    color: #aaa;
}

.btn-outline-white {
    background-color: #ffffff;
    color: #000000;
    border: 2px solid #ffffff;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-outline-white:hover {
    background-color: #cf0000;
    color: #000000;
    border-color: #cf0000;
}

.battles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.battle-card {
    background: #1a1a1a;
    border: 2px solid #cf0000;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.battle-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(207, 0, 0, 0.3);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.card-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 50px;
    padding: 0.25rem 0.75rem;
}

.card-status-live {
    background-color: #cf0000;
    color: white;
}

.card-status-time {
    background-color: #444;
    color: #eee;
}

.card-status-time svg {
    width: 16px;
}

.card-type {
    font-size: 0.9rem;
    font-weight: 700;
    color: #cf0000;
    background-color: rgba(207, 0, 0, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
}

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.mc-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mc-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #555;
    border: 2px solid #cf0000;
    /* Added background properties for dynamic images */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.mc-name {
    font-size: 1.25rem;
    font-weight: 700;
}

.vs-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #cf0000;
    margin: 0.5rem 0;
}

.card-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #aaa;
    font-weight: 600;
    margin-top: 1rem;
}

.card-stats svg {
    width: 20px;
    height: 20px;
}

.card-footer {
    padding: 1rem;
    background-color: #111;
}

.btn-full-width {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.75rem;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-watch {
    background-color: #cf0000;
    color: white;
}

.btn-watch:hover {
    background-color: #b30000;
}

.btn-remind {
    background-color: #555;
    color: #ddd;
}

.btn-remind:hover {
    background-color: #777;
}


/* --- Leaderboard Section (Homepage) --- */
.leaderboard {
    padding: 4rem 0;
    background: linear-gradient(to bottom, #000, #111);
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.leaderboard-header h2 {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.trophy-icon {
    width: 32px;
    height: 32px;
    color: #ffd700; /* Gold */
}

.leaderboard-header p {
    font-size: 1.1rem;
    color: #aaa;
}

.leaderboard-table-container {
    background: #1a1a1a;
    border: 1px solid #333; /* Lighter gray border */
    border-radius: 12px;
    overflow: hidden; /* Changed from auto to hidden for the container */
    overflow-x: auto; /* Allow horizontal scroll only when needed */
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.leaderboard-table thead tr {
    background-color: #000; /* Darker header */
    border-bottom: 2px solid #cf0000; /* Red accent */
}

.leaderboard-table th {
    padding: 1.25rem 1rem;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    color: #aaa;
    white-space: nowrap; /* Prevent headers from wrapping */
}

.leaderboard-table td {
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    vertical-align: middle;
    white-space: nowrap; /* Prevent cell content from wrapping */
}

.leaderboard-table tbody tr {
    border-bottom: 1px solid #2a2a2a;
    transition: background-color 0.3s ease;
}

.leaderboard-table tbody tr:last-child {
    border-bottom: none;
}

.leaderboard-table tbody tr:hover {
    background-color: #222;
}

/* MC Column Style */
.mc-cell {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mc-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #555;
    border: 2px solid #777;
    flex-shrink: 0; /* Prevent avatar shrinking */
    /* Added background properties for dynamic images */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Win Rate Bar */
.win-rate-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.win-rate-text {
    width: 40px; /* Aligns text */
    font-size: 0.9rem;
    flex-shrink: 0;
}

.win-rate-bar {
    /* flex: 1; removed */
    min-width: 100px;
    height: 8px;
    background-color: #333;
    border-radius: 4px;
    overflow: hidden;
}

.win-rate-fill {
    height: 100%;
    background-color: #cf0000;
    border-radius: 4px;
}

/* Trend Arrows */
.trend-up {
    width: 24px;
    height: 24px;
    color: #4caf50; /* Green */
}

.trend-down {
    width: 24px;
    height: 24px;
    color: #cf0000; /* Red */
}

.wl-win {
    color: #4caf50; /* Green */
    font-weight: 700;
}
.wl-loss {
    color: #cf0000; /* Red */
    font-weight: 700;
}
.points-red {
    color: #cf0000;
    font-weight: 700;
}

.rank-gold {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffd700;
}
.rank-silver {
    font-size: 1.1rem;
    font-weight: 700;
    color: #c0c0c0;
}
.rank-bronze {
    font-size: 1.1rem;
    font-weight: 700;
    color: #cd7f32;
}


/* --- Upcoming Events Section --- */
.events {
    padding: 4rem 0;
    background: linear-gradient(to bottom, #111, #000);
}

.events-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.events-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.events-header p {
    font-size: 1.1rem;
    color: #aaa;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.event-card {
    background-color: #0a0a0a; /* Almost black */
    border: 1px solid #333; /* Subtle gray border */
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative; /* For the gradient */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Subtle gradient from top-left */
.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 150%; /* Make gradient larger */
    height: 150%;
    background: radial-gradient(circle at top left, rgba(207, 0, 0, 0.1) 0%, transparent 40%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(207, 0, 0, 0.1);
    border-color: #cf0000; /* Light up border on hover */
}

.event-card:hover::before {
    opacity: 1;
}

/* Card Header */
.event-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #333;
    position: relative;
    z-index: 2; /* Above gradient */
}

.event-tag {
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    color: white;
}
.tag-red { background-color: #cf0000; }

.event-status {
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    color: white;
}
.status-open { background-color: #4caf50; } /* Green */
.status-full { background-color: #cf0000; } /* Red */
.status-soon { background-color: #3b82f6; } /* Blue */

/* Card Body */
.event-card-body {
    padding: 1.5rem;
    flex-grow: 1; /* Makes body take up space */
    position: relative;
    z-index: 2; /* Above gradient */
}

.event-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}

.event-info {
    list-style: none;
    margin-bottom: 1.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: #ccc;
}

.info-item svg {
    width: 20px;
    height: 20px;
    color: #cf0000;
    flex-shrink: 0; /* Prevents icon from shrinking */
}

/* Progress Bar */
.event-progress-bar {
    width: 100%;
    height: 10px;
    background-color: #333;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 1rem;
}

.progress-fill {
    height: 100%;
    background-color: #cf0000;
    border-radius: 5px;
    transition: width 0.5s ease-in-out;
}

.progress-fill-muted { /* For the "Soon" card */
    height: 100%;
    background-color: #555;
    border-radius: 5px;
    width: 0%; /* 0% fill, but container is visible */
}


/* Card Footer */
.event-card-footer {
    padding: 1.5rem;
    padding-top: 0;
    margin-top: auto; /* Pushes footer to bottom */
    position: relative;
    z-index: 2; /* Above gradient */
}

.btn-register {
    background-color: #cf0000;
    color: white;
}
.btn-register:hover {
    background-color: #b30000;
}

.btn-full {
    background-color: #555;
    color: #999;
    cursor: not-allowed;
    text-align: center;
}

/* The "different" red button */
.btn-outline-red {
    background-color: transparent;
    color: #cf0000;
    border: 2px solid #cf0000;
    text-align: center;
}
.btn-outline-red:hover {
    background-color: #cf0000;
    color: white;
}


/* ========================================= */
/* === MODERNIZED FOOTER (GRID FIX) === */
/* ========================================= */

.site-footer {
    background-color: #000000;
    padding: 5rem 0 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    z-index: 5;
}

/* --- Container Enforcement --- */
.site-footer .container {
    width: 90%; 
    max-width: 1200px;
    margin: 0 auto;
    display: block;
}

/* --- Content Layout (CSS GRID) --- */
.footer-content {
    display: grid; 
    /* Brand gets 2 fractions, the others get 1 fraction each */
    /* This guarantees edge-to-edge filling with exact proportions */
    grid-template-columns: 1.3fr 1fr 1fr 1fr auto; 
    gap: 3rem; 
    width: 100%;
    position: relative;
    z-index: 2;
    margin-bottom: 3rem;
    text-align: left;
}

/* --- Column Styling --- */
.footer-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0; /* Prevents text overflow from breaking grid */
}

/* Brand Column Content */
.footer-logo img {
    height: 40px;
    width: auto;
    display: block;
    margin-bottom: 0.5rem;
    margin-left: 0; 
}
.brand-column p {
    color: #888;
    line-height: 1.6;
    font-size: 0.95rem;
    width: 100%;
    max-width: 90%; /* Keeps text tidy within the 2fr space */
}

/* --- FIXED SOCIAL ICONS --- */
.footer-socials {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.5rem;
}
.social-link {
    color: #ffffff;
    background: rgba(255,255,255,0.15);
    padding: 0.6rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
}
.social-link:hover {
    background: #cf0000;
    border-color: #cf0000;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(207, 0, 0, 0.4);
}
.social-link svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* --- HEADERS & ACCENTS --- */
.footer-column h4 {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    border-left-width: 3px;
    border-left-style: solid;
    white-space: nowrap; 
}

/* Accents */
.footer-column:nth-child(2) h4 { border-left-color: #cf0000; } /* Rap */
.footer-column:nth-child(3) h4 { border-left-color: #3b82f6; } /* Beats */
.footer-column:nth-child(4) h4 { border-left-color: #ffffff; } /* Community */

/* Links */
.footer-links {
    list-style: none;
    padding: 0;
}
.footer-links li {
    margin-bottom: 0.5rem;
}
.footer-links a {
    color: #aaa;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    display: block;
    white-space: nowrap; 
}
.footer-links a:hover {
    color: #fff;
    padding-left: 5px;
}

/* --- Bottom Copyright --- */
.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: #555;
    font-size: 0.85rem;
    font-weight: 600;
    position: relative;
    z-index: 2;
}

/* --- Aurora Lights (Preserved) --- */
#wrap { width: 100%; height: 100%; position: absolute; top: 0; left: 0; margin: 0; overflow: hidden; z-index: 1; pointer-events: none; }
#lightings { bottom: -60px; position: absolute; width: 100%; }
#lightings section { border-radius: 50%; height: 20px; width: 100%; position: relative; margin: auto; }
#one { animation: one 5s ease-in-out infinite alternate; }
#two { width: 90%; animation: two 4s ease-in-out infinite alternate; }
#three { width: 80%; animation: three 3s ease-in-out infinite alternate; }
#four { width: 70%; animation: four 2s ease-in-out infinite alternate; }
#five { width: 60%; animation: five 1s ease-in-out infinite alternate; }

@keyframes one { from { box-shadow: 0 0 250px 20px #b30000; } to { box-shadow: 0 0 100px 15px #570000; } }
@keyframes two { from { box-shadow: 0 0 250px 20px #cf0000; } to { box-shadow: 0 0 100px 15px #2a0000; } }
@keyframes three { from { box-shadow: 0 0 250px 20px #001aff; } to { box-shadow: 0 0 100px 15px #cf0000; } }
@keyframes four { from { box-shadow: 0 0 250px 20px #ff0000; } to { box-shadow: 0 0 100px 15px #6b0000; } }
@keyframes five { from { box-shadow: 0 0 250px 20px #260099; } to { box-shadow: 0 0 100px 15px #b30000; } }


/* --- Sign In Page Styles --- */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    min-height: calc(100vh - 81px - 450px); /* Full height minus navbar and footer */
    background: linear-gradient(to bottom, #111, #000);
}

.login-box {
    background-color: #0a0a0a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.login-box h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-box p {
    color: #aaa;
    margin-bottom: 2rem;
}

.social-login {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid #555;
    background-color: #1a1a1a;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-social:hover {
    background-color: #2a2a2a;
}

.btn-social svg {
    width: 24px;
    height: 24px;
}

.btn-social-facebook {
    background-color: #1877F2;
    border-color: #1877F2;
}

.btn-social-facebook:hover {
    background-color: #166eeb;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #777;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #333;
}

.divider span {
    padding: 0 1rem;
}

.form-group {
    text-align: left;
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #ccc;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1.25rem; /* Increased horizontal padding */
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: #cf0000;
    box-shadow: 0 0 0 3px rgba(207, 0, 0, 0.3);
}

.form-group small { /* Added for email notice */
    font-size: 0.8rem;
    color: #888;
    display: block;
    margin-top: 0.25rem;
}

.form-options {
    text-align: right;
    margin-bottom: 1.5rem;
}

.forgot-password {
    color: #aaa;
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-password:hover {
    color: #cf0000;
    text-decoration: underline;
}

.signup-link {
    margin-top: 2rem;
    color: #aaa;
}

.signup-link a {
    color: #cf0000;
    font-weight: 600;
    text-decoration: none;
}

.signup-link a:hover {
    text-decoration: underline;
}

/* --- Register Page Styles --- */
.register-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    min-height: calc(100vh - 81px - 450px); /* Full height minus navbar and footer */
    background: linear-gradient(to bottom, #111, #000);
}

.register-box {
    background-color: #0a0a0a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 2.5rem;
    width: 100%;
    max-width: 450px; /* Same as login */
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.register-box h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.register-box p {
    color: #aaa;
    margin-bottom: 2rem;
}

.form-group-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
    font-size: 0.9rem;
}

.form-group-checkbox input[type="checkbox"] {
    width: 16px; /* Adjusted size */
    height: 16px;
    accent-color: #cf0000;
    flex-shrink: 0;
}

.form-group-checkbox label {
    color: #aaa;
}

.form-group-checkbox a {
    color: #cf0000;
    text-decoration: none;
}

.form-group-checkbox a:hover {
    text-decoration: underline;
}


.login-link {
    margin-top: 2rem;
    color: #aaa;
}

.login-link a {
    color: #cf0000;
    font-weight: 600;
    text-decoration: none;
}

.login-link a:hover {
    text-decoration: underline;
}

/* --- Battles Page Styles --- */
.battles-page-container {
    padding: 4rem 0;
    background: linear-gradient(to bottom, #111, #000);
    min-height: calc(100vh - 81px - 450px); /* minus nav and footer */
}

.battles-page-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.battles-page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.battles-page-header p {
    font-size: 1.1rem;
    color: #aaa;
}

.filter-bar {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    /* Added to fix leaderboard.php layout */
    align-items: flex-start; 
	width: 100%;
}

.filter-bar .form-group { /* Target form-group specifically within filter-bar */
    margin-bottom: 0; /* Remove bottom margin for inline layout */
}

/* Added for leaderboard.php layout */
.filter-bar form {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    width: 100%;
	margin-bottom: 2.5rem; /* <<< ADD THIS LINE */
    align-items: flex-start;  /* <<< ADD THIS LINE */
}
/* Added for leaderboard.php layout */
.filter-bar form .form-group {
    margin-bottom: 0;
}

.form-control-select {
    width: 250px;
    padding: 0.75rem 1.25rem; /* Increased horizontal padding */
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 1.25rem center; /* Adjusted icon position */
    cursor: pointer;
}

.form-control-select:focus {
    outline: none;
    border-color: #cf0000;
    box-shadow: 0 0 0 3px rgba(207, 0, 0, 0.3);
}

.filter-bar input[type="text"].form-control {
     width: 250px; /* Match select width */
}


/* --- Leaderboard Page Styles --- */
.leaderboard-page-container {
    padding: 4rem 0;
    background: linear-gradient(to bottom, #111, #000);
    min-height: calc(100vh - 81px - 450px); /* minus nav and footer */
}

.leaderboard-page-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.leaderboard-page-header h2 {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.leaderboard-page-header p {
    font-size: 1.1rem;
    color: #aaa;
}

.leaderboard-page-table {
    border: 1px solid #444; /* Slightly more prominent border */
}

/* Gold/Silver/Bronze Row Styling */
.leaderboard-table tbody tr.rank-1 {
    background: linear-gradient(90deg, rgba(255,215,0,0.15) 0%, rgba(26,26,26,0) 100%);
    border-left: 4px solid #ffd700;
}
.leaderboard-table tbody tr.rank-2 {
    background: linear-gradient(90deg, rgba(192,192,192,0.15) 0%, rgba(26,26,26,0) 100%);
    border-left: 4px solid #c0c0c0;
}
.leaderboard-table tbody tr.rank-3 {
    background: linear-gradient(90deg, rgba(205,127,50,0.15) 0%, rgba(26,26,26,0) 100%);
    border-left: 4px solid #cd7f32;
}

.leaderboard-table tbody tr.rank-1 td,
.leaderboard-table tbody tr.rank-2 td,
.leaderboard-table tbody tr.rank-3 td {
    font-weight: 700; /* Bolder text for top ranks */
}

.leaderboard-table tbody tr:hover {
    background-color: #282828; /* Slightly lighter hover for page table */
}

/* --- Events Page Styles --- */
.events-page-container {
    padding: 4rem 0;
    background: linear-gradient(to bottom, #111, #000);
    min-height: calc(100vh - 81px - 450px); /* minus nav and footer */
}

.events-page-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.events-page-header h1 { /* Changed from h2 */
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.events-page-header p {
    font-size: 1.1rem;
    color: #aaa;
}

/* Make events grid on this page use 2 columns */
.events-page-grid {
    grid-template-columns: repeat(2, 1fr);
}

/* --- CTA Section Styles --- */
.cta-section {
    background: linear-gradient(to bottom, #000, #0a0a0a); /* Match footer gradient start */
    padding: 4rem 2rem;
    text-align: center;
    border-top: 1px solid #222;
}

.cta-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}

.cta-section p {
    font-size: 1.1rem;
    color: #aaa;
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
    line-height: 1.6;
}

.cta-button-large {
    padding: 1.25rem 2.5rem; /* Larger padding */
    font-size: 1.1rem; /* Slightly larger text */
}

/* --- About Page Styles --- */
.about-page-container {
    padding: 4rem 0;
    background: linear-gradient(to bottom, #111, #000);
}

.about-page-header {
    text-align: center;
    margin-bottom: 4rem; /* More space */
    padding-bottom: 2rem;
    border-bottom: 1px solid #333;
}

.about-page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: uppercase; /* More attitude */
    letter-spacing: 1px;
}

.about-page-header p {
    font-size: 1.2rem;
    color: #aaa;
}

.about-feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
    margin-bottom: 5rem;
}

.about-text-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.about-text-content .highlight-red {
    font-size: 1rem;
    font-weight: 700;
    color: #cf0000;
    display: block;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.about-text-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #ccc;
    margin-bottom: 1rem;
}

.about-image-placeholder {
    background: #111;
    border: 2px solid #333;

    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.about-image-placeholder:hover {
    border-color: #cf0000;
    box-shadow: 0 0 20px rgba(207, 0, 0, 0.2);
}

.about-image-placeholder svg {
    width: 80px;
    height: 80px;
    color: #444;
}

.about-image-placeholder span {
    color: #777;
    font-weight: 600;
    margin-top: 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* Style for the reversed row */
.about-feature-row.reversed .about-image-placeholder {
   grid-column: 1 / 2;
   grid-row: 1 / 2;
}
.about-feature-row.reversed .about-text-content {
   grid-column: 2 / 3;
   grid-row: 1 / 2;
}

/* Team Section */
.team-section {
    text-align: center;
    padding: 4rem 0;
    background-color: #0a0a0a;
    border-radius: 12px;
    margin-bottom: 5rem;
    border: 1px solid #333;
}

.team-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.team-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #aaa;
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.team-member {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.team-avatar {
    width: 120px; /* Larger avatar */
    height: 120px;
    border-radius: 50%;
    background-color: #555;
    border: 3px solid #cf0000;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.team-member:hover .team-avatar {
    transform: scale(1.05);
}

.team-member h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.team-member p {
    font-size: 1rem;
    color: #aaa;
    margin-bottom: 0;
}

/* About Page CTA */
.about-cta {
    background: #111;
    padding: 3rem;
    text-align: center;
    border-radius: 12px;
    border: 1px solid #333;
}

.about-cta h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    text-transform: uppercase;
}
.about-cta p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #aaa;
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

/* --- Contact Page Styles --- */
.contact-page-container {
    padding: 4rem 0;
    background: linear-gradient(to bottom, #111, #000);
    min-height: calc(100vh - 81px - 450px); /* Adjust based on actual footer height */
}

/* NEW: Limit the width of the contact page container */
.contact-page-container .container {
    max-width: 1000px; /* Between 1200px (default) and 800px (legal) */
}


.contact-header {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.contact-header p {
    font-size: 1.2rem;
    color: #aaa;
}

.contact-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr; /* 2/3 for form, 1/3 for info */
    gap: 3rem;
}

.contact-form-section h2,
.contact-info-section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #cf0000;
}

.contact-form .form-control {
    background-color: #0a0a0a; /* Darker inputs */
}

.contact-form textarea.form-control {
    min-height: 150px; /* Taller textarea */
}

.contact-info-section p {
    color: #ccc;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.contact-details {
    list-style: none;
    margin-bottom: 3rem;
}

.contact-details li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 1rem;
    color: #ccc;
}

.contact-details svg {
    width: 24px;
    height: 24px;
    color: #cf0000;
    flex-shrink: 0;
}

.feature-suggestion-box {
    background-color: #0a0a0a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 2rem;
}

.feature-suggestion-box h2 {
    font-size: 1.5rem; /* Slightly smaller */
    color: #fff;
}

.feature-suggestion-box p {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 1.5rem;
}

.feature-suggestion-box .form-control {
    background-color: #1a1a1a;
    min-height: 100px;
}


/* --- Legal Page Styles --- */
.legal-page-container {
    padding: 4rem 0;
    background: linear-gradient(to bottom, #111, #000);
    min-height: calc(100vh - 81px - 450px); /* Adjust based on footer */
}

.legal-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #333;
}

.legal-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.legal-header p { /* For Last Updated */
    font-size: 1rem;
    color: #aaa;
}

.legal-content {
    max-width: 800px; /* Good width for reading text */
    margin: 0 auto;
    background-color: #0a0a0a; /* Slightly lighter than pure black */
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #333;
}

.legal-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #cf0000; /* Red headings */
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #333;
}

.legal-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #eee;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-content h4 { /* For sub-sub headings like "Personal information..." */
    font-size: 1.1rem;
    font-weight: 600;
    color: #ccc;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-style: italic;
}


.legal-content p {
    font-size: 1rem;
    line-height: 1.7;
    color: #ccc;
    margin-bottom: 1rem;
}

.legal-content ul {
    list-style: disc;
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.legal-content li {
    font-size: 1rem;
    line-height: 1.7;
    color: #ccc;
    margin-bottom: 0.5rem;
}

.legal-content a {
    color: #cf0000;
    text-decoration: none;
    font-weight: 600;
}

.legal-content a:hover {
    text-decoration: underline;
}

.legal-content strong {
    font-weight: 600;
    color: #fff;
}


/* --- Profile Page Styles --- */
.profile-page-container {
    padding: 4rem 0;
    background: linear-gradient(to bottom, #111, #000);
    min-height: calc(100vh - 81px - 450px);


}

.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #333;
}

.profile-avatar-large-container {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar-large {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: #555; /* Placeholder */
    border: 4px solid #cf0000;
    display: flex; /* For potential image inside */
    align-items: center;
    justify-content: center;
    /* Added background properties for dynamic images */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.edit-avatar-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.edit-avatar-btn:hover {
    background-color: rgba(207, 0, 0, 0.8);
}

.edit-avatar-btn svg {
    width: 20px;
    height: 20px;
}

.profile-info h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.profile-rank {
    font-size: 1.2rem;
    font-weight: 600;
    color: #aaa;
    margin-left: 0.5rem;
}

.profile-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ccc;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.profile-location svg {
    width: 20px;
    height: 20px;
    color: #cf0000;
}

.profile-stats-bar {
    display: flex;
    gap: 2rem;
    background-color: #1a1a1a;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 1px solid #333;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.9rem;
    color: #aaa;
    text-transform: uppercase;
}

.profile-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.profile-edit-section h2,
.profile-history-section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #333;
    color: #cf0000;
}

.profile-form .form-control {
    background-color: #0a0a0a;
}
.profile-form textarea.form-control {
    min-height: 120px;
}
.profile-form small {
    font-size: 0.8rem;
    color: #888;
    margin-top: -1rem;
    display: block;
    margin-bottom: 1rem;
}

.battle-history-list {
    list-style: none;
    max-height: 400px; /* Limit height and make scrollable if needed */
    overflow-y: auto;
    margin-bottom: 2rem;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1a1a1a;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #555; /* Default border */
}

.history-item.history-win {
    border-left-color: #4caf50; /* Green */
}
.history-item.history-loss {
    border-left-color: #cf0000; /* Red */
}

.history-opponent {
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.vs-tag {
    font-size: 0.8rem;
    background-color: #cf0000;
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-weight: 700;
}

.history-details {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #aaa;
}
.history-result {
    font-weight: 700;
}
.history-result.history-win { color: #4caf50; }
.history-result.history-loss { color: #cf0000; }


.view-all-history {
    text-align: center;
    margin-top: 1rem;
}

/* --- Roster Page Styles --- */
.roster-page-container {
    padding: 4rem 0;
    background: linear-gradient(to bottom, #111, #000);
    min-height: calc(100vh - 81px - 450px);
}

.roster-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.roster-header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.roster-header p {
    font-size: 1.2rem;
    color: #aaa;
}

.roster-list {
    display: grid;
    /* Updated grid: 3 on desktop */
    grid-template-columns: repeat(3, 1fr); 
    gap: 2rem; /* Increased gap */
}

.roster-card {
    background-color: #0a0a0a; /* Darker background */
    border: 1px solid #222; /* More subtle border */
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column; /* Vertical layout */
    align-items: center; /* Center content */
    gap: 1.5rem; /* Space out vertical items */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative; /* For gradient hover */
    overflow: hidden; /* For gradient hover */
}

/* Gradient hover effect */
.roster-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle at top left, rgba(207, 0, 0, 0.2), transparent 40%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.roster-card:hover {
    transform: translateY(-8px); /* More lift */
    box-shadow: 0 10px 30px rgba(207, 0, 0, 0.15);
    border-color: #444;
}

.roster-card:hover::before {
    opacity: 1;
}

/* Ensure content is above the hover effect */
.roster-avatar, .roster-info {
    position: relative;
    z-index: 2;
}

.roster-avatar {
    width: 100px; /* Larger avatar */
    height: 100px; /* Larger avatar */
    border-radius: 50%;
    background-color: #555; /* Placeholder */
    border: 4px solid #cf0000; /* Thicker red border */
    flex-shrink: 0;
    margin-top: 0.5rem;
    /* Added background properties for dynamic images */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.roster-info {
    flex-grow: 1;
    min-width: 0; 
    display: flex;
    flex-direction: column; /* Stack info */
    align-items: center; /* Center info */
    text-align: center; /* Center text wrapping */
    width: 100%;
}

.roster-name {
    font-size: 1.5rem; /* Larger name */
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block; 
    overflow-wrap: break-word; 
    color: #fff;
    line-height: 1.3;
}

.roster-rank {
    font-size: 1.1rem; /* Slightly larger rank */
    font-weight: 600;
    color: #aaa;
    margin-bottom: 1.5rem; /* More space before stats */
    display: block;
}
.roster-rank .rank-gold { color: #ffd700; }
.roster-rank .rank-silver { color: #c0c0c0; }
.roster-rank .rank-bronze { color: #cd7f32; }

.roster-stats {
    display: flex;
    justify-content: space-around; /* Space out stats */
    width: 100%; /* Full width */
    border-top: 1px solid #333; /* Divider */
    padding-top: 1.5rem; /* Space above stats */
    gap: 1rem;
    font-size: 1rem; /* Larger stats text */
    color: #ccc;
    flex-wrap: wrap; /* Allow stats to wrap */
}
.roster-stats span {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* More space in stats */
    font-weight: 600;
}
.roster-stats svg {
    width: 20px; /* Larger icons */
    height: 20px;
}
.icon-win { color: #4caf50; }
.icon-loss { color: #cf0000; }
.icon-points { color: #aaa; }


/* Add highlight for the logged-in user */
.roster-card.current-user {
    border-color: #cf0000;
    background-color: #1a1a1a; 
    box-shadow: 0 0 20px rgba(207, 0, 0, 0.2);
}

.roster-card.current-user:hover {
     box-shadow: 0 10px 30px rgba(207, 0, 0, 0.3);
}

/* --- NEW: Battle/Event Status Tags (for Admin Panel) --- */
.tag-status {
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
}
.tag-status-live { background-color: #cf0000; }
.tag-status-upcoming { background-color: #3b82f6; }
.tag-status-finished { background-color: #555; }
.tag-status-open { background-color: #4caf50; }
.tag-status-full { background-color: #cf0000; }
.tag-status-soon { background-color: #3b82f6; }


/* --- NEW: Admin Panel Styles --- */
.admin-page-container {
    padding: 4rem 0;
    background: linear-gradient(to bottom, #111, #000);
    min-height: calc(100vh - 81px - 450px);
}

.admin-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.admin-header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.admin-header p {
    font-size: 1.2rem;
    color: #aaa;
}

.admin-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid #333;
}

.admin-tab-button {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 1rem 2rem;
    cursor: pointer;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    border-bottom: 3px solid transparent;
}

.admin-tab-button:hover {
    color: #fff;
}

.admin-tab-button.active {
    color: #cf0000;
    border-bottom-color: #cf0000;
}

.admin-tab-content {
    display: none; /* Hidden by default */
    background-color: #0a0a0a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 2rem;
}

.admin-tab-content.active {
    display: block; /* Shown when active */
}

/* Re-use leaderboard table styles */
.admin-table-container {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    overflow: hidden;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.admin-table thead tr {
    background-color: #000;
    border-bottom: 2px solid #cf0000;
}
.admin-table th {
    padding: 1.25rem 1rem;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    color: #aaa;
    white-space: nowrap;
}
.admin-table td {
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    vertical-align: middle;
    white-space: nowrap;
}
.admin-table tbody tr {
    border-bottom: 1px solid #2a2a2a;
    transition: background-color 0.3s ease;
}
.admin-table tbody tr:last-child {
    border-bottom: none;
}
.admin-table tbody tr:hover {
    background-color: #222;
}

/* Button for deleting users */
.btn-delete {
    background-color: #cf0000;
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.btn-delete:hover {
    background-color: #b30000;
}

/* Admin Tab Content Header (for Create Button) */
.admin-content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.admin-content-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #cf0000;
}
.btn-create {
    background-color: #4caf50;
    color: white;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
}
.btn-create:hover {
    background-color: #45a049;
}


/* --- NEW: Admin Panel Action Dropdown --- */
.action-dropdown {
    position: relative;
    display: inline-block;
}

.action-dropdown-toggle {
    background-color: #555;
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.action-dropdown-toggle:hover {
    background-color: #777;
}
/* Style for the three dots icon */
.action-dropdown-toggle svg {
    width: 16px;
    height: 16px;
    display: block;
}

.action-dropdown-menu {
    display: none; /* Hidden by default */
    position: absolute;
    right: 0;
    top: 100%; /* Position below the button */
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    min-width: 160px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 10;
    overflow: hidden; /* To get rounded corners on items */
}

.action-dropdown-menu.show {
    display: block; /* Show when 'show' class is added by JS */
}

.action-dropdown-item {
    display: block;
    width: 100%;
    padding: 0.75rem 1.25rem;
    text-align: left;
    color: #eee;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
}
.action-dropdown-item:hover {
    background-color: #3b3b3b;
    color: #fff;
}
/* Special style for delete button */
.action-dropdown-item.delete {
    color: #ff4d4d;
}
.action-dropdown-item.delete:hover {
    background-color: #cf0000;
    color: #fff;
}

/* Admin Panel Message Styling */
.message {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}
/* --- Status Tags for Admin Panel --- */
.status-active {
    color: #4caf50;
    font-weight: 600;
}
.status-banned {
    color: #cf0000;
    font-weight: 600;
}
.status-warned-button {
    background-color: #ffa500;
    color: #000;
    border: none;
    padding: 0.3rem 0.6rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.status-warned-button:hover {
    background-color: #ffc107;
}

/* --- NEW: Modal (Popup) Styles --- */
.modal-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
}
.modal-overlay.show {
    display: flex; /* Show when 'show' class is added */
}

.modal-content {
    background-color: #1a1a1a;
    border: 1px solid #444;
    margin: auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    animation: slide-down 0.3s ease-out;
}

@keyframes slide-down {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.5rem;
}
.modal-close-button {
    background: none;
    border: none;
    color: #aaa;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0 0.5rem;
}
.modal-close-button:hover {
    color: #fff;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #333;
    text-align: right;
}
/* --- End of Modal Styles --- */

/* --- 3. Homepage Wrapper --- */
.homepage-container {
    padding: 2rem 0; /* No hero, so add padding */
	padding-bottom: 0 !important;
    background: linear-gradient(to bottom, #111, #000);
}

/* --- 4. Hub Headlines (Blog) Section --- */
.headlines-section {
    margin-bottom: 0;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 2px solid #333;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
}
.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}
.section-header .view-all-link {
    color: #aaa;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}
.section-header .view-all-link:hover {
    color: #cf0000;
}
.news-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto auto;
    gap: 1.5rem;
}
.news-card {
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #333;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.25);
    border-color: #cf0000;
}
.news-card .news-image-placeholder {
    height: 250px;
    background: #444 url('images/newscardplaceholder.webp') center center/cover;
}
.news-card.top-story .news-image-placeholder {
    height: 100%;
    min-height: 400px; /* Taller image for top story */
}
.news-card .news-content {
    background-color: #f8f9fa;
    padding: 1.5rem;
}
.news-card .news-tag {
    font-size: 0.8rem;
    font-weight: 700;
    color: #cf0000;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    display: inline-block;
}
.news-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}
.news-card h3 a {
    color: #212529;
    text-decoration: none;
}
.news-card h3 a:hover {
    color: #cf0000;
}
.news-card .news-meta {
    font-size: 0.9rem;
    color: #6c757d;
}
.news-card.top-story {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
}
.news-card.top-story .news-content {
    padding: 2rem;
}
.news-card.top-story h3 {
    font-size: 1.75rem; /* Larger title */
}

/* --- 5. Newsletter Section (with BG Image) --- */
.newsletter-section {
    /* Use your actual image path here */
    background-image: url('images/mailinglist.webp'); 
    background-size: cover;
    background-position: center center;
    background-attachment: fixed; /* Optional: Parallax effect */
    
    color: #ffffff; 
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 3rem;
    overflow: hidden; 
    position: relative;
    z-index: 1; 
}

/* Dark overlay for readability */
.newsletter-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* 60% black overlay */
    z-index: -1;
}

/* Keyframes for text gradient flow */
@keyframes flow {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* BRINGING BACK THE ANIMATED H2 */
.newsletter-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;

    /* Animated Gradient Text */
    background: linear-gradient(90deg, #cf0000, #3b82f6, #cf0000);
    background-size: 200% auto;
    color: #000; /* Fallback */
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: flow 4s linear infinite;
}

/* Lighter paragraph text */
.newsletter-section p {
    font-size: 1.1rem;
    color: #ccc; /* Light gray */
    margin-bottom: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}
.newsletter-form {
    display: flex;
    flex-direction: column;  /* <-- Tells items to stack */
    align-items: center;     /* <-- Centers them horizontally */
    gap: 0.5rem;
    flex-wrap: wrap; 
}
.form-control-light {
    width: 100%;
    max-width: 350px;
    padding: 0.75rem 1.25rem;
    background-color: #fff;
    border: 2px solid #000;
    border-radius: 8px;
    color: #000;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}
.form-control-light:focus {
    outline: none;
    border-color: #cf0000;
}
.btn-dual-hub {
    background: linear-gradient(90deg, #cf0000 0%, #3b82f6 100%);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
	width: 100%;      /* <-- ADD THIS */
    max-width: 150px; /* <-- ADD THIS */
}
.btn-dual-hub:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* --- 6. Homepage Grid Layout (Battles, Leaderboards) --- */
.hub-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}
.hub-column {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}
/* Color accents for section headers */
.section-header-rap h2 { color: #cf0000; }
.section-header-rap .view-all-link:hover { color: #cf0000; }
.section-header-beats h2 { color: #3b82f6; }
.section-header-beats .view-all-link:hover { color: #3b82f6; }

/* --- 7. Summary Battle Card --- */
.summary-battle-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.summary-battle-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1rem;
    transition: background-color 0.3s ease;
}
.summary-battle-card:hover {
    background-color: #2a2a2a;
}
.summary-battle-card a {
    display: contents; /* Makes the whole card clickable */
    text-decoration: none;
}
.summary-avatars {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.summary-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 2px solid #555;
}
.summary-avatar.p2 {
    margin-left: -15px; /* Avatar overlap */
}
.summary-battle-info {
    flex-grow: 1;
    overflow: hidden;
}
.summary-battle-info span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.summary-battle-names {
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
}
.summary-battle-type {
    font-size: 0.9rem;
    color: #aaa;
}
.summary-battle-status {
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}
.status-rap-live { color: #cf0000; }
.status-beats-live { color: #3b82f6; }
.status-upcoming { color: #888; }

/* --- 8. Summary Leaderboard --- */
.leaderboard-tabs {
    display: flex;
    list-style: none;
    padding: 0;
    border-bottom: 2px solid #333;
    margin-bottom: 1.5rem;
}
.leaderboard-tab-toggle {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #888;
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px; /* Pulls tab border to main border */
    transition: color 0.3s ease, border-color 0.3s ease;
}
.leaderboard-tab-toggle:hover { color: #fff; }
.leaderboard-tab-toggle.active.tab-rap { color: #cf0000; border-bottom-color: #cf0000; }
.leaderboard-tab-toggle.active.tab-beats { color: #3b82f6; border-bottom-color: #3b82f6; }
.leaderboard-tab-pane { display: none; }
.leaderboard-tab-pane.active { display: block; }

.summary-leaderboard-list {
    list-style: none;
    padding: 0;
}
.summary-leaderboard-list li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid #2a2a2a;
}
.summary-leaderboard-list li:last-child { border-bottom: none; }
.summary-leaderboard-list .rank {
    font-size: 0.9rem;
    font-weight: 700;
    color: #888;
    width: 2rem;
    flex-shrink: 0;
}
.summary-leaderboard-list .rank-1 { color: #ffd700; }
.summary-leaderboard-list .rank-2 { color: #c0c0c0; }
.summary-leaderboard-list .rank-3 { color: #cd7f32; }

.summary-leaderboard-list .name {
    color: #eee;
    flex-grow: 1;
}
.summary-leaderboard-list .points {
    font-size: 0.9rem;
    color: #aaa;
}
.summary-leaderboard-list .points-rap { color: #cf0000; }
.summary-leaderboard-list .points-beats { color: #3b82f6; }

/* --- 9. Summary Events List --- */
.summary-event-list {
    list-style: none;
    padding: 0;
}
.summary-event-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid #2a2a2a;
}
.summary-event-item:last-child { border-bottom: none; }
.summary-event-item a {
    color: #eee;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s ease;
    flex-grow: 1;
}
.summary-event-item .date {
    font-size: 0.9rem;
    color: #888;
    font-weight: 600;
    flex-shrink: 0;
}
.summary-event-item-rap a:hover { color: #cf0000; }
.summary-event-item-beats a:hover { color: #3b82f6; }

/* --- 11. Summary View All Link --- */
.summary-view-all {
    color: #fff; /* User requested white */
    display: block;
    text-align: right;
    margin-top: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s ease;
}
.summary-view-all:hover {
    color: #cf0000; /* User requested red hover */
}
/* *** NEW: Gravatar Info Card Section *** */
.gravatar-info-section {
    padding: 4rem 0;
    background-color: #0a0a0a; /* Darker background for contrast */
}

/* *** Gravatar Info Card Style *** */
.gravatar-info-card {
    background-color: #0c0c0c;
    border: 1px solid #333;
    border-left: 3px solid #cf0000;
    border-radius: 8px;
    padding: 1.25rem;
    
    /* *** NEW: Centering the card *** */
    max-width: 600px;
    margin: 0 auto; /* This centers it */
}
.gravatar-info-card h4 {
    margin: 0 0 0.75rem 0;
    color: #ffffff;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}
.gravatar-info-card h4 svg {
    width: 18px;
    height: 18px;
    margin-right: 0.75rem;
    fill: #cf0000;
}
.gravatar-info-card p {
    font-size: 0.95rem;
    color: #ddd;
    line-height: 1.5;
    margin: 0 0 0.75rem 0;
}
.gravatar-info-card p a {
    color: #cf0000;
    font-weight: 600;
    text-decoration: none;
}
.gravatar-info-card p a:hover {
    text-decoration: underline;
}
.gravatar-info-card small {
    font-size: 0.85rem;
    color: #888;
}
/* Simple style for error messages */
.error-messages {
    background-color: #330000;
    color: #ffcccc;
    padding: 1rem;
    border: 1px solid #cf0000;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: left;
}
.error-messages ul {
    list-style: disc;
    margin-left: 1.5rem;
}
/* Simple styles for error/success messages */
.message {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}
.error-message {
    background-color: rgba(207, 0, 0, 0.2); /* Red background */
    color: #cf0000; /* Red text */
    border: 1px solid #cf0000;
}
.success-message {
    background-color: rgba(76, 175, 80, 0.2); /* Green background */
    color: #4CAF50; /* Green text */
    border: 1px solid #4CAF50;
}

/*
==============================================
=== RESPONSIVE RULES (MOVED TO END)
==============================================
*/

/* --- Responsive Design (Media Queries) --- */

@media (max-width: 992px) { /* Changed breakpoint for contact grid */
    .contact-content-grid {
        grid-template-columns: 1fr; /* Stack earlier */
        gap: 2rem;
    }

    .profile-content-grid { /* Stack profile columns earlier too */
        grid-template-columns: 1fr;
    }

    .about-feature-row {
        grid-template-columns: 1fr;
    }
    
    /* --- 10. Responsive Tweaks --- */
    .news-grid {
        grid-template-columns: 1fr; /* Stack news on tablet */
    }
    .news-card.top-story {
        grid-row: 1; /* Just make it the first item */
    }
    .hub-grid {
        grid-template-columns: 1fr; /* Stack hubs on tablet */
    }
    
    /* --- Responsive Adjustments --- */
    .roster-list {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for tablet */
     }
}


@media (max-width: 850px) {
    /* ... existing styles ... */
    .nav-center-links,
    .nav-right-actions {
        display: none;
    }
    .nav-toggle {
        display: flex;
    }

    .battles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-feature-row.reversed .about-image-placeholder,
    .about-feature-row.reversed .about-text-content {
        grid-column: 1 / 2; /* Stack them */
    }
     .about-feature-row.reversed .about-image-placeholder {
        grid-row: 1 / 2; /* Image on top */
     }
     .about-feature-row.reversed .about-text-content {
        grid-row: 2 / 3; /* Text below */
     }
     
     .roster-list {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for tablet */
     }
}

@media (max-width: 768px) {
    .login-container,
    .register-container,
    .battles-page-container,
    .leaderboard-page-container,
    .events-page-container,
    .about-page-container,
    .contact-page-container,
    .legal-page-container,
    .profile-page-container, /* Added */
    .roster-page-container, /* Added */
    .admin-page-container { /* Added */
        /* Adjust min-height based on mobile footer size */
        /* You might need to refine this based on actual footer height */
        /* min-height: calc(100vh - 81px - 700px); */
        padding-top: 2rem; /* Add some space at the top on mobile */
        padding-bottom: 2rem;
    }

    .hero {
        padding: 3rem 1rem;
        min-height: auto; /* Remove fixed height on mobile */
    }

    .hero-image {
        width: 90%; /* Adjust image size for smaller screens */
    }
    .hero-description {
        font-size: 1rem;
    }

    .battles-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .battles-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .events-grid {
        grid-template-columns: 1fr;
    }
    
    .events-page-grid {
        grid-template-columns: 1fr; /* Stack on mobile */
    }


    /* Makes leaderboard table scrollable */
    .leaderboard-table-container {
        overflow-x: auto;
    }

    .leaderboard-table {
        min-width: 700px; /* Force scrolling */
    }

     /* --- PREMIUM MOBILE FOOTER SLIM-DOWN --- */
    
    /* 1. Convert the Grid to a centered Flex column */
    .site-footer .footer-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 2rem !important;
    }

    /* 2. HIDE the Navigation Links (Columns 2, 3, and 4) */
    /* We only want the Brand column (1) visible */
    .site-footer .footer-column:nth-child(2),
    .site-footer .footer-column:nth-child(3),
	.site-footer .footer-column:nth-child(4),
    .site-footer .footer-column:nth-child(5) {
        display: none !important;
    }

    /* 3. Style the Brand Column (The Survivor) */
    .site-footer .footer-column:nth-child(1) {
        width: 100% !important;
        align-items: center !important; /* Center flex items vertically */
        margin-bottom: 0 !important;
        grid-column: auto !important; /* Reset grid positioning */
    }

    /* 4. Premium Logo Styling */
    .footer-logo img {
        height: 60px !important; /* Larger on mobile for impact */
        width: auto !important;
        margin: 0 auto 1rem auto !important;
        /* Subtle white glow to make it pop against black */
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.15));
    }

    /* 5. Refine the Tagline (Typography) */
    .brand-column p {
        font-size: 1rem !important;
        color: #ccc !important; /* Brighter than desktop for readability */
        max-width: 80% !important; /* Prevent text hitting edges */
        margin: 0 auto 1.5rem auto !important;
        line-height: 1.6 !important;
    }

    /* 6. Center & Enhance Social Icons */
    .footer-socials {
        justify-content: center !important;
        gap: 1.5rem !important; /* More breathing room between icons */
        width: 100% !important;
    }
    
    .social-link {
        background: rgba(255,255,255,0.1) !important; /* Lighter glass effect */
        padding: 12px !important; /* Larger touch targets */
        border-radius: 50% !important; /* Circle buttons look more 'app-like' */
        border: 1px solid rgba(255,255,255,0.1) !important;
    }

    /* 7. Minimalist Copyright Area */
    .footer-bottom {
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        margin-top: 1rem !important;
        padding-top: 2rem !important;
        font-size: 0.75rem !important;
        text-transform: uppercase !important;
        letter-spacing: 2px !important; /* High-end spacing */
        color: #666 !important;
        width: 90% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

}

    .footer-column p {
        margin: 0 auto; /* Center paragraph */
    }

    .cta-section h2 {
        font-size: 2rem;
    }
    .cta-section p {
        font-size: 1rem;
    }

    .about-page-header h1 {
        font-size: 2.2rem;
    }
    .about-page-header p {
        font-size: 1.1rem;
    }
    .about-text-content h2 {
        font-size: 2rem;
    }
    .about-text-content p {
        font-size: 1rem; /* Slightly smaller text on mobile */
    }


    .team-section h2,
    .about-cta h2 {
        font-size: 2rem;
    }

    .contact-header h1 {
        font-size: 2.2rem;
    }
     .contact-header p {
        font-size: 1.1rem;
    }

    /* Adjust legal page for mobile */
     .legal-header h1 {
        font-size: 2rem;
    }
    .legal-content {
        padding: 1rem; /* Less padding on mobile */
    }
     .legal-content h2 {
        font-size: 1.5rem;
    }
     .legal-content h3 {
        font-size: 1.2rem;
    }
    .legal-content p, .legal-content li {
        font-size: 0.95rem;
    }

     /* Profile page mobile */
    .profile-header {
        flex-direction: column; /* Stack avatar and info */
        align-items: center;
        text-align: center;
    }
    .profile-avatar-large {
        width: 120px;
        height: 120px;
    }
    .profile-info h1 {
        font-size: 2rem;
    }
    .profile-location {
        justify-content: center;
    }
    .profile-stats-bar {
        justify-content: center;
        flex-wrap: wrap; /* Allow stats to wrap */
        gap: 1rem; /* Reduce gap */
    }

    .profile-content-grid {
        gap: 2rem;
        /* ADDED: Force 1 column */
        grid-template-columns: 1fr;
    }
    
    .contact-content-grid {
        /* ADDED: Force 1 column */
        grid-template-columns: 1fr;
    }

    /* Roster page mobile */
    .roster-header h1 {
        font-size: 2.2rem;
    }
    .roster-header p {
        font-size: 1.1rem;
    }
    .roster-list {
        grid-template-columns: 1fr; /* 1 column for mobile */
    }
    /* Removed old mobile roster styles, as new design is mobile-first */
    
    /* Admin Page Mobile */
    .admin-header h1 {
        font-size: 2.2rem;
    }
    .admin-header p {
        font-size: 1.1rem;
    }
    .admin-tabs {
        flex-wrap: wrap; /* Allow tabs to wrap */
    }
    .admin-tab-button {
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }
    .admin-table-container {
        overflow-x: auto;
    }
    .admin-table {
        min-width: 800px; /* Force scroll on mobile */
    }
    
    /* --- 10. Responsive Tweaks --- */
     .homepage-container {
        padding-top: 1rem;
    }
    .section-header h2 {
        font-size: 1.5rem;
    }
    .leaderboard-tab-toggle {
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }
    .news-card.top-story .news-image-placeholder {
        min-height: 250px;
    }
    .news-card.top-story h3 {
        font-size: 1.25rem;
    }
    .newsletter-section h2 {
        font-size: 1.5rem;
    }
    .newsletter-form {
        padding: 0 1rem;
    }
  /* ========================================= */
        /* === MOBILE DROPDOWN LOGIC (Clean) === */
        /* ========================================= */

        /* 1. Container Reset */
        .mobile-nav-menu .nav-dropdown {
            width: 100%;
            display: block;
        }

        /* 2. Toggle Button: Kill the Desktop "Glass Pill" Style */
        .mobile-nav-menu .nav-dropdown-toggle {
            /* Reset desktop visual styles */
            background: transparent !important;
            border: none !important;
            box-shadow: none !important;
            border-radius: 0 !important;
            
            /* Mobile Layout & Typography */
            width: 100%;
            padding: 1rem 3rem;
            display: flex;
            justify-content: space-between; /* Arrow to right */
            align-items: center;
            color: #ffffff;
            font-size: 1.2rem;
            text-align: left;
        }
        
        /* Mobile Hover State */
        .mobile-nav-menu .nav-dropdown-toggle:hover {
             background-color: rgba(255, 255, 255, 0.05) !important;
        }

        /* Reset the specific text colors from desktop */
        .mobile-nav-menu .nav-dropdown-toggle .nav-choose,
        .mobile-nav-menu .nav-dropdown-toggle .nav-arena {
            color: inherit; 
            font-weight: 600; 
        }

        /* Arrow Styling */
        .mobile-nav-menu .nav-dropdown-toggle span.arrow {
            font-size: 0.8em;
            transition: transform 0.2s ease;
            color: #888;
        }
        .mobile-nav-menu .nav-dropdown-toggle.active span.arrow {
            transform: rotate(180deg);
            color: #ffffff;
        }

        /* 3. The Dropdown Menu: Accordion Style (Not Floating) */
        .mobile-nav-menu .nav-dropdown-menu {
            /* Stop floating */
            position: static !important;
            float: none !important;
            transform: none !important;
            margin-top: 0 !important;
            
            /* Visuals */
            width: 100% !important;
            background: #000 !important; /* Solid black */
            border: none !important;
            box-shadow: none !important;
            padding: 0 !important;
            border-left: 2px solid #333; /* Visual guide line */
            
            /* Visibility (Controlled by JS .show) */
            display: none; 
            opacity: 1 !important;
            visibility: visible !important;
        }

        .mobile-nav-menu .nav-dropdown-menu.show {
            display: block !important;
        }

        /* 4. Sub-Links Indentation */
        .mobile-nav-menu .nav-dropdown-header {
            padding: 1rem 0 0.5rem 3rem; /* Indent */
            color: #555;
            font-size: 0.85rem;
            text-transform: uppercase;
        }

        .mobile-nav-menu .nav-dropdown-menu a {
            padding: 0.75rem 3rem; /* Indent matches header */
            font-size: 1rem;
            color: #aaa;
            background: transparent;
        }

        .mobile-nav-menu .nav-dropdown-menu a:hover {
            color: #fff;
            padding-left: 3.5rem; /* Slide effect */
            background: transparent;
        }
        
        .mobile-nav-menu .nav-dropdown-divider {
             display: none; /* Hide dividers on mobile for cleaner look */
        }
		/* --- New rule for the image logo --- */
			.nav-logo img {
			height: 45px; /* You can adjust this height! */
			width: auto;
			display: block; /* Fixes any weird spacing */
		}
        /* ==============================================
		=== HOMEPAGE REHAUL 2025 STYLES
		=== ADD THIS TO THE VERY END OF YOUR style.css
		==============================================
		*/

		/* --- Keyframe Animations --- */
		@keyframes fadeInUp {
			from {
				opacity: 0;
				transform: translateY(20px);
			}
			to {
				opacity: 1;
				transform: translateY(0);
			}
		}

		@keyframes pulse-red {
			0% { box-shadow: 0 0 0 0 rgba(207, 0, 0, 0.7); }
			70% { box-shadow: 0 0 0 10px rgba(207, 0, 0, 0); }
			100% { box-shadow: 0 0 0 0 rgba(207, 0, 0, 0); }
		}

		@keyframes pulse-blue {
			0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
			70% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
			100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
		}

		@keyframes hue-rotate {
			0% { filter: hue-rotate(0deg); }
			100% { filter: hue-rotate(360deg); }
		}

		@keyframes background-pan {
			0% { background-position: 0% 50%; }
			50% { background-position: 100% 50%; }
			100% { background-position: 0% 50%; }
		}


		/* --- Rehaul Main Container --- */
		.content-rehaul {
			padding: 3rem 0;
			background: #000; /* Deep black for contrast */
		}

		/* --- 1. Rehauled Newsletter Section --- */
		.rehaul-newsletter-wrapper {
			margin-bottom: 3rem;
			animation: fadeInUp 0.5s ease-out;
		}
		.rehaul-newsletter-box {
			display: flex;
			flex-wrap: wrap;
			align-items: center;
			justify-content: space-between;
			gap: 2rem;
			background: #111; /* Dark grey, almost black */
			border: 1px solid #333;
			border-radius: 12px;
			padding: 2rem;
			position: relative;
			overflow: hidden;
		}
		/* Red & Blue Glows */
		.rehaul-newsletter-box::before {
			content: '';
			position: absolute;
			top: -50%;
			left: -50%;
			width: 200%;
			height: 200%;
			z-index: 1;
			background: radial-gradient(circle at 25% 25%, rgba(207, 0, 0, 0.15) 0%, transparent 40%),
						radial-gradient(circle at 75% 75%, rgba(59, 130, 246, 0.15) 0%, transparent 40%);
		}
		.rehaul-newsletter-content {
			position: relative;

			z-index: 2;
		}
		.rehaul-newsletter-content h3 {
			font-size: 1.75rem;
			font-weight: 700;
			color: #fff;
			margin-bottom: 0.25rem;
		}
		.rehaul-newsletter-content p {
			font-size: 1rem;
			color: #aaa;
			max-width: 400px;
		}
		.rehaul-newsletter-form {
			display: flex;
			gap: 0.5rem;
			position: relative;
			z-index: 2;
			width: 100%;
			max-width: 400px;
		}
		.rehaul-input {
			flex-grow: 1;
			padding: 0.75rem 1.25rem;
			background-color: #000;
			border: 1px solid #444;
			border-radius: 8px;
			color: #fff;
			font-size: 1rem;
			font-family: 'Poppins', sans-serif;
			font-weight: 600;
			transition: border-color 0.3s ease, box-shadow 0.3s ease;
		}
		.rehaul-input::placeholder {
			color: #777;
		}
		.rehaul-input:focus {
			outline: none;
			border-color: #3b82f6;
			box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
		}
		.rehaul-btn {
			padding: 0.75rem 1.5rem;
			border-radius: 8px;
			border: none;
			font-weight: 700;
			font-size: 1rem;
			cursor: pointer;
			color: #fff;
			background: linear-gradient(90deg, #cf0000, #3b82f6, #cf0000);
			background-size: 200% auto;
			transition: background-position 0.4s ease;
		}
		.rehaul-btn:hover {
			background-position: 100% 50%;
			animation: hue-rotate 3s infinite linear;
		}


		/* --- 2. Hub Tab Container --- */
		.hub-tab-container {
			background: #111;
			border: 1px solid #333;
			border-radius: 12px;
			overflow: hidden;
			animation: fadeInUp 0.5s ease-out 0.2s;
			animation-fill-mode: backwards;
		}
		.hub-tab-nav {
			display: flex;
			background: #000;
			border-bottom: 1px solid #333;
		}
		
		.hub-tab-button:hover {
			background-color: #222;
		}

		/* Rap Tab (Inactive) HOVER */
		.hub-tab-button[data-tab="rap-hub"]:not(.active-rap):hover {
			color: #cf0000;
		}
		.hub-tab-button[data-tab="rap-hub"]:not(.active-rap):hover svg {
			fill: #cf0000;
		}

		/* Beatbox Tab (Inactive) HOVER */
		.hub-tab-button[data-tab="beat-hub"]:not(.active-beats):hover {
			color: #3b82f6;
			opacity: 1; /* Full opacity on hover */
			animation: none; /* Pause pulse on hover */
		}
		.hub-tab-button[data-tab="beat-hub"]:not(.active-beats):hover svg {
			fill: #3b82f6;
			opacity: 1;
		}
		/* Active Rap Tab */
		.hub-tab-button[data-tab="rap-hub"].active-rap {
			color: #cf0000;
			opacity: 1;
			background: linear-gradient(to top, rgba(207, 0, 0, 0.1), transparent);
		}
		.hub-tab-button.active-rap svg {
			transform: scale(1.1);
			fill: #cf0000;
		}
		/* Active Rap Underline */
		.hub-tab-button.active-rap::after {
			width: 100%;
			background-color: #cf0000;
		}


		/* Active Beatbox Tab */
		.hub-tab-button[data-tab="beat-hub"].active-beats {
			color: #3b82f6;
			opacity: 1;
			background: linear-gradient(to top, rgba(59, 130, 246, 0.1), transparent);
			animation: none; /* Stop pulse when active */
		}
		.hub-tab-button.active-beats svg {
			transform: scale(1.1);
			fill: #3b82f6;
			opacity: 1;
		}
		/* Active Beatbox Underline */
		.hub-tab-button.active-beats::after {
			width: 100%;
			background-color: #3b82f6;
		}

		.hub-tab-content {
			display: none;
			padding: 2rem;
		}
		.hub-tab-content.active {
			display: block;
		}

		/* --- 3. Hub Content Grid --- */
		.hub-content-grid {
			display: grid;
			grid-template-columns: 1fr 1fr;
			grid-template-rows: auto auto;
			gap: 2rem;
		}
		.hub-widget {
			/* Each widget will span 1 column by default */
			background: #1a1a1a;
			border-radius: 8px;
			border: 1px solid #333;
			padding: 1.5rem;
		}
		/* Make battle list span full width on top row */
		.hub-content-grid .hub-widget:first-child {
			grid-column: 1 / -1; /* Span full width */
		}

		.hub-widget-header {
			display: flex;
			justify-content: space-between;
			align-items: baseline;
			padding-bottom: 0.75rem;
			margin-bottom: 1.5rem;
			border-bottom: 1px solid #333;
		}
		h2.hub-title-rap {
			font-size: 1.5rem;
			font-weight: 700;
			color: #cf0000;
		}
		h2.hub-title-beats {
			font-size: 1.5rem;
			font-weight: 700;
			color: #3b82f6;
		}
		.hub-view-all {
			color: #aaa;
			text-decoration: none;
			font-weight: 600;
			font-size: 0.9rem;
			transition: color 0.3s ease;
		}
		.hub-view-all:hover {
			color: #fff;
		}
		.hub-no-data {
			color: #888;
			padding: 1rem 0;
			text-align: center;
			font-style: italic;
		}


		/* --- 4. Rehauled Battle Cards --- */
		.rehaul-battle-list {
			display: grid;
			grid-template-columns: repeat(2, 1fr);
			gap: 1.5rem;
		}
		.rehaul-battle-card {
			display: flex;
			align-items: center;
			justify-content: space-between;
			background: #222;
			border-radius: 8px;
			padding: 1.25rem;
			text-decoration: none;
			border: 1px solid #444;
			transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
			position: relative;
			overflow: hidden;
		}

		/* Animated Gradient Border */
		.rehaul-battle-card::before {
			content: '';
			position: absolute;
			top: 0; left: 0;
			width: 200%;
			height: 100%;
			background: linear-gradient(90deg, #cf0000, #3b82f6, #cf0000);
			background-size: 50% 100%;
			opacity: 0;
			transition: opacity 0.3s ease;
			z-index: 1;
			animation: background-pan 4s linear infinite;
		}
		.rehaul-battle-card:hover::before {
			opacity: 1;
		}
		.rehaul-battle-card:hover {
			transform: translateY(-5px);
			border-color: transparent;
		}
		/* This pseudo-element creates the "inner card" look */
		.rehaul-battle-card::after {
			content: '';
			position: absolute;
			top: 2px;
			left: 2px;
			right: 2px;
			bottom: 2px;
			background: #222;
			border-radius: 7px;
			z-index: 2;
			transition: background-color 0.3s ease;
		}
		.rehaul-battle-card:hover::after {
			background: #2a2a2a;
		}


		.battle-card-p1, .battle-card-p2, .battle-card-vs {
			position: relative;
			z-index: 3;
		}

		.battle-card-p1, .battle-card-p2 {
			display: flex;
			flex-direction: column;
			align-items: center;
			gap: 0.5rem;
			flex-basis: 40%;
		}
		.battle-card-p2 {
			align-items: center;
		}
		.battle-card-avatar {
			width: 60px;
			height: 60px;
			border-radius: 50%;
			background-size: cover;
			background-position: center;
			border: 2px solid #555;
			transition: border-color 0.3s ease;
		}
		.battle-card-name {
			color: #eee;
			font-weight: 600;
			font-size: 0.9rem;
			text-align: center;
			white-space: nowrap;
			overflow: hidden;
			text-overflow: ellipsis;
			width: 100%;
		}

		.battle-card-vs {
			display: flex;
			flex-direction: column;
			align-items: center;
			gap: 0.25rem;
		}
		.battle-card-vs > span:first-child {
			font-size: 1.25rem;
			font-weight: 700;
			color: #fff;
			line-height: 1;
		}
		.battle-card-status-live-rap,
		.battle-card-status-live-beats,
		.battle-card-status-upcoming {
			font-size: 0.7rem;
			font-weight: 700;
			padding: 0.2rem 0.5rem;
			border-radius: 4px;
			text-transform: uppercase;
		}
		.battle-card-status-upcoming {
			background-color: #555;
			color: #eee;
		}
		.battle-card-status-live-rap {
			background-color: #cf0000;
			color: #fff;
			animation: pulse-red 2s infinite;
		}
		.battle-card-status-live-beats {
			background-color: #3b82f6;
			color: #fff;
			animation: pulse-blue 2s infinite;
		}

		/* Color tweaks on hover */
		.rehaul-battle-card.live-rap:hover .battle-card-avatar { border-color: #cf0000; }
		.rehaul-battle-card.live-beats:hover .battle-card-avatar { border-color: #3b82f6; }


		/* --- 5. Rehauled Leaderboard Widget --- */
		.rehaul-leaderboard-widget {
			display: flex;
			flex-direction: column;
			gap: 1.5rem;
		}
		.leaderboard-podium {
			display: flex;
			align-items: flex-end;
			justify-content: center;
			gap: 0.5rem;
			padding: 1rem 0;
			border-bottom: 1px solid #333;
		}
		.podium-item {
			display: flex;
			flex-direction: column;
			align-items: center;
			gap: 0.5rem;
			width: 30%;
		}
		.podium-avatar {
			width: 70px;
			height: 70px;
			border-radius: 50%;
			background-size: cover;
			background-position: center;
			border: 3px solid;
			margin-bottom: 0.25rem;
		}
		.podium-name {
			color: #eee;
			font-size: 0.9rem;
			font-weight: 600;
			white-space: nowrap;
			overflow: hidden;
			text-overflow: ellipsis;
			width: 100%;
			text-align: center;
		}
		.podium-points {
			font-size: 0.8rem;
			color: #888;
			font-weight: 600;
		}
		.podium-rank-label {
			font-size: 1.5rem;
			font-weight: 700;
			color: #fff;
			width: 40px;
			height: 40px;
			display: flex;
			align-items: center;
			justify-content: center;
			border-radius: 8px;
			margin-top: 0.5rem;
		}

		/* Rank Colors */
		.podium-item.rank-1 { order: 2; }
		.podium-item.rank-1 .podium-avatar { width: 90px; height: 90px; border-color: #ffd700; }
		.podium-item.rank-1 .podium-rank-label { background: #ffd700; color: #000; }

		.podium-item.rank-2 { order: 1; }
		.podium-item.rank-2 .podium-avatar { border-color: #c0c0c0; }
		.podium-item.rank-2 .podium-rank-label { background: #c0c0c0; color: #000; }

		.podium-item.rank-3 { order: 3; }
		.podium-item.rank-3 .podium-avatar { border-color: #cd7f32; }
		.podium-item.rank-3 .podium-rank-label { background: #cd7f32; color: #000; }

		/* Lower Ranks List */
		.leaderboard-lower-ranks {
			list-style: none;
			padding: 0;
			margin: 0;
			display: flex;
			flex-direction: column;
			gap: 0.75rem;
		}
		.leaderboard-lower-ranks li {
			display: flex;
			align-items: center;
			gap: 0.75rem;
			background: #222;
			padding: 0.5rem 0.75rem;
			border-radius: 6px;
		}
		.lower-rank-num {
			color: #888;
			font-weight: 700;
			font-size: 0.9rem;
			width: 1.5rem;
		}
		.lower-rank-avatar {
			width: 30px;
			height: 30px;
			border-radius: 50%;
		}
		.lower-rank-name {
			color: #ddd;
			font-weight: 600;
			font-size: 0.9rem;
			flex-grow: 1;
		}
		.lower-rank-points {
			font-size: 0.9rem;
			font-weight: 600;
		}
		.points-rap { color: #cf0000; }
		.points-beats { color: #3b82f6; }


		/* --- 6. Rehauled Event List --- */
		.rehaul-event-list {
			display: flex;
			flex-direction: column;
			gap: 0.75rem;
		}
		.rehaul-event-card {
			display: flex;
			align-items: center;
			justify-content: space-between;
			gap: 1rem;
			background: #222;
			padding: 1rem;
			border-radius: 6px;
			text-decoration: none;
			border-left: 4px solid;
			transition: background-color 0.3s ease, transform 0.3s ease;
		}
		.rehaul-event-card.event-rap { border-left-color: #cf0000; }
		.rehaul-event-card.event-beats { border-left-color: #3b82f6; }

		.rehaul-event-card:hover {
			background-color: #2a2a2a;
			transform: scale(1.02);
		}

		.event-card-info {
			display: flex;
			flex-direction: column;
		}
		.event-card-name {
			color: #eee;
			font-weight: 600;
			font-size: 1rem;
			margin-bottom: 0.25rem;
		}
		.event-card-date {
			color: #888;
			font-size: 0.85rem;
			font-weight: 600;
		}
		.event-card-arrow {
			color: #888;
			font-size: 1.5rem;
			font-weight: 700;
			transition: transform 0.3s ease, color 0.3s ease;
		}
		.rehaul-event-card.event-rap:hover .event-card-arrow { transform: translateX(5px); color: #cf0000; }
		.rehaul-event-card.event-beats:hover .event-card-arrow { transform: translateX(5px); color: #3b82f6; }

		/*
		==============================================
		=== ADMIN PANEL TAB COLOR-CODING
		=== Add this to the end of your style.css
		==============================================
		*/

		/* 1. Base color for inactive tabs */
		/* "Manage Users" stays the default #aaa */

		.admin-tab-button[data-tab="users"] {
			color: #ffd700;
			opacity: 0.7;
		}

		/* Make inactive Rap tabs red, but slightly dimmed */
		.admin-tab-button.tab-rap {
			color: #cf0000;
			opacity: 0.7;
		}

		/* Make inactive Beatbox tabs blue, but slightly dimmed */
		.admin-tab-button.tab-beats {
			color: #3b82f6;
			opacity: 0.7;
		}

		/* 2. Hover styles */
		/* "Manage Users" hover (already in your file, but good to be clear) */
		.admin-tab-button:hover {
			color: #fff;
		}
		/* Make Rap/Beatbox tabs full brightness on hover */
		.admin-tab-button.tab-rap:hover,
		.admin-tab-button.tab-beats:hover {
			opacity: 1;
		}

		/* 3. Active styles (text and underline) */
		/* "Manage Users" (active) - remains red */
		/* "Manage Users" (active) - NOW YELLOW */
		.admin-tab-button[data-tab="users"].active {
			color: #ffd700;
			border-bottom-color: #ffd700;
			opacity: 1;
		}

		/* "Rap Hub" (active) - stays red */
		.admin-tab-button.tab-rap.active {
			color: #cf0000;
			border-bottom-color: #cf0000;
			opacity: 1;
		}

		/* "Beatbox Hub" (active) - THIS IS THE FIX */
		.admin-tab-button.tab-beats.active {
			color: #3b82f6;
			border-bottom-color: #3b82f6;
			opacity: 1;
		}

		/* MODIFIED: Base tab button */
		.hub-tab-button {
			flex: 1;
			display: flex;
			align-items: center;
			justify-content: center;
			gap: 0.75rem;
			padding: 1.25rem 1rem;
			font-family: 'Poppins', sans-serif;
			font-size: 1.1rem;
			font-weight: 700;
			/* color: #888; <-- Base color is now set by specific rules below */
			background: transparent;
			border: none;
			/* border-bottom: 4px solid transparent; <-- REMOVED for new ::after element */
			position: relative; /* <-- ADDED for new ::after element */
			cursor: pointer;
			transition: color 0.3s ease, background-color 0.3s ease, opacity 0.3s ease;
			overflow: hidden; /* Ensures no bleed-over */
		}

		/* NEW: Animated underline */
		.hub-tab-button::after {
			content: '';
			position: absolute;
			bottom: -1px; /* Sits over the nav's border */
			left: 50%;
			transform: translateX(-50%);
			width: 0;
			height: 4px;
			background-color: transparent;
			transition: width 0.3s ease-out;
		}

		/* MODIFIED: SVG styles */
		.hub-tab-button svg {
			width: 24px;
			height: 24px;
			transition: transform 0.3s ease, fill 0.3s ease, opacity 0.3s ease;
			/* fill is now set by specific rules below */
		}
		
		/* Rap Tab (Inactive) */
		.hub-tab-button[data-tab="rap-hub"] {
			color: #888;
		}
		.hub-tab-button[data-tab="rap-hub"] svg {
			fill: #888;
		}

		/* Beatbox Tab (Inactive) - THE BIG FIX */
		.hub-tab-button[data-tab="beat-hub"] {
			color: #3b82f6; /* Always blue */
			opacity: 0.7; /* Dimmed when inactive */
			/* LIVELY PULSE (Plan 2) */
			animation: subtle-pulse-blue 3s ease-in-out infinite;
		}
		.hub-tab-button[data-tab="beat-hub"] svg {
			fill: #3b82f6; /* Always blue */
		}

		/* 2. Ensure top padding of content area is exactly 3rem */
        /* This creates a 3rem gap above the newsletter, matching the 3rem margin below it */
        .content-rehaul {
            padding-top: 3rem !important;
        }

        /* Specific Styles for the White Event Cards */
        .event-card-white {
            background-color: #ffffff;
            border-radius: 8px;
            padding: 12px 16px;
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            transition: transform 0.2s ease, box-shadow 0.2s ease;
            text-decoration: none;
            border-left: 5px solid #111; /* Default accent */
        }
        .event-card-white:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 15px rgba(255,255,255,0.2);
        }
        .event-card-white .event-date-box {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            background: #f4f4f4;
            padding: 6px 10px;
            border-radius: 6px;
            min-width: 50px;
            margin-right: 15px;
        }
        .event-card-white .event-month {
            font-size: 0.75rem;
            text-transform: uppercase;
            font-weight: 700;
            color: #555;
            line-height: 1;
        }
        .event-card-white .event-day {
            font-size: 1.2rem;
            font-weight: 800;
            color: #111;
            line-height: 1.1;
        }
        .event-card-white .event-details {
            flex: 1;
        }
        .event-card-white .event-title {
            margin: 0;
            font-size: 0.95rem;
            font-weight: 700;
            color: #111; /* Stark black text */
            line-height: 1.2;
        }
        .event-card-white .event-time {
            font-size: 0.8rem;
            color: #666;
            margin-top: 2px;
            display: block;
        }
        .event-card-white .event-arrow {
            color: #111;
            font-size: 1.2rem;
            font-weight: bold;
            opacity: 0.5;
        }
        /* Hub specific accent colors for the white cards */
        .hub-rap-border { border-left-color: #d32f2f; }
        .hub-beats-border { border-left-color: #1976d2; }

        /* --- FIXED: Newsletter Overflow on 720p/Laptops --- */
        /* Increased breakpoint to 1366px to aggressively catch 720p screens */
        @media (max-width: 1366px) {
            .rehaul-newsletter-box {
                flex-direction: column !important;
                align-items: center !important;
                text-align: center !important;
            }
            
            .rehaul-newsletter-content {
                max-width: 100% !important;
                margin-bottom: 1.5rem;
                margin-right: 0 !important;
            }
            
            /* Forces the form container to be full width */
            .rehaul-newsletter-form {
                width: 100% !important;
                max-width: 100% !important;
                flex-direction: column !important;
            }
            
            /* Ensures input doesn't exceed container and has box-sizing */
            .rehaul-input {
                width: 100% !important;
                margin-bottom: 1rem;
                box-sizing: border-box !important;
            }
            
            /* Ensures button fits within the container */
            .rehaul-btn {
                width: 100% !important;
                max-width: 100% !important;
            }
			
			.bwlogo-footer {
				width: 100%;
				max-width: 100%;
			}
        }

		/*
		==============================================
		=== 4. NEW: ADMIN TABLE SORTER LINKS (FIXED)
		==============================================
		*/
		/* By adding .admin-table-container, this rule becomes more specific */
		.admin-table-container .admin-table th a {
			color: #ffd700; /* Red */
			text-decoration: none;
			transition: color 0.3s ease; /* Added a smooth transition */
		}

		/* Made this more specific too */
		.admin-table-container .admin-table th a:hover {
			color: #fff; /* White on hover */
			text-decoration: underline;
		}

		/* --- 7. Responsive Adjustments for Rehaul --- */

		/* Tablet */
		@media (max-width: 992px) {
			.hub-content-grid {
				grid-template-columns: 1fr; /* Stack leaderboard and events */
			}
			.hub-content-grid .hub-widget:first-child {
				grid-column: 1 / -1; /* This remains the same */
			}
			.rehaul-battle-list {
				grid-template-columns: 1fr; /* Stack battle cards */
			}
		}

		/* Mobile */
		@media (max-width: 768px) {
			.rehaul-newsletter-box {
				flex-direction: column;
				align-items: flex-start;
				padding: 1.5rem;
			}
			.rehaul-newsletter-form {
				flex-direction: column;
				width: 100%;
			}
			.rehaul-btn {
				width: 100%;
			}

			.hub-tab-button {
				font-size: 0.9rem;
				gap: 0.5rem;
				padding: 1rem 0.5rem;
			}
			.hub-tab-button svg {
				width: 20px;
				height: 20px;
			}
			.hub-tab-content {
				padding: 1.5rem;
			}

			h2.hub-title-rap,
			h2.hub-title-beats {
				font-size: 1.25rem;
			}
		}

		@media (max-width: 480px) {
			.leaderboard-podium {
				gap: 0.25rem;
			}
			.podium-avatar {
				width: 60px;
				height: 60px;
			}
			.podium-item.rank-1 .podium-avatar {
				width: 75px;
				height: 75px;
			}
			.podium-name, .lower-rank-name {
				font-size: 0.8rem;
			}
			.podium-rank-label {
				width: 30px;
				height: 30px;
				font-size: 1.2rem;
			}
		}


		/* ==============================================
		=== END OF HOMEPAGE REHAUL 2025 STYLES
		==============================================
		*/
		/* New pulse for the inactive Beatbox Hub tab */
		@keyframes subtle-pulse-blue {
			0%, 100% {
				text-shadow: 0 0 4px rgba(59, 130, 246, 0);
				opacity: 0.7;
			}
			50% {
				text-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
				opacity: 1;
			}
}