*, *::before, *::after {
    box-sizing: border-box !important;
}
/* ==========================================================================
   ONE MASTER BODY & HTML RESET
   ========================================================================== */
html {
    /* Fixes mobile browser height issues */
    height: -webkit-fill-available; 
}

body, html {
    /* 1. Reset Spacing */
    margin: 0;
    padding: 0;
    width: 100%;

    display: flex !important;
    flex-direction: column;

    /* 2. Transparency Fix (Keeps your animated background cubes visible) */
    background-color: #0f0f0f !important; /* Fallback base color */
    background: transparent !important;
    
    /* 3. SCROLL FIX (Crucial!) */
    /* Remove 'height: 100%' and 'position: fixed' */
    min-height: 100vh !important;
    height: auto !important;
    
    /* 4. Scrolling Behavior */
    overflow-x: hidden !important;
    overflow-y: auto !important; /* Forces scrollbar to appear when content is long */
    
    /* 5. Typography & Layout */
    color: #fff;
    font-family: 'Poppins', sans-serif;
    display: flex;
    flex-direction: column;
}

/* 4. Restore the Cube Animation (from your old style) */
.cube {
    position: absolute;
    background: rgba(213, 0, 249, 0.2); /* Increased opacity slightly for visibility */
    border: 1px solid rgba(255, 64, 129, 0.4);
    bottom: -100px; /* Start below screen */
    z-index: -998; /* Just above the background gradient, but behind text */
    animation: float 20s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    100% {
        transform: translateY(-120vh) rotate(360deg);
        opacity: 0;
    }
}

/* ==========================================================================
   2. UPDATED NAVIGATION BAR
   ========================================================================== */

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    z-index: 2000;
}

/* --- 2. Logo: Sharp & Neon --- */
.nav-logo {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9rem;
    color: #ffffff !important;
    text-decoration: none;
    text-transform: uppercase;
    /* Sharp core with external glow only */
    text-shadow: 0 0 8px #ff4081, 0 0 15px rgba(213, 0, 249, 0.4);
    -webkit-font-smoothing: none;
    image-rendering: pixelated;
    margin-right: 20px;
}

/* By setting flex: 1 on the left and right groups, 
   the middle group (nav-center) is forced into the exact center.
*/
.nav-left {
    flex: 1; 
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: flex-start; /* Keeps logo/discord pinned left */
}

.nav-center {
    flex: 0 1 auto; /* Takes only the space it needs */
    display: flex;
    align-items: center;
    gap: 10px;      /* Spacing between the middle buttons */
    justify-content: center;
}

/* --- Updated Nav Right Alignment --- */
.nav-right {
    flex: 1;
    display: flex;
    align-items: center; /* This vertically centers everything */
    gap: 15px;
    justify-content: flex-end; /* Pinned to the right */
    position: relative;
    height: 100%; /* Ensure it fills the nav height */
}

/* --- 4. Links --- */
.nav-link {
    color: #999;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    transition: 0.2s;
    padding: 8px 12px;
}

.nav-link:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 64, 129, 0.5);
}

/* --- 5. Clean Buttons (Discord, IP, Login) --- */
.nav-btn, .nav-server-box, .user-trigger, .login-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 8px 16px;
    color: #fff;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
    cursor: pointer;
}

.nav-server-box {
    position: relative; /* Anchor for the dropdown */
}

/* Player Dropdown Styling */
.player-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 240px;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: none;
    flex-direction: column;
    z-index: 1000;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 15px rgba(213, 0, 249, 0.1);
    animation: fadeInSlide 0.3s ease forwards;
}

.player-dropdown.show-players {
    display: flex;
}

.dropdown-header {
    padding: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Scrollable Area */
.player-list-scroll {
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
}

/* Custom Scrollbar for the player list */
.player-list-scroll::-webkit-scrollbar {
    width: 5px;
}
.player-list-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.player-list-scroll::-webkit-scrollbar-thumb {
    background: rgba(213, 0, 249, 0.3);
    border-radius: 10px;
}

/* Individual Player Item */
.player-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    text-decoration: none !important;
    color: #eee;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-bottom: 2px;
}

.player-item:hover {
    background: rgba(213, 0, 249, 0.1);
    color: #fff;
    transform: translateX(5px);
}

.player-item img {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
}

.no-players {
    padding: 30px 15px;
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
    font-size: 0.85rem;
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.nav-btn:hover, .nav-server-box:hover, .login-btn:hover {
    background: rgba(255, 64, 129, 0.1);
    border-color: #ff4081;
    transform: translateY(-2px);
}

/* Specific Badge Styling */
.copy-badge {
    background: linear-gradient(45deg, #d500f9, #ff4081);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.6rem;
    box-shadow: 0 0 10px rgba(213, 0, 249, 0.3);
}
/* Ensure Copy Badge looks interactive */
.copy-badge:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.server-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.2;
}

.online-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
    margin-right: 6px;
    box-shadow: 0 0 0 rgba(76, 175, 80, 0.4);
    animation: pulse 2s infinite;
}

.offline-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #ff5252;
    border-radius: 50%;
    margin-right: 6px;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

.ip-text { font-size: 0.7rem; color: #fff; }
.status-text { font-size: 0.55rem; color: #4caf50; text-align: center; margin-top: 5px;}
/* Ensure the left side of the nav holds both logo and discord side-by-side */
/* ==========================================================================
   UPDATED NAVIGATION (Match Image Style)
   ========================================================================== */
/* ==========================================================================
   FINAL NAVIGATION FIX: ALIGNMENT & SHARPNESS
   ========================================================================== */

/* 2. Container: Divided into 3 equal sections */
.nav-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr; /* Left, Center (Auto), Right */
    align-items: center;
    width: 100%;
    flex-shrink: 0; 
}


/* 3. LOGO: Forced Sharpness */
.nav-logo {
    font-family: 'Press Start 2P', cursive !important;
    font-size: 1rem !important;
    color: #ffffff !important; /* White core for maximum contrast */
    text-decoration: none;
    line-height: 1;
    
    /* DISABLE BLURRING */
    -webkit-font-smoothing: none !important;
    font-smooth: never !important;
    image-rendering: pixelated !important;
    
    /* SHARP GLOW */
    text-shadow: 2px 2px 0px #000, 0 0 10px #ff4081;
}

/* 4. Align the Groups */
.nav-left-group {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-self: start; /* Pinned to the left */
}

.nav-links {
    display: flex;
    gap: 5px;
    justify-self: center; /* Pinned to the middle */
}
.nav-link.active::after {
    width: 60% !important;
    background: #ff4081;
    box-shadow: 0 0 10px #ff4081;
}
.nav-link.active {
    color: #fff !important;
}

.nav-right-group {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
    justify-self: end; /* Pinned to the right */
}

/* --- Search Dropdown System --- */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

/* The Magnifying Glass Trigger */
.search-trigger {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(213, 0, 249, 0.3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.search-trigger:hover {
    background: rgba(255, 64, 129, 0.15);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 15px rgba(213, 0, 249, 0.2);
}

/* The actual dropdown box */
.search-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(213, 0, 249, 0.3);
    border-radius: 12px;
    padding: 10px;
    min-width: 220px;
    display: none; /* Hidden by default */
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.search-dropdown.show {
    display: block;
    animation: navFadeIn 0.2s ease-out;
}

/* Form inside the dropdown */
.search-dropdown form {
    display: flex;
    gap: 8px;
    margin: 0;
}

.search-dropdown input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #fff;
    padding: 8px 12px;
    outline: none;
    font-size: 0.85rem;
}

.search-dropdown input:focus {
    border-color: #d500f9;
}

.search-dropdown button {
    background: #d500f9;
    border: none;
    color: white;
    padding: 0 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.search-dropdown button:hover {
    background: #f500ff;
    transform: scale(1.05);
}

/* 5. Button & UI Alignment */
.nav-left-discord, .nav-server-box, .user-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 45px; /* Forced consistent height */
    padding: 0 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(213, 0, 249, 0.3);
    border-radius: 10px;
    text-decoration: none;
    color: #fff;
    transition: 0.3s;
}

/* ==========================================================================
   4. USER ACCOUNT MENU (Dropdown Fix)
   ========================================================================== */
.user-menu-container { position: relative; }

.user-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 220px;
    background: #111;
    border: 1px solid rgba(255, 64, 129, 0.4);
    border-radius: 12px;
    padding: 8px 0;
    z-index: 10000;
    
    /* FIX: Force vertical column alignment */
    flex-direction: column !important;
    text-align: left;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.user-dropdown a {
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-muted);
    text-decoration: none !important;
    font-size: 0.85rem;
    width: 100%;
    transition: 0.2s;
}

.user-dropdown a:hover {
    background: rgba(255, 64, 129, 0.1);
    color: #fff;
}

/* ==========================================================================
   5. SPA VISIBILITY SYSTEM (Sections)
   ========================================================================== */

/* Show the active section */
.active-section {
    opacity: 1 !important;
}

/* IMPORTANT: Ensure standalone pages are NEVER hidden */
.login-card, .profile-wrapper, .admin-container, .dashboard-card {
}

/* ==========================================================================
   6. HOME / HERO SECTION
   ========================================================================== */
#home {
    position: relative;
    width: 100%;
}

/* Specific fix for the Home page centering 
#home.active-section {*/
    /* Remove the large subtraction and centering if you want it higher 
    min-height: auto; 
    justify-content: flex-start; 
    padding-top: 20px; 
}*/

/* Update Section 6: Specific Hero sizing */
.hero {
    min-height: 50vh; 
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Changed from center */
    align-items: center;
    width: 100%;
}

.hero h1 { 
    font-family: 'Press Start 2P', cursive; 
    font-size: 4rem; 
    text-shadow: 0 0 30px rgba(213, 0, 249, 0.4); 
}

