

#particles-js {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    z-index: 1; /* Pushed above background, below content */
    pointer-events: none;
    background: transparent;
}

#particles-js canvas {
    display: block;
    filter: blur(0.5px) contrast(1.1);
}

.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.03) 25%,
        rgba(255, 255, 255, 0.06) 50%,
        rgba(255, 255, 255, 0.03) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 12px;
}

@keyframes shimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

.nebula-glow {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

.nebula-glow::before, .nebula-glow::after {
    display: none;
}

@keyframes nebulaMove {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(15%, 15%) scale(1.2); }
}

:root {
    /* Stealth Mode (Default) */
    --bg-dark: #000000;
    --bg-card: rgba(255, 255, 255, 0.02);
    --neon-cyan: #00f2ff;
    --neon-purple: #bc00ff;
    --neon-indigo: #6366f1;
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-bg: rgba(10, 10, 15, 0.7);
    --glow-cyan: 0 0 20px rgba(0, 242, 255, 0.15);
}

body.crystal-mode {
    /* Crystal Mode (More Vibrant) */
    --bg-dark: #000000;
    --glass-bg: rgba(20, 25, 45, 0.4);
    --glass-border: rgba(255, 255, 255, 0.12);
    --neon-cyan: #00e5ff;
    --neon-indigo: #818cf8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background: #000000 !important;
}

body {
    background: transparent !important;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
    min-height: 100vh;
    z-index: 10; /* Ensure content stays above particles */
}

body::after {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #000; /* Solid black base */
    z-index: -3;
    pointer-events: none;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.15) 50%);
    background-size: 100% 4px;
    z-index: 10000;
    pointer-events: none;
    opacity: 0.2;
}

@keyframes bgMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

h1, h2, h3, .logo {
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.main-logo {
    height: 45px;
    filter: drop-shadow(var(--glow-cyan));
    transition: transform 0.3s ease;
}

.main-logo:hover {
    transform: scale(1.05);
}

/* Layout Utilities */
.container {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 2rem;
    width: 100%;
    position: relative;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--neon-cyan);
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(0, 242, 255, 0.15);
}

.glass-premium {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.glass-premium:hover {
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.glass-premium::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
}

/* Animated Neon Border Card */
.neon-card {
    position: relative;
    background: var(--bg-dark);
    border-radius: 20px;
    overflow: hidden;
}

.neon-card::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-purple), var(--neon-cyan));
    background-size: 200% 200%;
    z-index: -1;
    animation: neonFlow 3s linear infinite;
    filter: blur(5px);
    opacity: 0.5;
}

@keyframes neonFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Neon Glows */
.neon-text-cyan { color: var(--neon-cyan); text-shadow: var(--glow-cyan); }
.neon-text-purple { color: var(--neon-purple); text-shadow: var(--glow-purple); }

.neon-border-cyan { border: 1px solid var(--neon-cyan); box-shadow: var(--glow-cyan); }
.neon-border-purple { border: 1px solid var(--neon-purple); box-shadow: var(--glow-purple); }

/* Premium Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--neon-cyan), var(--neon-purple));
    border-radius: 10px;
}

/* Global Navigation */
.topbar .right-side {
    display: flex;
    align-items: center;
    gap: 20px;
}

.wallet {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wallet-item img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

@media (max-width: 1024px) {
    .topbar .right-side {
        gap: 10px;
    }
    .wallet {
        gap: 8px;
    }
    .wallet-item span {
        font-size: 0.8rem;
    }
}
/* Global Modal System */
.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glow-cyan);
    border-radius: 24px;
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    position: relative;
    text-align: center;
    animation: modalSlide 0.4s ease;
}

@keyframes modalSlide {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    color: var(--neon-cyan);
    text-shadow: var(--glow-cyan);
}

.modal-close-btn {
    margin-top: 20px;
    padding: 10px 30px;
    cursor: pointer;
    background: var(--neon-cyan);
    border: none;
    border-radius: 10px;
    color: black;
    font-weight: bold;
    transition: 0.3s;
}

.modal-close-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--glow-cyan);
}
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.82);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    overflow: visible !important;
}

@media (max-width: 768px) {
    .topbar {
        padding: 0 1rem;
        height: 60px;
    }
}