/* ==========================================================================
   7. STATS & LEADERBOARDS
   ========================================================================== */
/* ==========================================================================
   STATS PAGE STYLING
   ========================================================================== */
/* ==========================================================================
   PREMIUM STATS PAGE (GLASS-MORPHISM)
   ========================================================================== */
/* ==========================================================================
   STATS TIMEFRAME FILTER
   ========================================================================== */

.stats-filter {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    width: 100%;
    padding: 10px;
}

.filter-btn {
    background: rgba(20, 20, 20, 0.6) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
    padding: 12px 30px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* Hover State - Pink Glow */
.filter-btn:hover {
    color: #fff;
    border-color: #ff4081;
    box-shadow: 0 0 15px rgba(255, 64, 129, 0.2);
}

/* Active State - Vibrant #ff4081 */
.filter-btn.active {
    color: #fff !important;
    /* Gradient shifts from deep pink to dark burgundy */
    background: linear-gradient(135deg, rgba(255, 64, 129, 0.25) 0%, rgba(80, 0, 30, 0.5) 100%) !important;
    border-color: #ff4081 !important;
    box-shadow: 0 0 20px rgba(255, 64, 129, 0.4);
    position: relative;
}

/* The Pink bottom indicator */
.filter-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 2px;
    background: #ff4081;
    box-shadow: 0 0 10px #ff4081;
}

/* Responsiveness for mobile */
@media (max-width: 768px) {
    .stats-filter {
        gap: 10px;
        flex-wrap: wrap;
    }
    .filter-btn {
        padding: 10px 15px;
        font-size: 0.75rem;
        flex: 1;
        text-align: center;
    }
}

/* 1. Header Section with Animated Diamonds */
.stats-header {
    text-align: center;
}

.header-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 10px;
}

.stats-header h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 2.2rem;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 64, 129, 0.4);
    margin: 0;
}

.header-diamond {
    width: 45px;
    height: auto;
    filter: drop-shadow(0 0 12px rgba(0, 229, 255, 0.6));
    image-rendering: pixelated;
    animation: pulseDiamond 2.5s infinite ease-in-out;
}

/*  Stats page/container */
.stats-page {
    position: relative;
    height: calc(100vh - 80px) !important;
    overflow-y: auto;
}

/* 2. Grid Layout */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 92%;
    max-width: 1300px;
    margin: 0 auto 100px;
}

/* 3. The Premium Card */
.stat-card {
    background: rgba(15, 15, 15, 0.4) !important;
    backdrop-filter: blur(15px); /* Stronger frosted glass effect */
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    padding: 15px !important;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stat-card:hover {
    background: rgba(20, 20, 20, 0.6) !important;
    border-color: rgba(255, 64, 129, 0.4);
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

/* 4. Card Header */
.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.card-header h3 {
    margin: 0;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    color: #ffffff;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.card-icon {
    width: 28px;
    height: 28px;
    image-rendering: pixelated;
    filter: drop-shadow(0 0 10px rgba(213, 0, 249, 0.6));
}

/* 5. Stat Rows & Data */
.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    gap: 12px;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: 0.2s;
}

.stat-row:last-child { border-bottom: none; }

.stat-left {
    display: flex;
    align-items: center;
    overflow: hidden; /* Important for ellipsis */
    flex-grow: 1;    /* Takes up all remaining space */
}

/* Ensure the flex container handles the badge correctly */
.player-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.rank {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    color: #555; /* Muted rank number */
    width: 35px;
    margin-right: 10px
}

.player-head {
    border-radius: 4px;
    image-rendering: pixelated;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    margin-right: 10px;
}

.player-name {
    font-family: 'Press Start 2P', cursive;
    font-weight: 550;
    color: #e0e0e0;
    text-decoration: none;
    font-size: 0.95rem;
    transition: 0.2s;
    line-height: 1.2;
}

.stat-row:hover .player-name {
    color: #ff4081;
    transform: translateX(5px);
}

/* 6. Value and Unit Styling */
.p-value {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.75rem;
    color: #ff4081;
    display: flex;
    align-items: baseline;
    text-shadow: 0 0 12px rgba(255, 64, 129, 0.3);
}

.p-value .unit {
    font-family: 'Poppins', sans-serif;
    font-size: 0.6rem; /* Smaller h for professional look */
    margin-left: 3px;
    color: #fff;
    opacity: 0.5;
    font-weight: 600;
    text-shadow: none;
}

/* Highlight for the #1 Player */
.stat-row:first-of-type .rank {
    color: #ffd700; /* Gold for first place */
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

/* Animation */
@keyframes pulseDiamond {
    0%, 100% { transform: translateY(0) scale(1); opacity: 1; }
    50% { transform: translateY(-8px) scale(1.1); opacity: 0.8; }
}

@media (max-width: 900px) {
    .stats-grid { grid-template-columns: 1fr; }
    .stats-header h2 { font-size: 1.4rem; }
}
/* ==========================================================================
   8. STAFF SECTION
   ========================================================================== */
/* Add this to style.css for the staff page specifically */
.staff-layout-wrapper {
    width: 100%;
    gap: 40px;
    align-items: flex-start; /* Keeps sidebar from stretching */
    justify-content: center;
    margin-top: 30px;
}

.apply-sidebar {
    flex: 0 0 300px; /* Locked width for the sidebar */
    position: sticky;
    top: 140px;
}

.staff-main-area {
    flex: 1; /* Takes up remaining space */
}
.apply-card {
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
}

/* Rank Tabs */
.rank-tabs-container {
    gap: 10px;
    margin-bottom: 30px;
}

.rank-tab {
    background: #1a1a1a;
    border: 1px solid #333;
    color: #888;
    padding: 10px 25px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.rank-tab.active-rank {
    background: var(--accent-gradient);
    color: white;
    border: none;
}

/* Player Grid */
.staff-main-area { flex: 1; }

.staff-player-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}
/* Staff Page Grid */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    width: 90%;
    max-width: 1200px;
}
.staff-card {
    background: #111;
    border: 1px solid rgba(255,255,255,0.03);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    transition: 0.3s;
}

.staff-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.card-avatar img { height: 120px; margin-bottom: 10px; }

.card-rank-tag {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 4px;
    margin-top: 8px;
}

/* Visibility toggles */

/* Ensure mobile compatibility */
@media (max-width: 900px) {
    #staff.active-section {
        flex-direction: column; /* Stacks sidebar on top of staff on phones */
    }
}

/* ==========================================================================
   MASTER FOOTER
   ========================================================================== */
.subtle-footer {
    /* 1. Remove 'position: fixed' so it sits AFTER the content */
    position: fixed; 
    bottom: 0;
    left: 0;
    
    /* 2. Sizing and Spacing */
    width: 100%;
    height: 60px;
    padding: 30px 0;      /* Give the legal text some breathing room */
    margin-top: 60px;     /* Forces a gap between the last staff row and footer */
    
    /* 3. Visuals */
    text-align: center;
    background: rgba(0, 0, 0, 0.4);
    background-color: #0f0b15 !important;
    backdrop-filter: blur(5px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    
    /* 4. Layering */
    z-index: 9999;
}

.footer-content {
    text-align: center; /* Centers the actual text lines inside the div */
}

.footer-content p {
    margin: 3px 0;
}

.content-wrapper {
    flex: 1 0 auto;
    flex-direction: column;
}

/* ==========================================================================
   10. BACKGROUND & ANIMATIONS
   ========================================================================== */
   
.cube { position: absolute; background: rgba(213, 0, 249, 0.05); border: 1px solid rgba(255, 64, 129, 0.1); animation: float 20s infinite linear; bottom: -100px; }

@keyframes float { 
    0% { transform: translateY(0) rotate(0deg); opacity: 0; } 
    10% { opacity: 1; }
    100% { transform: translateY(-120vh) rotate(360deg); opacity: 0; } 
}


/* ==========================================================================
   MAPS PAGE STYLING
   ========================================================================== */
.map-container {
    width: 95%;
    max-width: 1400px;
    height: 70vh; /* Keeps the footer visible at the bottom */
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(213, 0, 249, 0.3);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(213, 0, 249, 0.1);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.map-container:hover {
    border-color: var(--secondary); /* Pink glow on hover */
    box-shadow: 0 0 30px rgba(255, 64, 129, 0.2);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Ensure the maps section doesn't center everything vertically so the map stays large */
#maps {
    justify-content: flex-start !important;
}

/* ==========================================================================
   11. PAGE WRAPPERS
   ========================================================================== */
/* Update these specific blocks in your style.css */

/* Update Section 11 in style.css */
#main-content-scroll-area {
    /* 100px is the "sweet spot" (80px nav height + 20px gap) */
    padding-top: 100px !important; 
    background: transparent !important;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; 
    position: relative;
}

/* THE SECTIONS: All pages share this centered structure */
/* Update Section 5: Remove the 'display: none' */
section {
    display: flex; /* Always visible now */
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: transparent !important;
}

/* Standardize the Header spacing specifically */
.page-header, .stats-header, .staff-header-text {
    text-align: center;
    width: 100%;
}

h1, h2, h3, p {
    margin-top: 0 !important;
}
.page-header h2, 
.page-header h1 {
    font-family: 'Press Start 2P', cursive; /* Your pixel font */
    font-size: 2rem;
    color: #ffffff; /* White */
    margin: 0 0 10px 0;
    text-transform: uppercase;
}
.page-header p {
    color: #888;
    font-size: 0.9rem;
    margin: 0 !important;
    margin-bottom: 30px;
}

/* Every page content follows this rule automatically */
.page-content {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    flex-direction: column;
    align-items: center;
}
/* ==========================================================================
   RULES PAGE STYLING
   ========================================================================== */
.rules-container {
    width: 100%;
    max-width: 800px;
    margin-top: 30px;
}

.rules-card {
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(213, 0, 249, 0.2);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.rules-list {
    list-style: none;
    text-align: left;
}

.rules-list li {
    padding: 20px; /* Added padding to give the hover box some space */
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: default;
    border: 1px solid transparent; /* Prepare the border for the hover state */
}

.rules-list li:hover {
    background: rgba(255, 64, 129, 0.05); /* Very subtle pink tint */
    transform: translateX(10px); /* Slides the rule slightly to the right */
    border-color: rgba(255, 64, 129, 0.3); /* Shows a soft pink border */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.rules-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Make the icon glow when the parent LI is hovered */
.rules-list li:hover i {
    color: var(--primary);
    text-shadow: 0 0 10px var(--secondary);
    transform: scale(1.2);
}

.rules-list i {
    transition: all 0.3s ease; /* Ensure the icon animation is smooth too */
}

.rule-content {
    display: flex;
    flex-direction: column;
}

.rules-list strong {
    margin-bottom: 2px;
}

/* ==========================================================================
   PROFILE PAGE STYLING
   ========================================================================== */

/* Centering the card and clearing the Navbar */
#profile-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* --- Stat Box Rank Styling --- */
.stat-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

/* Rank Badge Styling */
.stat-rank {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.5);
    display: inline-block;
    border: 1px solid #444;
    color: #888; /* Default for N/A or high numbers */
}

/* Gold, Silver, Bronze Special Styles */
.rank-gold {
    color: #ffca28;
    border-color: #ffca28;
    box-shadow: 0 0 8px rgba(255, 202, 40, 0.2);
}

.rank-silver {
    color: #e0e0e0;
    border-color: #e0e0e0;
}

.rank-bronze {
    color: #cd7f32;
    border-color: #cd7f32;
}

/* Dashboard Card */
.profile-card {
    background: #111111;
    border: 1px solid #1a1a1a;
    border-radius: 20px;
    display: flex;
    width: 100%;
    max-width: 950px;
    min-height: 550px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.8);
    overflow: hidden;
}

/* Sidebar Styling */
.sidebar {
    background: #151515;
    width: 300px;
    padding: 60px 20px;
    text-align: center;
    border-right: 1px solid #1a1a1a;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-link-wrapper {
    text-decoration: none;
    display: block;
    transition: transform 0.2s ease;
}

.stat-link-wrapper:hover {
    transform: translateY(-5px);
}

.stat-link-wrapper:hover .stat-box {
    border-color: #d500f9;
    background: rgba(213, 0, 249, 0.05);
}

.sidebar .model-wrapper {
    margin-bottom: 0;
    
}

.sidebar .username {
    margin-top: 10px !important;
    padding-top: 0;
    text-align:center;
}

.sidebar .badge {
    margin-top: 5px;
}

.model-wrapper img {
    width: 180px;
    image-rendering: pixelated;
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.6));
    margin-bottom: 5px !important;
}