.right-side {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.wallet {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Professional SVG Logo Styling */
.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 5px;
}

.logo-link:hover {
    transform: scale(1.05);
}

.main-logo {
    height: 60px;
    width: auto;
    display: block;
    filter: drop-shadow(0 0 10px rgba(0, 242, 255, 0.4));
}

@media (max-width: 768px) {
    .main-logo {
        height: 45px;
    }
}

.logo-text-v5 .kafe {
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(to right, var(--neon-cyan), #fff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 8px var(--neon-cyan));
    letter-spacing: 2px;
}

.logo-text-v5 .games {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 10px var(--neon-purple), 0 0 20px var(--neon-purple);
    letter-spacing: 5px;
    text-transform: uppercase;
    margin-top: 4px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dim);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--neon-cyan);
    transition: width 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--neon-cyan);
    text-shadow: var(--glow-cyan);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
    box-shadow: 0 0 10px var(--neon-cyan);
}

.topbar .right-side .menu-toggle {
    display: none;
    font-size: 32px;
    cursor: pointer;
    color: var(--neon-cyan);
    text-shadow: var(--glow-cyan);
    transition: all 0.3s ease;
    user-select: none;
    z-index: 1002;
    padding: 5px;
}

.topbar .right-side .menu-toggle:hover {
    transform: scale(1.1);
    color: #fff;
}

/* Floating Animation for accents */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.float-ui {
    animation: float 4s ease-in-out infinite;
}

/* Buttons */
.btn-premium {
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    font-size: 0.8rem;
}

.btn-cyan {
    background: rgba(0, 242, 255, 0.1);
    color: var(--neon-cyan);
    border: 1px solid var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.15);
}

.btn-cyan:hover {
    background: var(--neon-cyan);
    color: #000;
    box-shadow: 0 10px 20px rgba(0, 242, 255, 0.3);
}

.btn-purple {
    background: rgba(188, 0, 255, 0.1);
    color: var(--neon-purple);
    border: 1px solid var(--neon-purple);
    box-shadow: 0 0 15px rgba(188, 0, 255, 0.15);
}

.btn-purple:hover {
    background: var(--neon-purple);
    color: #fff;
    box-shadow: 0 10px 20px rgba(188, 0, 255, 0.3);
}

/* Responsive Navigation */
@media (max-width: 768px) {
    .topbar .right-side .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px; /* Aligned with mobile topbar height */
        right: 0;
        width: 100%;
        min-width: 250px;
        background: #000000 !important; /* Pure black for maximum contrast */
        padding: 2rem;
        border-bottom: 2px solid var(--neon-cyan);
        border-top: 1px solid var(--glass-border);
        text-align: center;
        gap: 1.5rem;
        z-index: 9999 !important;
        opacity: 1 !important;
        visibility: visible !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    }
    .topbar .right-side .nav-links.active {
        display: flex !important;
    }
    .topbar .right-side .menu-toggle {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    .topbar {
        padding: 0 5%;
        position: relative; /* Ensure it stays above other content but respects flow if needed */
    }
    .logo { font-size: 1.2rem; }
}

/* Fix for horizontal scroll on mobile */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Modal Styling */
.game-modal {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
}

/* Responsive Mobile Overrides */
/* --- Site-Wide Mobile Responsiveness (Unified) --- */
@media (max-width: 768px) {
    /* 1. Global Typography Scaling */
    h1, .hero h1, .tournament-section h1 {
        font-size: 2.2rem !important;
        letter-spacing: 2px !important;
    }
    h2, .live-section h2 {
        font-size: 1.8rem !important;
    }
    h3 {
        font-size: 1.2rem !important;
    }

    /* 2. Standardized Layout Containers */
    .container {
        padding: 0 4% !important;
    }

    /* 3. Grid Systems (Force 2-column for entertainment, 1 or 2 for others) */
    .game-grid, .apps-grid, .games-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.8rem !important;
    }
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* 4. Global Navigation & Header */
    .topbar {
        height: 60px !important;
        padding: 0 4% !important;
    }
    .topbar .right-side {
        gap: 10px !important;
    }
    .wallet {
        gap: 8px !important;
    }
    .wallet-item {
        padding: 5px 12px !important;
    }
    .wallet-item span {
        font-size: 0.75rem !important;
    }
    
    /* Ensure Menu Toggle stays visible and clicks easily */
    .menu-toggle {
        font-size: 28px !important;
        display: block !important;
    }

    /* 5. Premium Component Adjustments */
    .game-card, .glass-premium, .live-section {
        border-radius: 20px !important;
    }
    .game-card .content {
        padding: 1rem !important;
        gap: 0.5rem !important;
    }
    .game-card img {
        height: 120px !important;
    }
    .game-card h2 {
        font-size: 1.1rem !important;
    }
    .game-card p {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
    }
    .live-section {
        padding: 1.5rem !important;
    }
    /* 6. Live Stream Responsiveness */
    #liveContainer {
        min-height: 250px !important;
        border-radius: 20px !important;
    }
    #liveContainer iframe {
        height: 250px !important;
    }

    /* 7. Hide non-essential desktop ads to prevent layout shift */
    .ad-desktop, .leaderboard-ad, .skyscraper-ad {
        display: none !important;
    }

    /* 8. ELIMINATE ALL CSS ANIMATIONS, TRANSITIONS & GPU EFFECTS ON MOBILE */
    * {
        animation: none !important;
        transition: none !important;
    }
    .sparkle {
        display: none !important;
    }
}