.username {
    font-family: 'Press Start 2P', cursive;
    font-size: 1rem;
    color: #fff;
    margin: 0 !important;     /* Remove default h1 margins */
    line-height: 1;           /* Prevents text from sitting too high/low */
    display: flex;
    align-items: center;
}

.profile-user-info {
    display: flex;
    flex-direction: column; /* Stacks name and badge vertically */
    align-items: center;    /* Centers items horizontally */
    text-align: center;     /* Ensures text inside items is centered */
    gap: 8px;              /* Adjusts the space between name and badge */
    width: 100%;           /* Ensures it takes up the full width of the header area */
}

/* Username & Status Dot Container */
.username-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.status-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

/* Online State - Pulsing Green */
.status-dot.online {
    background-color: #4caf50;
    box-shadow: 0 0 0 rgba(76, 175, 80, 0.4);
    animation: statusPulse 2s infinite;
}

/* Offline State - Solid Muted Red */
.status-dot.offline {
    background-color: #757575; /* Gray for offline */
    opacity: 0.6;
}
/* Green Pulse Animation */
@keyframes statusPulse {
    0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

/* Metadata Styling */
.profile-metadata-top {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.meta-item-mini {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    gap: 5px;
}

.badge {
    position: relative;
    display: inline-block; 
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    background: #333;
    overflow: hidden;
    /* margin: 0 auto; */ /* Optional: standard centering fallback */
}

/* Ensure the shimmer doesn't play for unregistered users */
.badge.not-registered::before {
    display: none;
}

.badge::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.4) 50%, 
        rgba(255,255,255,0) 100%
    );
    transform: rotate(45deg);
    animation: shimmerStreak 4s infinite;
}

/* Rank specific colors */
/* The Main Owner Badge */
.badge.owner {
    position: relative;
    display: inline-block;
    padding: 6px 16px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    color: #ffffff;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
    background: linear-gradient(45deg, #6a11cb, #2575fc, #ff00ea, #6a11cb);
    background-size: 400% 400%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    box-shadow: 0 0 15px rgba(213, 0, 249, 0.4);
    overflow: hidden;
    animation: gradientShift 8s ease infinite, ownerPulse 2s infinite;
}

/* The "Shimmer" Sparkle Streak */
.badge.owner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.2);
    background: linear-gradient(
        to bottom right, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0) 40%, 
        rgba(255,255,255,0.7) 50%, 
        rgba(255,255,255,0) 60%, 
        rgba(255,255,255,0) 100%
    );
    transform: rotate(45deg);
    animation: shimmerStreak 3s infinite;
}

/* Animations */

/* 1. Moving the purple/pink gradient */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 2. The diagonal white light streak (sparkle) */
@keyframes shimmerStreak {
    0% { transform: translateX(-150%) rotate(45deg); }
    100% { transform: translateX(150%) rotate(45deg); }
}

/* 3. A subtle neon pulse */
@keyframes ownerPulse {
    0%, 100% { box-shadow: 0 0 15px rgba(213, 0, 249, 0.4); }
    50% { box-shadow: 0 0 25px rgba(255, 0, 234, 0.8); border-color: rgba(255, 255, 255, 0.6); }
}

/* --- ADMIN: Red/Gold Neon --- */
.badge.admin {
    background: linear-gradient(45deg, #ff0000, #ff8c00);
    box-shadow: 0 0 12px rgba(255, 0, 0, 0.5);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* --- MODERATOR: Cyan/Blue Neon --- */
.badge.moderator {
    background: linear-gradient(45deg, #00d2ff, #3a7bd5);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.4);
}

/* --- HELPER: Emerald/Green Neon --- */
.badge.helper {
    background: linear-gradient(45deg, #00b09b, #96c93d);
    box-shadow: 0 0 10px rgba(0, 176, 155, 0.4);
}

/* --- MEMBER: (Lowest Registered Rank) --- */
.badge.member {
    background: #2a2a2a;
    color: #eee;
    border: 1px solid #444;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
}

/* --- SPARK (Default) --- */
.badge.spark {
    background: #BDC3C7;
    color: #2c3e50;
    box-shadow: 0 0 5px rgba(189, 195, 199, 0.3);
}

/* --- NOVICE --- */
.badge.novice {
    background: linear-gradient(45deg, #FF9FCE, #ffc1e0);
    color: #fff;
    box-shadow: 0 0 8px rgba(255, 159, 206, 0.4);
}

/* --- ACOLYTE --- */
.badge.acolyte {
    background: linear-gradient(45deg, #FF69B4, #ff85c1);
    color: #fff;
    box-shadow: 0 0 10px rgba(255, 105, 180, 0.4);
}

/* --- ADEPT --- */
.badge.adept {
    background: linear-gradient(45deg, #8A2BE2, #a04ef6);
    color: #fff;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.4);
}

/* --- MASTER --- */
.badge.master {
    background: linear-gradient(45deg, #9D4EDD, #7b2cbf);
    color: #fff;
    box-shadow: 0 0 12px rgba(157, 78, 221, 0.5);
}

/* --- EXALTED --- */
.badge.exalted {
    background: linear-gradient(45deg, #FF0080, #ff4da6);
    color: #fff;
    box-shadow: 0 0 12px rgba(255, 0, 128, 0.5);
}

/* --- ASCENDANT (Gold) --- */
.badge.ascendant {
    background: linear-gradient(45deg, #FFAA00, #FFD700);
    color: #fff;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
    box-shadow: 0 0 15px rgba(255, 170, 0, 0.4);
}

/* --- CELESTIAL --- */
.badge.celestial {
    background: linear-gradient(45deg, #6A11CB, #2575FC);
    color: #fff;
    box-shadow: 0 0 15px rgba(106, 17, 203, 0.5);
}

/* --- ETERNAL --- */
.badge.eternal {
    background: linear-gradient(45deg, #FF00FF, #7000ff);
    color: #fff;
    animation: eternalPulse 3s infinite;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.4);
}

/* Animation for the top-tier Eternal rank */
@keyframes eternalPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 15px rgba(255, 0, 255, 0.4); }
    50% { transform: scale(1.02); box-shadow: 0 0 25px rgba(255, 0, 255, 0.7); }
}

/* Shared Animations */
@keyframes shimmerStreak {
    0% { transform: translateX(-150%) rotate(45deg); }
    100% { transform: translateX(150%) rotate(45deg); }
}

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

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    color: #444;
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.,3s ease;
}
.back-btn:hover {
    transform: translateX(-5px); /* Subtle slide to the left on hover */
    color: #d500f9;
    text-shadow: 0 0 10px rgba(213, 0, 249, 0.5);
}

/* Right Section Stats */
.stats-content {
    overflow-y: auto;
    flex: 1;
    padding: 50px;
}

.label {
    font-size: 0.95rem;
    color: #333;
    letter-spacing: 2px;
    margin-bottom: 30px;
    font-weight: 800;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

/* Updated Stat Box to center content */
.stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    transition: 0.3s;
}

.stat-box:hover {
    border-color: #d500f9;
    background: rgba(213, 0, 249, 0.05);
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 5px;
    font-weight: 700;
}

.stat-val {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.1rem;
    color: #ffffff; /* Changed from blue to white for clarity */
    display: block;
    margin-bottom: 8px;
    text-shadow: 0 0 10px rgba(213, 0, 249, 0.3);
}

.view-all-btn {
    background: rgba(213, 0, 249, 0.1);
    color: #d500f9;
    border: 1px solid #d500f9;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.view-all-btn:hover {
    background: #d500f9;
    color: #fff;
    box-shadow: 0 0 15px rgba(213, 0, 249, 0.5);
    transform: translateY(-2px);
}

.player-title-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

.player-title-link:hover .profile-username {
    color: #d500f9;
}
/*
===============================
==   STAFF PAGE SETUP
===============================*/
/* Layout Structure */
/* Container Layout */
.staff-page-container {
    max-width: 1200px;
    margin: 100px auto;
    padding: 20px;
}

.staff-header-text {
    text-align: center;
    margin-bottom: 50px;
}

.staff-header-text h1 {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 5px;
}

.staff-header-text p {
    color: #aaa;
    font-size: 0.9rem;
}

/* 1. Create a 3-column grid to balance the page */
/* Ensure the staff layout doesn't trap height */
.staff-layout {
    display: flex !important;
    align-items: flex-start;
    justify-content: center;
    gap: 40px;
    min-height: 500px;
    height: auto !important;
    overflow: visible !important;
}

.staff-layout::after {
    content: "";
    width: 300px;            /* Must match the sidebar width exactly */
    display: block;
}

/* Sidebar Application Card */
.sidebar-container {
    flex: 0 0 300px;         /* Fixed width: Don't grow, don't shrink, stay 300px */
}

.apply-card-v2 {
    background: #111; /* Dark card background */
    border: 1px solid #222;
    border-radius: 15px;
    padding: 30px;
    text-align: left;
}

.apply-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ff4081; /* Pink */
    font-weight: bold;
    margin-bottom: 15px;
}

.apply-card-v2 p {
    font-size: 0.85rem;
    color: #888;
    line-height: 1.5;
    margin-bottom: 25px;
}

.apply-btn-neon {
    display: block;
    background: #ff4081;
    color: white;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    transition: 0.3s;
}

.apply-btn-neon:hover {
    box-shadow: 0 0 15px rgba(255, 64, 129, 0.5);
}

/* 3. Ensure the main content centers its internal grid items */
.staff-main-content {
    display: flex;
    flex-direction: column;
    align-items: center;    /* Centers the 'rank-grid-content' container */
    width: 100%;
}

/* Staff Rank Navigation Container */
.rank-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    padding: 10px;
}

/* Base Rank Button (The "Stat Pill" look) */
.rank-tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
    padding: 10px 24px;
    border-radius: 50px; /* Forces the pill shape */
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
}

/* Hover State */
.rank-tab-btn:hover {
    background: rgba(213, 0, 249, 0.08);
    border-color: rgba(213, 0, 249, 0.3);
    color: #fff;
    transform: translateY(-2px);
}

/* Active State (Matches your stats.php active-pill) */
.rank-tab-btn.active-pill {
    background: rgba(213, 0, 249, 0.2) !important;
    border-color: #d500f9 !important;
    color: #fff !important;
    box-shadow: 0 0 20px rgba(213, 0, 249, 0.4);
    transform: scale(1.05);
}

.rank-tab-btn i {
    font-size: 0.9rem;
    opacity: 0.8;
}

.rank-tab-btn.active-pill i {
    color: #d500f9;
    opacity: 1;
}

.staff-display-window {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 30px;
    min-height: 400px;
    backdrop-filter: blur(10px);
}

/* 1. Hide all rank grids by default */
.rank-grid-content {
    display: none;
    width: 100%;
}

.rank-grid-content.active {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center; /* Centers the actual player cards */
    gap: 20px;
    width: 100%;
}

/* 4. Responsive: Stack them on smaller screens */
@media (max-width: 1200px) {
    .staff-layout {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .staff-layout::after {
        display: none; /* Remove ghost spacer on mobile */
    }
    .sidebar-container {
        width: 100%;
        max-width: 400px;
        margin-bottom: 30px;
    }
}

.player-card {
    /* (100% / 4) minus the gaps = roughly 23% */
    flex: 0 1 calc(25% - 20px); 
    min-width: 200px;           /* Prevents them from getting too skinny */
    background: rgba(15, 15, 15, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 25px 15px;
    text-align: center;
    transition: 0.3s ease;
}

/* Removes default link styling */
.player-card-link {
    text-decoration: none !important;
    display: block; /* Makes the entire area of the 4-column grid clickable */
    color: inherit;
}

/* Ensure the hover effect we built earlier still works through the link */
.player-card-link:hover .player-card {
    border-color: #ff4081;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(255, 64, 129, 0.2);
    cursor: pointer;
}

.player-card:hover {
    border-color: #ff4081; /* Pink neon glow from your variables */
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(255, 64, 129, 0.2);
}

/* Optional: Add a slight brightness boost to the skin on hover */
.player-card-link:hover .mc-render img {
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.5)) brightness(1.1);
}

/* Ensure the Minecraft skin isn't too large for the smaller columns */
.mc-render img {
    width: 100px;
    height: auto;
    image-rendering: pixelated;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.5));
}

@media (max-width: 1000px) {
    .rank-grid-content.active {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 users per line on tablets */
    }
}

@media (max-width: 600px) {
    .rank-grid-content.active {
        grid-template-columns: 1fr !important; /* 1 user per line on small phones */
    }
}

/* Style for the Minecraft Name */
.player-info {
    font-family: 'Poppins', sans-serif;
    margin: 0;              /* Removes default heading gaps */
    font-size: 0.95rem;
    color: #ffffff;
    letter-spacing: 0px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Center the badge and add some spacing */
.player-info .badge {
    margin-top: 8px;
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.65rem;
    font-family: 'Press Start 2P', cursive; /* Optional: matches your pixel font */
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}


/*===============================
==   USER MENU
===============================*/
/* User Menu Container */
.user-menu-container {
    position: relative;
    display: inline-block;
}

.user-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.user-trigger img {
    border-radius: 4px;
}

/* Dropdown Box */
.user-dropdown {
    display: none; /* Hidden by default */
    position: absolute;
    right: 0;
    top: 55px;
    background: #151515;
    min-width: 200px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 1000;
    overflow: hidden;
}

/* Show class for JS */
.user-dropdown.show {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.dropdown-header {
    padding: 12px 15px;
    font-size: 0.75rem;
    color: #888;
}

.dropdown-header span {
    color: var(--secondary);
    font-weight: bold;
}

.user-dropdown hr {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin: 0;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: #ccc;
    text-decoration: none;
    font-size: 0.85rem;
    transition: 0.2s;
}

.user-dropdown a i {
    width: 16px;
    font-size: 0.9rem;
}

.user-dropdown a:hover {
    background: rgba(213, 0, 249, 0.1); /* Neon primary tint */
    color: white;
}

.logout-link:hover {
    background: rgba(255, 64, 129, 0.1) !important; /* Neon secondary tint */
    color: #ff4081 !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   1. GLOBAL & BACKGROUND LAYERING (From style.css & header.php)
   ========================================================================== */
:root {
    --primary: #ff4081;
    --secondary: #d500f9;
    --background: #0a0a0a;
    --text-muted: #888;
}


/* ==========================================================================
   FIXED MASTER BACKGROUND
   ========================================================================== */
.background {
    position: fixed; /* Keeps it stuck to the glass of the screen */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -999;   /* Stays behind everything */
    
    /* Your signature purple/black gradient */
    background: radial-gradient(circle at 50% 50%, #1a1025 0%, #000000 100%);
    
    /* Keeps animated cubes from creating scrollbars */
    overflow: hidden; 
    
    /* CRITICAL: Allows you to click buttons/links through this layer */
    pointer-events: none; 
}

/* Floating Cube Animation */
.cube {
    position: absolute;
    background: rgba(213, 0, 249, 0.2);
    border: 1px solid rgba(255, 64, 129, 0.4);
    bottom: -100px;
    z-index: -998;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    100% { transform: translateY(-120vh) rotate(360deg); opacity: 0; }
}

/* ==========================================================================
   MASTER NAVIGATION BAR
   ========================================================================== */
nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    
    /* Width & Sizing */
    width: 95%;
    max-width: 1400px;
    height: 75px; /* Perfect middle-ground height */
    
    /* Layering & Interaction */
    z-index: 10000;
    pointer-events: auto; /* Ensures links remain clickable */
    
    /* Visual Style: Modern Frosted Glass */
    background: rgba(10, 10, 10, 0.75);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px); /* Safari support */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    
    /* Internal Alignment */
    display: flex;
    align-items: center;
    padding: 0 30px;
    
    /* Smooth entrance/shadow */
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

/* Container: Divided into 3 equal sections */
.nav-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
}

/* LOGO: Forced Sharpness */
.nav-logo {
    font-family: 'Press Start 2P', cursive !important;
    font-size: 1rem !important;
    color: #ffffff !important;
    text-decoration: none;
    line-height: 1;
    -webkit-font-smoothing: none !important;
    image-rendering: pixelated !important;
    text-shadow: 2px 2px 0px #000, 0 0 10px var(--primary);
}

.nav-left-group, .nav-right-group {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-left-group { justify-self: start; }
.nav-right-group { justify-self: end; }

/* Links */
.nav-links {
    display: flex;
    gap: 5px;
    justify-self: center;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    transition: 0.3s;
    padding: 8px 12px;
}

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

/* Buttons (Discord, IP, Login) */
.nav-left-discord, .nav-server-box, .user-trigger, .login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 45px;
    padding: 0 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(213, 0, 249, 0.3);
    border-radius: 10px;
    text-decoration: none;
    color: #fff;
    font-size: 0.7rem;
    font-weight: bold;
    transition: 0.3s;
}

.nav-server-box:hover, .nav-left-discord:hover {
    background: rgba(255, 64, 129, 0.15);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.discord-btn {
    display: flex;
    align-items: center;
    gap: 8px;
}

.discord-count {
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    color: #fff;
}

/* ==========================================================================
   3. USER ACCOUNT MENU & DROPDOWN (From navbar.php & style.css)
   ========================================================================== */
.user-menu-container { position: relative; }

.user-dropdown {
    display: none; /* Hidden by default; toggled via JS */
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 220px;
    background: #111;
    border: 1px solid rgba(255, 64, 129, 0.4);
    border-radius: 12px;
    padding: 8px 0;
    z-index: 10001;
    flex-direction: column !important;
    text-align: left;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.user-dropdown.show { display: flex; }

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-muted);
    text-decoration: none !important;
    font-size: 0.85rem;
    width: 100%;
    transition: 0.2s;
}

.user-dropdown a:hover {
    background: rgba(255, 64, 129, 0.1);
    color: #fff;
}

.dropdown-header {
    padding: 10px 20px;
    font-size: 0.7rem;
    color: #888;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* ==========================================================================
   4. FOOTER (Ultra-Slim & Space Efficient)
   ========================================================================== */

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-content p {
    font-size: 0.75rem;     /* Smaller text saves space */
    color: var(--text-muted);
    margin: 0 !important;    /* Hard reset: removes the "gap" between lines */
    line-height: 1.3;       /* Tightens vertical height */
}

.legal-disclaimer {
    font-size: 0.65rem !important;
    opacity: 0.4;
    margin-top: 2px !important;
}

/* ==========================================================================
   5. PAGE WRAPPER & LAYOUT
   ========================================================================== */
#page-wrapper {

    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;

    /* Pin it strictly between the navbar and footer */
    position: fixed !important;
    top: 105px !important;   /* Nav top (20px) + Nav height (75px) + gap (10px) */
    bottom: 60px !important; /* Matches Footer height exactly */
    
    /* Stretch it full width so the scrollbar stays on the far right edge */
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    
    /* Enable scrolling ONLY inside this box */
    overflow: visible !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    
    /* Reset old giant spacing since it's no longer needed */
    padding-top: 20px !important;
    padding-bottom: 40px !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 20px;
}

#page-wrapper > div,
#page-wrapper > section {
    max-width: 1400px;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 20px;
    padding-right: 20px;
}

/* This ensures the first thing inside (like your <h2>) doesn't add its own extra gap */
#page-wrapper > *:first-child {
    margin-top: 0 !important;
}
/* ==========================================================================
   DEBUG
   ========================================================================== */
/* TEMP GHOST OUTLINE */
/** {
    outline: 1px solid rgba(255, 0, 0, 0.2) !important;
}*/

/* Final override to ensure nothing blocks the scroll */
/*main, section, div.staff-layout {
    overflow: visible !important;
    height: auto !important;
}*/

nav, .subtle-footer {
    /* Increase opacity from 0.7 to 0.95 so content doesn't bleed through */
    background: rgba(10, 10, 10, 0.95) !important;
    
    /* The blur helps hide the "edges" of content passing behind it */
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px);
}

/* Application Form Styles */
.apply-container {
    max-width: 800px;
    margin: 0 auto;
    margin-top: 40px;
    width: 100%;
}

/* Apply this to the wrapper/container holding the button */
.form-submit-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 25px;
}

.glass-form {
    background: rgba(15, 15, 15, 0.7); /* Slightly darker for better contrast */
    backdrop-filter: blur(12px);
    border: 1px solid rgba(213, 0, 249, 0.3);
    border-radius: 15px;
    padding: 40px;
    text-align: left;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
}

.form-group { margin-bottom: 20px; }
/* --- Label Styling --- */
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #ff4081; /* Pinkish-Red accent color */
    text-transform: uppercase;
    letter-spacing: 1px;
}