/* Extremely Small Screens Fix */
@media (max-width: 380px) {
    .main-logo {
        height: 38px !important;
    }
    .wallet-item {
        padding: 4px 8px !important;
    }
    .wallet-item span {
        display: none; /* Only show icon on tiny screens to save space */
    }
    .wallet-item:last-child span {
        display: inline; /* Keep history text if it fits */
    }
}

/* --- V3 Tabbed Navigation --- */
.tab-group {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    padding: 10px;
    background: rgba(255,255,255,0.03);
    border-radius: 40px;
    border: 1px solid var(--glass-border);
    justify-content: center;
}

.tab-btn {
    padding: 12px 30px;
    border-radius: 30px;
    border: none;
    background: transparent;
    color: var(--text-dim);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
}

.tab-btn.active {
    background: var(--neon-cyan);
    color: var(--bg-dark);
    box-shadow: var(--glow-cyan);
}

.tab-content {
    display: none;
    animation: contentFade 0.5s ease;
}

.tab-content.active {
    display: block;
}

@keyframes contentFade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Custom Tooltips --- */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(10, 10, 20, 0.95);
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    border: 1px solid var(--neon-cyan);
    box-shadow: var(--glow-cyan);
    z-index: 1000;
}

[data-tooltip]:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* --- Animations for Stat Cards --- */
.stat-card {
    transition: 0.4s;
}

.stat-card:hover {
    border-color: var(--neon-cyan);
    transform: scale(1.05);
}

.stat-val {
    transition: 0.3s;
}

.stat-card:hover .stat-val {
    transform: translateY(-5px);
}
/* --- Profile Redesign Components --- */
.profile-hero {
    width: 100%;
    min-height: 450px;
    padding: 60px 0;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(5,5,5,1)), url('profile-bg.jpg') center/cover;
    position: relative;
    border-radius: 0 0 50px 50px;
    margin-bottom: -60px;
    display: flex;
    align-items: center;
}


.profile-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(0, 242, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 242, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg) translateY(-100px);
    animation: gridMove 20s linear infinite;
    z-index: 1;
}

@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 0 100%; }
}

.profile-main {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.profile-pfp-wrapper {
    position: relative;
    display: inline-block;
}

.profile-pfp {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 4px solid var(--neon-cyan);
    box-shadow: 0 0 25px rgba(0, 242, 255, 0.3);
    object-fit: cover;
    background: var(--bg-dark);
}


.profile-header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    padding-top: 80px;
    position: relative;
    z-index: 10;
}


@media (min-width: 900px) {
    .profile-header-content {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 60px;
        padding-top: 120px;
        text-align: left;
    }
}


#playerNameDisplay {
    font-size: 2.2rem;
    color: #fff;
    text-shadow: var(--glow-cyan);
    letter-spacing: 2px;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 5px;
}

@media (min-width: 900px) {
    #playerNameDisplay {
        font-size: 3.5rem;
    }
}


.xp-container {
    margin-top: 35px;
    width: 100%;
    min-width: 300px;
    max-width: 400px;
}

.profile-container {
    padding: 40px 15px 60px;
}


.xp-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 600px) {
    .xp-header {
        flex-direction: column;
        align-items: center;
        gap: 6px;
        text-align: center;
    }
}


.xp-bar {
    height: 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.xp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
    box-shadow: 0 0 15px var(--neon-cyan);
    width: 0%;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-sections {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin-top: 40px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.stat-card {
    padding: 25px;
    text-align: center;
    border-radius: 20px;
}

.stat-val {
    font-size: 2rem;
    font-family: 'Orbitron', sans-serif;
    display: block;
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-dim);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.badge-item {
    aspect-ratio: 1;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-border);
    transition: 0.3s;
    cursor: help;
    filter: grayscale(1);
    opacity: 0.5;
}

.badge-item.unlocked {
    filter: none;
    opacity: 1;
    border-color: var(--neon-yellow);
    box-shadow: 0 0 10px rgba(255, 217, 0, 0.4);
}

.badge-item:hover {
    transform: scale(1.1);
    background: rgba(255,255,255,0.1);
}

.badge-item img {
    width: 60%;
    height: auto;
}

@media (max-width: 900px) {
    .dashboard-sections {
        grid-template-columns: 1fr;
    }
    .profile-hero {
        min-height: auto;
        padding-bottom: 20px;
        margin-bottom: 0;
    }
    .profile-pfp {
        width: 140px;
        height: 140px;
    }
    .profile-container {
        padding-top: 30px;
    }
}


@media (max-width: 600px) {
    .profile-hero {
        min-height: auto;
        padding: 60px 0 30px;
        border-radius: 0 0 25px 25px;
        margin-bottom: 0;
    }

    .profile-header-content {
        padding-top: 0;
        transform: none;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }

    .profile-pfp {
        width: 120px;
        height: 120px;
        border-width: 4px;
    }
    #playerNameDisplay {
        font-size: 2rem !important;
        margin-bottom: 5px !important;
        letter-spacing: 1px;
    }
    .xp-container {
        margin: 0 auto;
        min-width: unset;
        max-width: 280px;
    }
    .profile-container {
        padding-top: 260px; 
        padding-left: 15px;
        padding-right: 15px;
    }
    .tab-group {
        display: flex;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 5px;
        gap: 8px;
        border-radius: 15px;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE 10+ */
    }
    .tab-group::-webkit-scrollbar { display: none; } /* Chrome/Safari */
    
    .tab-btn {
        flex: 0 0 auto;
        padding: 10px 20px;
        font-size: 0.75rem;
        height: auto;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
    .stat-card {
        padding: 15px;
    }
    .stat-val {
        font-size: 1.5rem;
    }
}

@media (max-width: 400px) {
    .profile-hero {
        height: 300px;
    }
    .profile-container {
        padding-top: 250px;
    }
    .tab-btn {
        padding: 6px 12px;
        flex: 1 1 auto;
        text-align: center;
    }
}

/* --- Chat Room Badge --- */
.chat-room-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 15px;
    border-radius: 20px;
    border: 1px solid var(--neon-cyan);
    box-shadow: var(--glow-cyan);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--neon-cyan);
    letter-spacing: 1px;
    margin-left: 20px;
}

.chat-room-badge::before {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--neon-cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-cyan);
    animation: pulseLive 1.5s ease-in-out infinite;
}

@keyframes pulseLive {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.2); }
}