.glass-form input, 
.glass-form textarea, 
.glass-form select {
    width: 100%;
    background: rgba(20, 20, 20, 0.8); /* Darker base to ensure readability */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    outline: none;
}

/* --- Focus States (Neon Effect) --- */
.glass-form input:focus, 
.glass-form textarea:focus, 
.glass-form select:focus {
    border-color: #d500f9;
    background: rgba(30, 30, 30, 0.9);
    box-shadow: 0 0 15px rgba(213, 0, 249, 0.2);
}

/* --- Specific Select/Dropdown Fix --- */
.glass-form select {
    cursor: pointer;
    appearance: none; /* Remove default browser arrow */
    -webkit-appearance: none;
    /* Custom White Arrow Icon */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem;
}

/* The "Magic Fix" for the dropdown list items */
.glass-form select option {
    background-color: #121212; /* Solid color blocks the animated cubes */
    color: #fff;
    padding: 12px;
}

/* --- Textarea specific --- */
.glass-form textarea {
    resize: vertical;
    min-height: 100px;
}

/* --- Two-Column Layout for Name & Age --- */
.form-row {
    display: flex;
    gap: 20px;
    width: 100%;
}

.form-row .form-group {
    flex: 1; /* Makes both inputs equal width */
}

/* On mobile, stack them vertically */
@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Strikethrough for Closed Ranks */
.rank-closed {
    color: #555 !important;
    text-decoration: line-through;
    background: #000 !important;
}

/* Notification Dot */
.nav-notification-dot {
    background: #ff4081;
    color: white;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 50%;
    margin-left: 5px;
    box-shadow: 0 0 10px rgba(255, 64, 129, 0.8);
    animation: pulse 2s infinite;
}

.login-warning {
    background: rgba(255, 165, 0, 0.1);
    border: 1px solid orange;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin-top: 20px;
}

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

/* Availability Grid Styling */
.availability-grid {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    gap: 5px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(213, 0, 249, 0.3);
    margin-top: 10px;
}

.grid-header, .time-label {
    font-size: 0.7rem;
    color: #aaa;
    text-transform: uppercase;
    display: flex;
    align-items: center;
}

.availability-grid div:not(.slot):not(.time-label) {
    text-align: center;
    font-size: 0.75rem;
    color: #ff4081;
    font-weight: bold;
}

.slot {
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    cursor: pointer;
    transition: 0.3s all ease;
}

.slot:hover {
    background: rgba(213, 0, 249, 0.3);
}

.slot.selected {
    background: #d500f9;
    box-shadow: 0 0 10px #d500f9;
    border: 1px solid #fff;
}

/* Make it responsive */
@media (max-width: 600px) {
    .availability-grid {
        grid-template-columns: 60px repeat(7, 1fr);
        font-size: 0.6rem;
    }
    .slot { height: 20px; }
}

/* Success and Status Card Styling */
.submission-success, .app-status-card {
    text-align: center;
    padding: 60px 40px;
}

.success-icon {
    font-size: 4rem;
    color: #4eff4e;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(78, 255, 78, 0.5);
}

.status-indicator {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 50px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    margin: 20px 0;
}

.status-indicator.pending {
    background: rgba(255, 165, 0, 0.1);
    border: 1px solid orange;
    color: orange;
    animation: pulse 2s infinite;
}

.status-note {
    font-size: 0.85rem;
    color: #aaa;
    margin-top: 15px;
}

.rejection-notice {
    background: rgba(255, 77, 77, 0.1);
    color: #ff4d4d;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ff4d4d;
    margin-bottom: 20px;
    text-align: center;
}

/* My Applications Page Styles */
.app-history-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.app-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    transition: 0.3s ease;
}

.app-history-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(213, 0, 249, 0.3);
}

.app-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.app-rank-tag {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.65rem;
    color: #ff4081;
}

.app-date {
    font-size: 0.8rem;
    color: #666;
}