@media (max-width: 768px) {
    .chat-room-badge {
        font-size: 0.65rem;
        padding: 4px 10px;
        margin-left: 5px;
        letter-spacing: 0.5px;
    }
    .chat-room-badge::before {
        width: 6px;
        height: 6px;
    }

    /* Final Mobile Refinements */
    .register-container, .login-container {
        padding: 2rem 1.5rem !important;
        margin: 1rem !important;
        max-width: 95% !important;
    }

    .shop-section h1, .tournament-section h1 {
        font-size: 2rem !important;
        margin-bottom: 1.5rem !important;
    }

    .items-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .category-tabs {
        flex-wrap: wrap !important;
        gap: 10px !important;
        justify-content: center !important;
    }

    .category-tabs button {
        padding: 8px 15px !important;
        font-size: 0.75rem !important;
    }

    /* FF Giveaway Page (ffgiveaway.html) Overrides */
    .section h1 {
        font-size: 2.2rem !important;
        letter-spacing: 2px !important;
        margin-bottom: 1.5rem !important;
    }

    .form-card {
        padding: 1.5rem !important;
        margin: 1.5rem !important;
        border-radius: 20px !important;
    }

    .form-card h3 {
        font-size: 0.9rem !important;
        margin-bottom: 1rem !important;
    }

    .form-card input {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
        font-size: 0.9rem !important;
    }

    #adblockBox {
        padding: 2rem !important;
        margin: 1rem !important;
    }

    /* Music Room (groupplay.html) Overrides */
    .room-grid {
        display: grid;
        grid-template-columns: 1fr 350px;
        gap: 30px;
        margin-top: 20px;
    }

    .player-column {
        min-width: 0;
    }

    .info-column {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    #playerContainer {
        width: 100% !important;
        aspect-ratio: 16/9;
        border-radius: 20px;
        overflow: hidden;
        box-shadow: var(--glow-cyan);
        border: 1px solid var(--glass-border);
    }

    .member-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .member-list li {
        padding: 12px 15px;
        background: rgba(255,255,255,0.03);
        border: 1px solid var(--glass-border);
        border-radius: 12px;
        margin-bottom: 10px;
        font-family: 'Orbitron', sans-serif;
        font-size: 0.85rem;
        display: flex;
        align-items: center;
        gap: 10px;
        transition: 0.3s;
    }

    .member-list li::before {
        content: "";
        width: 8px;
        height: 8px;
        background: var(--neon-cyan);
        border-radius: 50%;
        box-shadow: 0 0 10px var(--neon-cyan);
    }
    
    @media (max-width: 900px) {
        .room-grid {
            grid-template-columns: 1fr;
        }
    }

    /* Original Mobile Fixes */
    .panel {
        padding: 1.2rem !important;
        border-radius: 15px !important;
    }
    #authPanel input, #lobby input, #roomPanel input {
        width: 100% !important;
        padding: 12px !important;
        margin-bottom: 10px !important;
    }
}

/* --- Global Footer Styles --- */
.footer {
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
    position: relative;
    z-index: 10;
}

.footer-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.footer-logo {
    font-size: 2.2rem;
    color: var(--neon-cyan);
    text-shadow: var(--glow-cyan);
    margin-bottom: 1rem;
}

.footer-tagline {
    color: var(--text-dim);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    font-weight: 500;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.social-icons a {
    color: var(--text-dim);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icons a:hover {
    color: var(--neon-cyan);
    transform: translateY(-5px) scale(1.2);
    filter: drop-shadow(var(--glow-cyan));
}

.footer-copy {
    color: var(--text-dim);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .footer {
        padding: 3rem 1rem 1.5rem;
        margin-top: 3rem;
    }
    .footer-logo {
        font-size: 1.8rem;
    }
    .footer-tagline {
        font-size: 0.9rem;
        margin-bottom: 2rem;
    }
    .social-icons {
        gap: 1.5rem;
    }
    .social-icons svg {
        width: 20px;
        height: 20px;
    }
}

/* Theme Switcher Component */
.theme-switcher {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 6px 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
    font-size: 0.7rem;
    font-family: 'Orbitron', sans-serif;
    color: var(--text-dim);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.theme-switcher:hover {
    border-color: var(--neon-cyan);
    background: rgba(0, 242, 255, 0.05);
    color: #fff;
}

.mode-icon { width: 14px; height: 14px; }

/* HUD: XP Progress Bar */
.xp-bar-container {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 3px;
    background: rgba(255, 255, 255, 0.02);
    z-index: 10001;
}

.xp-bar {
    height: 100%;
    width: 35%; /* Simulated progress */
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-indigo));
    box-shadow: 0 0 10px var(--neon-cyan);
    transition: width 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

/* Level Badge */
.lvl-badge {
    padding: 2px 6px;
    background: rgba(0, 242, 255, 0.1);
    color: var(--neon-cyan);
    border: 1px solid var(--neon-cyan);
    border-radius: 4px;
    font-size: 0.6rem;
    font-family: 'Orbitron', sans-serif;
    margin-left: 8px;
    text-shadow: 0 0 5px var(--neon-cyan);
    vertical-align: middle;
}

/* In-Game HUD V2 - Pro Bar */
.game-hud {
    position: absolute;
    top: 1.5rem; left: 50%; transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    z-index: 10005;
    background: rgba(5, 5, 10, 0.7);
    backdrop-filter: blur(25px) saturate(180%);
    padding: 8px 1.5rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(255,255,255,0.05);
    min-width: 320px;
    justify-content: space-between;
}

.game-hud:hover { opacity: 1; }

.hud-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    color: var(--neon-cyan);
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.hud-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hud-sep {
    width: 1px;
    height: 20px;
    background: rgba(255,255,255,0.1);
}

.hud-btn {
    cursor: pointer;
    background: none;
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    transition: 0.2s;
}

.hud-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--neon-cyan);
    transform: scale(1.1);
}

.hud-btn-active {
    color: var(--neon-cyan) !important;
    background: rgba(0, 242, 255, 0.1) !important;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.2);
}

/* Next Up Recommendations (Inside Modal) */
.recommendations {
    position: absolute;
    bottom: 30px; left: 50%; transform: translateX(-50%);
    width: 90%; max-width: 800px;
    background: rgba(10, 10, 20, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 15px;
    opacity: 0.2;
    transition: 0.5s;
    pointer-events: none;
    z-index: 10006;
}

.recommendations:hover, .recommendations.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateX(-50%) translateY(-10px);
}

.recommendations.minimized {
    transform: translateX(-50%) translateY(85%);
    opacity: 0.8;
}

.recommendations.minimized:hover {
    transform: translateX(-50%) translateY(80%);
    opacity: 1;
}

.rec-toggle {
    position: absolute;
    top: -15px; right: 20px;
    background: var(--bg-dark);
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.7rem;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    transition: 0.3s;
    z-index: 10;
}

.rec-toggle:hover {
    background: var(--neon-cyan);
    color: #000;
}

.rec-header {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.rec-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.rec-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
}

.rec-card:hover {
    background: rgba(0, 242, 255, 0.05);
    border-color: var(--neon-cyan);
    transform: translateY(-5px);
}

.rec-card img {
    width: 100%;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
}

.rec-card-title {
    font-size: 0.75rem;
    font-weight: bold;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Custom Glass Tooltips */
.custom-tooltip {
    position: fixed;
    padding: 8px 14px;
    background: rgba(10, 10, 20, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid var(--neon-cyan);
    border-radius: 10px;
    color: #fff;
    font-size: 0.75rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    pointer-events: none;
    z-index: 20000;
    opacity: 0;
    transform: translateY(10px) scale(0.9);
    transition: 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 10px rgba(0, 242, 255, 0.2);
    white-space: nowrap;
}

.custom-tooltip.tooltip-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Community Pulse Ticker */
.pulse-ticker {
    position: fixed;
    bottom: 0; left: 0; width: 100%; height: 32px;
    background: rgba(8, 8, 16, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    z-index: 10003;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.ticker-content {
    white-space: nowrap;
    display: flex;
    gap: 4rem;
    padding-left: 100%;
    animation: scroll-pulse 40s linear infinite;
    font-size: 0.75rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-dim);
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ticker-item span { color: var(--neon-cyan); font-weight: bold; }

@keyframes scroll-pulse {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

/* === CIRCULAR REWARDS TIMER === */
.circular-timer-container {
    position: fixed;
    bottom: 80px;
    right: 30px;
    width: 70px;
    height: 70px;
    display: none; /* Controlled by JS */
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    z-index: 999999;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px rgba(0, 242, 255, 0.2);
}

.circular-timer-container.critical {
    box-shadow: 0 0 25px rgba(255, 71, 87, 0.4);
    border-color: rgba(255, 71, 87, 0.3);
}

.timer-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 6;
}

.timer-progress {
    fill: none;
    stroke: var(--neon-cyan);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 1s linear, stroke 0.3s;
}

.critical .timer-progress {
    stroke: #ff4757;
}

.timer-text {
    position: absolute;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
}

.critical .timer-text {
    color: #ff4757;
    animation: pings 0.5s infinite alternate;
}

@keyframes pings {
    from { transform: scale(1); opacity: 1; }
    to { transform: scale(1.1); opacity: 0.8; }
}

#rewardCountdown.tick {
    animation: tickPulse 0.2s ease-out;
}

@keyframes tickPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); color: var(--neon-cyan); }
    100% { transform: scale(1); }
}