/* Status Badge Styles */
.status-badge {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.status-badge.pending {
    background: rgba(255, 165, 0, 0.1);
    color: orange;
    border: 1px solid orange;
}

.status-badge.accepted {
    background: rgba(78, 255, 78, 0.1);
    color: #4eff4e;
    border: 1px solid #4eff4e;
}

.status-badge.rejected {
    background: rgba(255, 64, 129, 0.1);
    color: #ff4081;
    border: 1px solid #ff4081;
}

/* The Reviewer Pill */
.reviewer-pill {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    gap: 6px;
    transition: all 0.3s ease;
}

.reviewer-pill i {
    font-size: 0.7rem;
    color: var(--neon-purple, #d500f9); /* Using your theme color */
    opacity: 0.8;
}

.reviewer-pill .rev-label {
    font-family: 'Poppins', sans-serif;
    font-size: 0.6rem;
    font-weight: 700;
    color: #888;
    letter-spacing: 0.5px;
}

.reviewer-pill .rev-name {
    font-family: 'Poppins', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
}

/* Reviewer Link Wrapper */
.reviewer-link {
    text-decoration: none;
    display: inline-block; /* Keeps the link the same size as the pill */
    transition: transform 0.2s ease;
}

.reviewer-link:hover {
    transform: translateY(-2px); /* Subtle lift effect */
}

/* Update the pill hover inside the link */
.reviewer-link:hover .reviewer-pill {
    background: rgba(213, 0, 249, 0.1);
    border-color: var(--neon-purple, #d500f9);
    box-shadow: 0 4px 12px rgba(213, 0, 249, 0.2);
}

.reviewer-link:hover .rev-name {
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Hover effect for a little extra polish */
.reviewer-pill:hover {
    background: rgba(213, 0, 249, 0.05);
    border-color: rgba(213, 0, 249, 0.2);
}

/* ==========================================================================
   PROFESSIONAL STAFF DASHBOARD OVERHAUL
   ========================================================================== */

:root {
    --neon-purple: #d500f9;
    --neon-pink: #ff4081;
    --success-green: #00e676;
    --error-red: #ff1744;
    --glass-bg: rgba(15, 15, 20, 0.85);
    --border-lite: rgba(255, 255, 255, 0.08);
}

.dashboard-hero {
    text-align: center;
    padding: 40px 20px;
}

/* Stat Pills */
.stat-pill-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}
.stat-pill {
    background: var(--glass-bg);
    border: 1px solid var(--border-lite);
    padding: 8px 16px;
    border-radius: 50px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.5rem;
    color: #888;
}
.stat-pill span.count { color: #fff; margin-left: 5px; }
.stat-pill.pending { border-color: orange; }
.stat-pill.accepted { border-color: var(--success-green); }
.stat-pill.rejected { border-color: var(--error-red); }

/* Management Bar */
.management-bar {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid var(--border-lite);
}
.section-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    color: var(--neon-pink);
    margin-bottom: 20px;
    letter-spacing: 1px;
}
.toggle-flex {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Rank Toggles */
.rank-toggle-btn {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-lite);
    color: #aaa;
    padding: 10px 18px;
    border-radius: 4px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.55rem;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: 0.3s;
}
.rank-toggle-btn .dot { width: 8px; height: 8px; border-radius: 50%; background: #444; }
.rank-toggle-btn.is-open { border-color: var(--success-green); color: #fff; }
.rank-toggle-btn.is-open .dot { background: var(--success-green); box-shadow: 0 0 8px var(--success-green); }
.rank-toggle-btn:hover { background: rgba(255,255,255,0.08); }

/* Tab Navigation */
.tab-navigation {
    display: flex;
    margin-bottom: -1px; /* Overlap border */
    gap: 5px;
}
.tab-link {
    padding: 15px 30px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-lite);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    color: #666;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    text-decoration: none;
    transition: 0.3s;
}
.tab-link.active {
    background: var(--glass-bg);
    color: var(--neon-purple);
    border-top: 2px solid var(--neon-purple);
}

/* Modern App Cards */
.app-card-modern {
    background: var(--glass-bg);
    border: 1px solid var(--border-lite);
    margin-bottom: 12px;
    border-radius: 0 8px 8px 8px;
    transition: 0.3s;
}
.app-card-header {
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}
.app-card-header:hover { background: rgba(255,255,255,0.02); }

.avatar-pixel {
    image-rendering: pixelated;
    border: 2px solid var(--border-lite);
    border-radius: 4px;
}
.user-meta { display: flex; gap: 15px; align-items: center; }
.name-box .name { display: block; font-family: 'Press Start 2P', cursive; font-size: 0.75rem; color: #fff; }
.name-box .date { font-size: 0.65rem; color: #555; }

.badge-group { display: flex; align-items: center; gap: 20px; }
.rank-badge {
    padding: 5px 12px;
    border-radius: 3px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.5rem;
    background: rgba(255,255,255,0.05);
}
.rank-badge.admin { color: #ff1744; border: 1px solid #ff1744; }
.rank-badge.moderator { color: #00e5ff; border: 1px solid #00e5ff; }
.rank-badge.helper { color: #ffea00; border: 1px solid #ffea00; }

.expand-icon { color: #444; transition: 0.4s; }

/* Expanded Content */
.app-card-content {
    display: none;
    padding: 30px;
    border-top: 1px solid var(--border-lite);
}
.app-card-content.show { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.content-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

/* Sidebar Styling */
.content-sidebar {
    border-right: 1px solid var(--border-lite);
    padding-right: 30px;
}
.meta-item { margin-bottom: 20px; }
.meta-item label { font-family: 'Press Start 2P', cursive; font-size: 0.45rem; color: var(--neon-pink); display: block; margin-bottom: 8px; }
.meta-item .val { color: #eee; font-size: 0.9rem; font-weight: 500; }
.discord-val { color: #7289da !important; }

/* Compact Availability */
.compact-grid {
    background: rgba(0,0,0,0.3);
    padding: 10px;
    border-radius: 6px;
    margin-top: 10px;
}
.compact-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.row-label { font-size: 0.5rem; color: #555; width: 12px; text-transform: uppercase; font-weight: bold;}
.mini-dot { width: 8px; height: 8px; background: rgba(255,255,255,0.05); border-radius: 2px; }
.mini-dot.active { background: var(--neon-purple); box-shadow: 0 0 5px var(--neon-purple); }

/* Main Content Essays */
.essay-section { margin-bottom: 25px; }
.essay-section label { display: block; color: #888; font-size: 0.75rem; font-weight: 800; margin-bottom: 10px; letter-spacing: 1px; }
.essay-section i { margin-right: 8px; color: var(--neon-purple); }
.essay-box {
    background: rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 6px;
    color: #ccc;
    font-size: 0.85rem;
    line-height: 1.6;
    border-left: 3px solid var(--border-lite);
}

/* Action Buttons */
.action-footer { margin-top: 30px; display: flex; justify-content: flex-end; }
.decision-form { display: flex; gap: 15px; }
.btn-action {
    padding: 12px 25px;
    border-radius: 4px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    cursor: pointer;
    transition: 0.3s;
    border: 1px solid transparent;
}
.btn-accept { background: rgba(0, 230, 118, 0.1); color: var(--success-green); border-color: var(--success-green); }
.btn-accept:hover { background: var(--success-green); color: #000; box-shadow: 0 0 20px rgba(0, 230, 118, 0.4); }

.btn-reject { background: rgba(255, 23, 68, 0.1); color: var(--error-red); border-color: var(--error-red); }
.btn-reject:hover { background: var(--error-red); color: #fff; box-shadow: 0 0 20px rgba(255, 23, 68, 0.4); }

/* Pagination */
.pagination-modern { display: flex; justify-content: center; gap: 8px; margin-top: 30px; }
.pag-link {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--border-lite);
    color: #666;
    text-decoration: none;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    border-radius: 4px;
}
.pag-link.active { border-color: var(--neon-purple); color: #fff; background: rgba(213, 0, 249, 0.1); }

/* Clickable Profile Links */
.profile-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: 0.2s ease-in-out;
    cursor: pointer;
}

.profile-link .name {
    transition: color 0.2s, text-shadow 0.2s;
}

.profile-link:hover .name {
    color: var(--neon-purple, #d500f9);
    text-shadow: 0 0 10px rgba(213, 0, 249, 0.6);
}
.profile-link:hover .avatar-pixel {
    border-color: var(--neon-purple);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(213, 0, 249, 0.4);
}

/* Tab & Pill Active States */

.stat-pill {
    text-decoration: none;
    transition: 0.3s;
}
.active-pill {
    background: rgba(213, 0, 249, 0.15) !important;
    border-color: #d500f9 !important;
    color: #fff !important;
    box-shadow: 0 0 15px rgba(213, 0, 249, 0.3);
}

/* Status Stamps for Accepted/Rejected */
.status-stamp {
    margin-top: 25px;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.status-stamp.accepted { 
    background: rgba(0, 230, 118, 0.1); 
    color: #00e676; 
    border: 1px solid #00e676; 
}
.status-stamp.rejected { 
    background: rgba(255, 23, 68, 0.1); 
    color: #ff1744; 
    border: 1px solid #ff1744; 
}

/* Container to stack badge and pill */
.status-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

/* Empty state styling */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #444;
}
.empty-state i {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.2;
}
.empty-state p {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
}

/* Reviewer styling for Staff Dashboard */
.processed-info {
    font-family: 'Press Start 2P', cursive;
    letter-spacing: 0px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 5px;
}

/* --- MOBILE RESPONSIVENESS --- */

/* 1. Hide the hamburger menu by default (Desktop/Tablet) */
.mobile-menu-toggle {
    display: none;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 10px;
    transition: color 0.3s ease;
}

.mobile-menu-toggle:hover {
    color: #d500f9; /* Neon purple glow on hover */
}

@media (max-width: 768px) {
    /* 1. Reset Page Wrapper for Mobile */
    #page-wrapper {
        padding: 80px 15px 40px 15px !important; /* Extra top padding for fixed nav */
        width: 100% !important;
        overflow-x: hidden;
    }

    /* 2. Fix Navbar for Mobile */
    .nav-container {
        padding: 0 15px;
    }

    .mobile-menu-toggle {
        display: block !important; /* Show the bars icon */
        font-size: 1.5rem;
        cursor: pointer;
        order: 2;
    }

    /* Make the discord button a simple icon on mobile */
    .discord-btn {
        padding: 10px;
        border-radius: 50%;
    }

    /* Hide specific parts on very small screens to save space */
    .btn-label, .discord-count, .ip-text {
        display: none;
    }

    /* Position the mobile menu links as a dropdown */
    .nav-links {
        display: none; /* Hidden by default */
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: #0f0f0f;
        flex-direction: column;
        padding: 20px;
        z-index: 1000;
        border-bottom: 2px solid #d500f9;
    }

    .nav-links.mobile-active {
        display: flex; /* Shown when toggle clicked */
    }

    .nav-center {
        order: 3; /* Move links below logo and user menu if needed */
    }

    /* 3. Stack the Staff Layout */
    .staff-layout {
        flex-direction: column !important;
        gap: 30px;
    }

    .sidebar-container {
        width: 100% !important;
        order: 2; /* Moves sidebar (apply card) below the staff list on mobile */
    }

    /* 4. Center Headers */
    .page-header {
        text-align: center;
        margin-bottom: 30px;
    }

    .page-header h2 {
        font-size: 2rem;
    }
}

/* ==========================================================================
   PROFILE AWARDS
   ========================================================================== */
/* Sidebar Award Ribbons */
.sidebar-awards {
    margin: 15px 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center; /* Centers them in the sidebar */
}

.mini-award {
    position: relative;
    background: rgba(213, 0, 249, 0.1);
    border: 1px solid rgba(213, 0, 249, 0.3);
    border-left: 4px solid #d500f9;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 90%; /* Slightly smaller than sidebar width */
    border-radius: 4px;
    transition: transform 0.2s;
}

.mini-award::before {
    content: attr(data-tooltip); /* Pulls text from the HTML data-tooltip attribute */
    position: absolute;
    bottom: 125%; /* Position above the award */
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #1a1a1a;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #d500f9;
    font-size: 10px;
    white-space: nowrap;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 0 15px rgba(213, 0, 249, 0.4);
    pointer-events: none;
}

/* The Little Triangle/Arrow under the tooltip */
.mini-award::after {
    content: '';
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #d500f9 transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

/* Show everything on hover */
.mini-award:hover::before,
.mini-award:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.mini-award:hover {
    transform: scale(1.05);
    background: rgba(213, 0, 249, 0.2);
}

.award-name {
    font-family: 'Press Start 2P', cursive;
    font-size: 8px; /* Very small for the pixel font */
    color: #fff;
    text-transform: uppercase;
    text-shadow: 0 0 5px #d500f9;
}

.award-icon {
    font-size: 14px;
}

/* ==========================================================================
   PROFILE STREAK MINI CONTAINER
   ========================================================================== */
/* Streak Grid Layout */
.streak-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 20px 0;
    width: 100%;
}

/* Individual Streak Item - Matching .glass-card style */
.streak-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
}

.streak-item:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: #d500f9;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(213, 0, 249, 0.15);
}

/* Specific Best Streak Styling */
.streak-item.best:hover {
    border-color: #ffab40;
    box-shadow: 0 5px 15px rgba(255, 171, 64, 0.15);
}

/* Icon Wrap & Animations */
.streak-icon-wrap {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.streak-fire {
    color: #d500f9;
    filter: drop-shadow(0 0 5px rgba(213, 0, 249, 0.5));
}

.streak-crown {
    color: #ffab40;
    filter: drop-shadow(0 0 5px rgba(255, 171, 64, 0.5));
}

/* Data Text */
.streak-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    font-family: 'Inter', sans-serif;
}

.streak-label {
    display: block;
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
    font-weight: 600;
}

/* ==========================================================================
   SETTINGS PAGE REWORK
   ========================================================================== */

.pref-container {
    width: 95%;
    max-width: 1000px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease-out;
}

/* Header Section */
.settings-top-section {
    text-align: center;
    margin-bottom: 30px;
}

.pref-title {
    font-family: 'Press Start 2P', cursive;
    color: #d500f9;
    font-size: 1.4rem;
    text-shadow: 0 0 10px rgba(213, 0, 249, 0.3);
    margin-bottom: 10px;
}

.pref-counter-pill {
    display: inline-block;
    background: rgba(213, 0, 249, 0.1);
    border: 1px solid rgba(213, 0, 249, 0.4);
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    color: #fff;
    margin-top: 10px;
}

#countDisplay {
    font-weight: bold;
    color: #d500f9;
}

/* Scrollable Stats Selection Box */
.stats-selection-wrapper {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.section-sub-label {
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 15px;
    display: block;
}

/* The Compact Grid */
.pref-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    max-height: 380px; /* Adjust this to make the box taller or shorter */
    overflow-y: auto;
    padding-right: 10px;
}

/* Custom Scrollbar for the Grid */
.pref-grid-compact::-webkit-scrollbar {
    width: 5px;
}
.pref-grid-compact::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}
.pref-grid-compact::-webkit-scrollbar-thumb {
    background: #d500f9;
    border-radius: 10px;
}

/* Mini Cards */
.pref-card-mini {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.pref-card-mini:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(213, 0, 249, 0.5);
}

.pref-card-mini.is-selected {
    background: rgba(213, 0, 249, 0.1);
    border-color: #d500f9;
    box-shadow: 0 0 15px rgba(213, 0, 249, 0.1);
}

/* Hidden Native Checkbox */
.pref-card-mini input {
    display: none;
}

/* Small Check Indicator */
.mini-indicator {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin-right: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.pref-card-mini.is-selected .mini-indicator {
    background: #d500f9;
    border-color: #d500f9;
}

.pref-card-mini.is-selected .mini-indicator::after {
    content: '✔';
    color: white;
    font-size: 10px;
}

/* Container for the text - uses flex to push value to the right */
.mini-info {
    display: flex;
    align-items: center;
    justify-content: space-between; /* This pushes name and value apart */
    width: 100%;
    overflow: hidden;
}

.mini-text-stack {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-right: 10px;
}

.mini-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.5px;
}

.mini-tag {
    font-size: 0.55rem;
    color: #888;
    text-transform: uppercase;
    margin-bottom: -2px;
}

/* The Value "Badge" */
.mini-val {
    background: rgba(213, 0, 249, 0.1);
    color: #d500f9;
    font-family: 'Poppins', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(213, 0, 249, 0.2);
    white-space: nowrap;
    transition: 0.2s;
}

/* Change value color when card is selected for better contrast */
.pref-card-mini.is-selected .mini-val {
    background: #d500f9;
    color: #fff;
    border-color: #fff;
}

/* Save Button Styling */
.settings-footer {
    text-align: center;
    margin-top: 30px;
    padding-bottom: 50px;
}

.pref-save-btn {
    background: linear-gradient(135deg, #d500f9 0%, #ff4081 100%);
    color: white;
    border: none;
    padding: 15px 45px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(213, 0, 249, 0.3);
}

.pref-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(213, 0, 249, 0.5);
}

.pref-save-btn:disabled {
    background: #333;
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* Future Content Zone */
.future-settings-zone {
    margin-top: 40px;
    padding: 30px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

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

/* ==========================================================================
   ALL-STATS PAGE
   ========================================================================== */
.allstats-container { max-width: 900px; margin: 40px auto; padding: 0 20px; }

/* Hero Section */
.stats-hero { text-align: center; margin-bottom: 50px; }
.category-tag { background: #d500f9; color: white; padding: 4px 12px; border-radius: 4px; font-size: 0.7rem; font-weight: bold; letter-spacing: 1px; }
.stat-title { font-family: 'Press Start 2P', cursive; font-size: 1.8rem; margin: 15px 0; color: #fff; }
.stat-meta { color: #555; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 2px; }

.gold { border-color: #ffca28; background: linear-gradient(to top, rgba(255, 202, 40, 0.05), transparent); }
.silver { border-color: #e0e0e0; }
.bronze { border-color: #cd7f32; }

/* Ranking Table */
.ranking-card { background: rgba(255,255,255,0.02); border-radius: 15px; border: 1px solid rgba(255,255,255,0.05); overflow: hidden; }
.leader-table { width: 100%; border-collapse: collapse; }
.leader-table th { background: rgba(0,0,0,0.2); padding: 15px; text-align: left; font-size: 0.7rem; color: #444; }
.leader-table td { padding: 15px; border-bottom: 1px solid rgba(255,255,255,0.02); }
.is-me { background: rgba(213, 0, 249, 0.05); }
.player-link { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; font-weight: 600; }
.player-link img { border-radius: 4px; }
.r-pos { font-family: 'Press Start 2P', cursive; font-size: 0.8rem; color: #333; }
.r-val { text-align: right; font-family: 'Press Start 2P', cursive; font-size: 0.8rem; color: #fff; }

/* Metallic Rank Colors */
.rank-1 {
    color: #ffd700 !important; /* Gold */
    font-weight: 800;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.rank-2 {
    color: #c0c0c0 !important; /* Silver */
    font-weight: 800;
    text-shadow: 0 0 8px rgba(192, 192, 192, 0.4);
}

.rank-3 {
    color: #cd7f32 !important; /* Bronze */
    font-weight: 800;
    text-shadow: 0 0 8px rgba(205, 127, 50, 0.4);
}

/* Make sure icons align perfectly with the text */
.col-rank i {
    vertical-align: middle;
    position: relative;
    top: -1px; /* Fine-tune height */
}

.stats-footer { text-align: center; margin-top: 30px; }
.return-btn { color: #444; text-decoration: none; font-size: 0.8rem; font-weight: bold; transition: 0.3s; }
.return-btn:hover { color: #d500f9; }

/* ==========================================================================
   ALL-STATS LEADERBOARD MODULE
   ========================================================================== */

/* 1. PREMIUM FLOATING NAV PILL */
.allstats-sticky-nav {
    position: fixed;
    top: 100px; /* Offsets the #page-wrapper's 20px padding so it sits perfectly flush */
    margin-bottom: 20px;
    z-index: 9999 !important; 
    background: #0f0f0f !important; 
    padding: 20px 0;
    border-bottom: 2px solid rgba(213, 0, 249, 0.3);
}

.allstats-nav-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03); /* Very faint background */
    padding: 10px;
    border-radius: 50px; /* Pill shape */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin: 20px auto;
    width: max-content; /* Shrinks to fit items */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.allstats-nav-inner a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.allstats-nav-inner a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* The Active State - Make it pop! */
.allstats-nav-inner a.active {
    background: #d500f9; /* Your signature purple */
    color: #fff;
    box-shadow: 0 0 15px rgba(213, 0, 249, 0.4);
}

/* Header Text Styling */
.allstats-title-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.allstats-back-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: 0.3s;
}

.allstats-back-btn:hover {
    background: #d500f9;
    border-color: #d500f9;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(213, 0, 249, 0.4);
}

.allstats-title-text h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1rem; /* Slightly smaller to fit the pill */
    color: #fff;
    text-shadow: 0 0 10px rgba(213, 0, 249, 0.6);
    margin: 0;
    line-height: 1.2;
}

.allstats-title-text p {
    font-size: 0.6rem;
    font-weight: 600;
    color: #888;
    letter-spacing: 2px;
    margin-top: 5px;
}

.allstats-title-text span {
    color: #d500f9;
}

/* Style for the player name link in the header */
.player-title-link {
    text-decoration: none;
    color: inherit; /* Keeps the original white/off-white color */
    transition: all 0.2s ease-in-out;
    display: inline-block;
}

.player-title-link:hover {
    color: #d500f9; /* Changes to your theme's purple color */
    transform: translateY(-1px); /* Subtle lift effect */
    text-shadow: 0 0 10px rgba(213, 0, 249, 0.5); /* Glowing effect */
}

.player-title-link h1 {
    margin: 0; /* Ensures the h1 doesn't break the layout */
    cursor: pointer;
}

/* Controls & Dropdowns */
.allstats-controls {
    display: flex;
    gap: 15px;
    align-items: flex-end; /* Keeps inputs aligned nicely */
}

.allstats-select-box {
    display: flex;
    flex-direction: column;
}

.allstats-select-box label {
    font-size: 0.55rem;
    color: #888;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

/* New Search Input Styling */
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    color: #666;
    font-size: 0.8rem;
}

.allstats-search {
    background: #111;
    color: #fff;
    border: 1px solid #333;
    padding: 10px 15px 10px 35px; /* Extra left padding for the icon */
    border-radius: 8px;
    font-size: 0.8rem;
    font-family: 'Poppins', sans-serif;
    outline: none;
    min-width: 160px;
    transition: 0.3s;
}

.allstats-search:focus {
    border-color: #d500f9;
    box-shadow: 0 0 10px rgba(213, 0, 249, 0.2);
}

.allstats-dropdown {
    background: #111 !important;
    color: #fff !important;
    border: 1px solid #333;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    outline: none;
    cursor: pointer;
    min-width: 170px;
    transition: 0.3s;
}

.allstats-dropdown option {
    background-color: #0a0a0a !important;
    color: #fff !important;
}

.allstats-dropdown:hover {
    border-color: #d500f9;
}

/* 2. PAGE CONTENT LAYOUT */
/* Ensure the content area has a lower stack priority */
.allstats-content-area {
    position: relative;
    z-index: 1; /* Keeps the table below the sticky nav's z-index */
    /* Removed: margin-top and overflow-y */
}

/* GLASSMORPHISM LEADERBOARD TABLE */
.allstats-table-wrapper {
    background: rgba(15, 15, 15, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden;
}

.allstats-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px; /* This creates the 'gap' between rows */
}

.allstats-table th, 
.allstats-table td {
    padding: 15px;
}

.allstats-table th {
    position: relative;
    z-index: 2;
    background: rgba(213, 0, 249, 0.05);
    padding: 18px 20px;
    text-align: left;
    font-size: 0.65rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-bottom: 1px solid rgba(213, 0, 249, 0.1);
    cursor: pointer;
    transition: 0.2s;
}

.allstats-table th:hover { color: #d500f9; }

.allstats-table td {
    padding: 15px;
}

.allstats-table tr {
    background: #0f0f0f; /* Darker row color */
}

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

/* Custom Row styling */
.col-rank {
    font-weight: 800;
    color: #555;
    width: 80px;
}

.col-player a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #eee;
    font-weight: 500;
    text-decoration: none;
    transition: 0.2s;
    width: auto;
}

.col-player a:hover {
    color: #d500f9;
    transform: translateX(5px);
}

.col-player img {
    border-radius: 4px;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.col-value {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.65rem;
    color: #d500f9;
    text-align: right;
    text-shadow: 0 0 8px rgba(213, 0, 249, 0.3);
}

.allstats-empty {
    text-align: center;
    padding: 40px !important;
    color: #555;
    font-style: italic;
}

.col-rank, .col-value {
    white-space: nowrap;
    width: 100px;
}

/* Highlight Logged-in User */
tr.is-me {
    background: rgba(213, 0, 249, 0.05) !important;
    border-left: 3px solid #d500f9;
}

tr.is-me .col-player a { color: #fff; font-weight: bold; }

/* Responsive adjustments */
@media (max-width: 900px) {
    .allstats-nav-inner { flex-direction: column; text-align: center; }
    .allstats-title-group { flex-direction: column; }
    .allstats-controls { width: 100%; flex-direction: column; }
}

/* ==========================================================================
   STATS PAGE WRAPPER???
   ========================================================================== */
/* Add this class to your <body> tag on player_stats.php and allstats.php */
body.fixed-layout {
    height: 100vh !important;
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
    margin: 0;
}
/* The Master Wrapper */
.statspage-wrapper {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 80px); /* Adjust 80px to match your navbar height */
    margin-top: 80px; /* This prevents it from sitting 'behind' the nav */
    margin-bottom: 55px;
    overflow: hidden;
}

.stats-fixed-header, 
.stats-content-scrollbox {
    width: 100%;
    max-width: 1200px; /* Limits the width so it's not stretched across the whole screen */
    margin: 0 auto; /* Centers the content */
    box-sizing: border-box;
}

.stats-fixed-header {
    flex-shrink: 0;
    padding: 40px 20px 20px 20px; /* More padding at top for breathing room */
    z-index: 5;
}

.stats-content-scrollbox {
    flex: 1;
    overflow-y: auto;
    padding: 10px 20px 40px 20px;
}

/* Optional: Custom Scrollbar to match your theme */
.stats-content-scrollbox::-webkit-scrollbar { width: 8px; }
.stats-content-scrollbox::-webkit-scrollbar-track { background: transparent; }
.stats-content-scrollbox::-webkit-scrollbar-thumb { background: rgba(213, 0, 249, 0.5); border-radius: 4px; }

/* =======================================================================
   PODIUM
   ====================================================================== */
/* --- Compact & Awesome Podium --- */
.allstats-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 15px;
    padding: 30px 0;
}

.podium-card {
    position: relative;
    /* --- FIXED SIZE LOGIC --- */
    width: 200px;           /* Set a consistent width */
    min-width: 200px;       /* Prevent shrinking */
    flex-shrink: 0;         /* Prevent flexbox from squishing it */
    /* ------------------------ */
    background: rgba(15, 15, 15, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease;
    /* Removed overflow: hidden so the crown/glow can pop out if needed, 
       but if you want the shimmer, keep it. */
}

/* Rank 1 (Gold) - Scaled down from previous version */
/* Gold Rank Specifics */
.podium-card.gold {
    z-index: 3;
    border-top: 3px solid #ffca28;
    height: 280px; /* Fixed height for Rank 1 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Combining your float and a scale for the #1 spot */
    animation: podiumFloat 4s ease-in-out infinite, goldPulse 3s ease-in-out infinite;
    transform: scale(1.1); 
}

.podium-card.gold {
    animation: goldFloat 4s ease-in-out infinite, goldPulse 3s ease-in-out infinite;
}

.podium-card.gold i.fa-crown {
    font-size: 1.8rem; /* Smaller crown */
    color: #ffca28;
    margin-bottom: 8px;
    display: block;
    animation: crownPulse 2s ease-in-out infinite;
}

.podium-card.silver, .podium-card.bronze {
    height: 240px; /* Fixed height for Rank 2 & 3 */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.podium-card.silver { border-top: 2px solid #e0e0e0; animation: podiumFloat 4s ease-in-out infinite 0.5s; }
.podium-card.bronze { border-top: 2px solid #ffa726; animation: podiumFloat 4s ease-in-out infinite 1s; }

/* Clickable elements styling */
.podium-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.podium-link:hover .podium-avatar {
    transform: scale(1.1);
}

.podium-player-name {
    display: block;
    width: 100%;            /* Fill the card width */
    padding: 0 10px;        /* Side padding for safety */
    box-sizing: border-box;
    font-weight: 700;
    font-size: 1.1rem;
    
    /* The "Anti-Stretch" Magic */
    white-space: nowrap;    /* Keeps name on one line */
    overflow: hidden;       /* Hides anything past the card edge */
    text-overflow: ellipsis; /* Adds "..." if name is > 16 chars */
}

.podium-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px auto;
    border-radius: 8px;
    display: block;
}

.podium-card:hover .podium-avatar {
    transform: translateY(-3px);
}

/* 1. Subtle Floating (Slow and Smooth) */
@keyframes podiumFloat {
    0%, 100% { transform: translateY(0px) scale(1); }
    /* Match the scale(1.1) for gold specifically in its own class or keep it simple here */
    50% { transform: translateY(-10px); }
}

@keyframes goldFloat {
    0%, 100% { transform: translateY(0px) scale(1.1); }
    50% { transform: translateY(-10px) scale(1.1); }
}

/* 2. Gold Pulsing Glow (Rank 1 Only) */
@keyframes goldPulse {
    0% { box-shadow: 0 0 10px rgba(255, 202, 40, 0.1), 0 0 20px rgba(255, 202, 40, 0.05); }
    50% { box-shadow: 0 0 25px rgba(255, 202, 40, 0.4), 0 0 40px rgba(255, 202, 40, 0.2); }
    100% { box-shadow: 0 0 10px rgba(255, 202, 40, 0.1), 0 0 20px rgba(255, 202, 40, 0.05); }
}