/**
 * MODERN V2 - Complete Redesign
 * Premium Gaming Platform Design
 */

/* ============================================
   CRITICAL OVERFLOW PREVENTION
   ============================================ */

/* Prevent any horizontal overflow on mobile */
html, body {
    overflow-x: hidden !important;
    max-width: 100% !important;
    position: relative !important;
}

/* Universal box-sizing for all elements */
.modern-lobby *,
.modern-lobby *::before,
.modern-lobby *::after {
    box-sizing: border-box !important;
}

/* Lobby Box Container Overflow Fix */
.modern-lobby .lobby-box {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

.modern-lobby .lobby-box.page-box.wrap {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

.modern-lobby .lobby-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

.modern-lobby .lobby-main {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* ============================================
   COMPLETE OVERRIDE - LOBBY REDESIGN
   ============================================ */

/* MOBILE OVERFLOW FIXES - CRITICAL */
* {
    box-sizing: border-box !important;
}

html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    position: relative !important;
}

.modern-lobby,
.modern-lobby * {
    max-width: 100% !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
}

.modern-lobby {
    width: 100% !important;
    overflow-x: hidden !important;
    position: relative !important;
}

/* Force all containers to respect viewport width */
.modern-lobby .inner-wrap,
.modern-lobby .lobby-wrap,
.modern-lobby .lobby-main,
.modern-lobby .lobby-games,
.modern-lobby .contest-game,
.modern-lobby .contest-game *,
.modern-lobby .lobby-tabs,
.modern-lobby .lobby-tabs * {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

/* Specific fixes for problematic elements */
.modern-lobby .contest-logo,
.modern-lobby .contest-begins,
.modern-lobby .contest-title,
.modern-lobby .contest-date {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Critical fix for table layout used in lobby */
.modern-lobby .contest-game .table,
.modern-lobby .contest-game a.table {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    table-layout: auto !important;
}

.modern-lobby .contest-game .table-cell {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px !important;
    box-sizing: border-box !important;
}

.modern-lobby .contest-game .fullwidth {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 768px) {
    .modern-lobby .contest-game .table,
    .modern-lobby .contest-game a.table {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }
    
    .modern-lobby .contest-game .contest-left,
    .modern-lobby .contest-game .contest-right {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        text-align: center !important;
        display: block !important;
    }
}

/* Hide all old styles first */
.modern-lobby .page-hero.lobby-hero {
    background: none !important;
    border: none !important;
}

.modern-lobby .hero-details {
    background: none !important;
}

/* Full Page Wrapper */
.modern-lobby {
    position: relative;
    min-height: 100vh;
    background: #FFFFFF;
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

/* Animated Background */
.modern-lobby::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(220, 20, 60, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 0, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(220, 20, 60, 0.05) 0%, transparent 70%),
        linear-gradient(180deg, #FFFFFF 0%, #F8F9FA 50%, #FFFFFF 100%);
    z-index: 0;
}

/* Particle Effect Overlay */
.modern-lobby::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="1" cy="1" r="0.5" fill="%23DC143C" opacity="0.3"/></svg>');
    opacity: 0.4;
    animation: floatParticles 20s linear infinite;
    z-index: 1;
}

@keyframes floatParticles {
    0% { transform: translateY(0) translateX(0); }
    100% { transform: translateY(-100px) translateX(-100px); }
}

/* Content Layer */
.modern-lobby > * {
    position: relative;
    z-index: 2;
}

/* Mobile Menu Toggle Button */
@media (max-width: 768px) {
    .modern-lobby .mobile-menu-toggle {
        display: block !important;
        position: fixed !important;
        bottom: 20px !important;
        right: 20px !important;
        width: 60px !important;
        height: 60px !important;
        background: linear-gradient(135deg, #DC143C 0%, #B22222 100%) !important;
        border-radius: 50% !important;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3) !important;
        z-index: 1000 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
    }
    
    .modern-lobby .mobile-menu-toggle i {
        color: #000 !important;
        font-size: 1.5rem !important;
    }
}

@media (min-width: 769px) {
    .modern-lobby .mobile-menu-toggle {
        display: none !important;
    }
}

/* ============================================
   HERO SECTION - COMPLETE REDESIGN
   ============================================ */

.modern-lobby .page-hero {
    padding: 100px 0 80px !important;
    margin: 0 !important;
    background: transparent !important;
    position: relative !important;
}

.modern-lobby .inner-wrap {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

/* Main Title - Massive Impact */
.modern-lobby .lobby-title {
    font-size: 5rem !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: -2px !important;
    margin: 0 0 20px 0 !important;
    line-height: 1 !important;
    background: linear-gradient(
        180deg,
        #FFFFFF 0%,
        #DC143C 35%,
        #B22222 60%,
        #8B0000 100%
    ) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    text-shadow: 0 0 80px rgba(220, 20, 60, 0.5);
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { filter: brightness(1) drop-shadow(0 0 20px rgba(220, 20, 60, 0.5)); }
    100% { filter: brightness(1.2) drop-shadow(0 0 40px rgba(255, 0, 0, 0.8)); }
}

/* Subtitle */
.modern-lobby .hero-details h2 {
    font-size: 1.5rem !important;
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 300 !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    margin: 0 0 40px 0 !important;
}

/* ============================================
   BETTING MODE SWITCHER - PREMIUM DESIGN
   ============================================ */

.modern-lobby .modern-betting-switcher {
    display: inline-flex !important;
    padding: 6px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(20px) !important;
    border: 2px solid rgba(220, 20, 60, 0.3) !important;
    border-radius: 60px !important;
    position: relative !important;
    margin: 20px 0 !important;
    box-shadow: 
        inset 0 2px 10px rgba(0, 0, 0, 0.3),
        0 10px 40px rgba(220, 20, 60, 0.2) !important;
}

.modern-lobby .modern-betting-switcher .mode-indicator {
    position: absolute !important;
    top: 6px !important;
    left: 6px !important;
    height: calc(100% - 12px) !important;
    width: calc(50% - 6px) !important;
    background: linear-gradient(135deg, #DC143C 0%, #B22222 100%) !important;
    border-radius: 50px !important;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
    box-shadow: 
        0 4px 15px rgba(220, 20, 60, 0.5),
        inset 0 -2px 5px rgba(0, 0, 0, 0.2) !important;
}

.modern-lobby .modern-betting-switcher .mode-btn {
    padding: 15px 35px !important;
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    z-index: 2 !important;
}

.modern-lobby .modern-betting-switcher .mode-btn.active {
    color: #2C3E50 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

.modern-lobby .modern-betting-switcher.traditional .mode-indicator {
    transform: translateX(calc(100% + 0px)) !important;
}

/* ============================================
   LEADERBOARD BUTTON - GLOWING EFFECT
   ============================================ */

.modern-lobby .modern-btn-secondary {
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 18px 40px !important;
    background: transparent !important;
    border: 2px solid #B22222 !important;
    color: #B22222 !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    border-radius: 60px !important;
    text-decoration: none !important;
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    margin: 0 20px 0 0 !important;
}

.modern-lobby .modern-btn-secondary::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(220, 20, 60, 0.4), transparent) !important;
    transition: left 0.5s ease !important;
}

.modern-lobby .modern-btn-secondary:hover {
    color: #000 !important;
    background: linear-gradient(135deg, #DC143C 0%, #B22222 100%) !important;
    border-color: transparent !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 30px rgba(220, 20, 60, 0.4) !important;
}

.modern-lobby .modern-btn-secondary:hover::before {
    left: 100% !important;
}

/* ============================================
   TABS - ULTRA PREMIUM REDESIGN
   ============================================ */

/* Main Tab Container - Using exact classes */
.modern-lobby .lobby-tabs.noselect.upcoming-tab,
.modern-lobby div.lobby-tabs {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    border: none !important;
    box-shadow: none !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
}

/* Glowing Top Border */
.modern-lobby .lobby-tabs.noselect.upcoming-tab::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 2px !important;
    background: linear-gradient(
        90deg,
        transparent 0%,
        #B22222 25%,
        #DC143C 50%,
        #B22222 75%,
        transparent 100%
    ) !important;
    animation: borderGlow 3s linear infinite !important;
}

@keyframes borderGlow {
    0% { opacity: 0.5; transform: translateX(-100%); }
    50% { opacity: 1; }
    100% { opacity: 0.5; transform: translateX(100%); }
}

/* Tab List Container */
.modern-lobby .lobby-tabs.noselect.upcoming-tab ul,
.modern-lobby .lobby-tabs ul {
    display: flex !important;
    align-items: stretch !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    height: 40px !important;
    gap: 5px !important;
}

/* Individual Tab Items */
.modern-lobby .lobby-tabs.noselect.upcoming-tab ul li,
.modern-lobby .lobby-tabs ul li {
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

/* Tab Links - Complete Override */
.modern-lobby .lobby-tabs.noselect.upcoming-tab ul li a,
.modern-lobby .lobby-tabs.noselect.upcoming-tab ul li a.transition,
.modern-lobby .lobby-tabs ul li a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 40px !important;
    height: 40px !important;
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.4) !important;
    text-decoration: none !important;
    font-size: 1rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    position: relative !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    overflow: hidden !important;
}

/* Hover Effect - Glow Background */
.modern-lobby .lobby-tabs.noselect.upcoming-tab ul li a::before,
.modern-lobby .lobby-tabs ul li a::before {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 0 !important;
    height: 0 !important;
    background: radial-gradient(
        circle,
        rgba(220, 20, 60, 0.3) 0%,
        transparent 70%
    ) !important;
    transition: all 0.5s ease !important;
    transform: translate(-50%, -50%) !important;
}

/* Hover State */
.modern-lobby .lobby-tabs.noselect.upcoming-tab ul li a:hover,
.modern-lobby .lobby-tabs ul li a:hover {
    color: rgba(255, 255, 255, 0.8) !important;
    transform: translateY(-2px) !important;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3) !important;
}

.modern-lobby .lobby-tabs.noselect.upcoming-tab ul li a:hover::before,
.modern-lobby .lobby-tabs ul li a:hover::before {
    width: 200% !important;
    height: 200% !important;
}

/* ACTIVE STATE - Maximum Impact */
.modern-lobby .lobby-tabs.noselect.upcoming-tab ul li a.active,
.modern-lobby .lobby-tabs.noselect.upcoming-tab ul li a.transition.active,
.modern-lobby .lobby-tabs ul li a.active {
    color: #DC143C !important;
    background: linear-gradient(
        180deg,
        rgba(220, 20, 60, 0.15) 0%,
        rgba(218, 167, 24, 0.05) 100%
    ) !important;
    text-shadow: 
        0 0 30px rgba(255, 0, 0, 0.8),
        0 0 60px rgba(220, 20, 60, 0.6),
        0 0 10px rgba(255, 255, 255, 0.8) !important;
    transform: translateY(0) !important;
}

/* Active Tab - Bottom Indicator */
.modern-lobby .lobby-tabs.noselect.upcoming-tab ul li a.active::after,
.modern-lobby .lobby-tabs ul li a.active::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 4px !important;
    background: linear-gradient(
        90deg,
        transparent 0%,
        #B22222 10%,
        #DC143C 50%,
        #B22222 90%,
        transparent 100%
    ) !important;
    box-shadow: 
        0 0 20px rgba(255, 0, 0, 0.8),
        0 -2px 10px rgba(220, 20, 60, 0.6) !important;
    animation: pulseGlow 2s ease-in-out infinite !important;
}

@keyframes pulseGlow {
    0%, 100% { 
        opacity: 0.9;
        transform: scaleX(0.95);
    }
    50% { 
        opacity: 1;
        transform: scaleX(1);
    }
}

/* Active Tab - Top Highlight */
.modern-lobby .lobby-tabs.noselect.upcoming-tab ul li a.active::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 10% !important;
    right: 10% !important;
    height: 2px !important;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 0, 0, 0.5),
        transparent
    ) !important;
    animation: none !important;
}

/* Tab Separator */
.modern-lobby .lobby-tabs.noselect.upcoming-tab ul li:not(:last-child)::after {
    content: '' !important;
    position: absolute !important;
    right: -2.5px !important;
    top: 25% !important;
    bottom: 25% !important;
    width: 1px !important;
    background: linear-gradient(
        180deg,
        transparent,
        rgba(220, 20, 60, 0.2),
        transparent
    ) !important;
}

/* League Icons (optional) */
.modern-lobby .lobby-tabs.noselect.upcoming-tab ul li a[data-league]::before {
    content: '' !important;
    width: 20px !important;
    height: 20px !important;
    margin-right: 10px !important;
    background: radial-gradient(
        circle,
        rgba(220, 20, 60, 0.3),
        transparent
    ) !important;
    border-radius: 50% !important;
    display: none !important; /* Enable if you want icons */
}

/* Tab Count Badge */
.modern-lobby .lobby-tabs.noselect.upcoming-tab ul li a span.count {
    display: inline-block !important;
    margin-left: 8px !important;
    padding: 2px 8px !important;
    background: rgba(220, 20, 60, 0.2) !important;
    color: #B22222 !important;
    border-radius: 12px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    min-width: 20px !important;
    text-align: center !important;
}

/* Tab Scroll Indicator Mobile */
@media (max-width: 768px) {
    .modern-lobby .lobby-tabs.noselect.upcoming-tab::after {
        content: '→' !important;
        position: absolute !important;
        right: 10px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        color: rgba(220, 20, 60, 0.5) !important;
        font-size: 1.2rem !important;
        pointer-events: none !important;
        z-index: 10 !important;
        animation: scrollHint 2s ease-in-out infinite !important;
    }
    
    @keyframes scrollHint {
        0%, 100% { transform: translateY(-50%) translateX(0); opacity: 0.5; }
        50% { transform: translateY(-50%) translateX(5px); opacity: 1; }
    }
}

/* ============================================
   CONTEST CARDS - GRID LAYOUT DESIGN
   ============================================ */

.modern-lobby .lobby-games {
    padding: 40px 30px !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 25px !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 100px !important;
}

/* Tablet - 2 cards per row */
@media (max-width: 1024px) {
    .modern-lobby .lobby-games {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
}

/* Mobile - 1 card per row */
@media (max-width: 640px) {
    .modern-lobby .lobby-games {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        padding: 20px 15px !important;
    }
}

.modern-lobby .contest-game {
    background: linear-gradient(135deg, 
        rgba(26, 26, 26, 0.95) 0%, 
        rgba(15, 15, 15, 0.95) 100%) !important;
    border: 1px solid rgba(220, 20, 60, 0.2) !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    position: relative !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    display: flex !important;
    flex-direction: column !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: 100% !important;
    min-height: 320px !important;
}

/* Glowing Border Effect */
.modern-lobby .contest-game::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(135deg, 
        transparent 0%, 
        rgba(220, 20, 60, 0.1) 50%, 
        transparent 100%) !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    pointer-events: none !important;
}

.modern-lobby .contest-game:hover {
    transform: translateY(-5px) scale(1.02) !important;
    border-color: rgba(220, 20, 60, 0.5) !important;
    box-shadow: 
        0 15px 40px rgba(220, 20, 60, 0.2),
        0 5px 15px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

.modern-lobby .contest-game:hover::before {
    opacity: 1 !important;
}

.modern-lobby .contest-game a {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 30px 25px !important;
    text-decoration: none !important;
    color: #FFFFFF !important;
    position: relative !important;
    height: 100% !important;
    text-align: center !important;
}

/* Fix for table layout */
.modern-lobby .contest-game a.table {
    display: flex !important;
    flex-direction: column !important;
}

.modern-lobby .contest-game .table-cell {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
}

.modern-lobby .contest-game .fullwidth {
    width: 100% !important;
}

/* Contest Logo Section (Card Top) */
.modern-lobby .contest-left,
.modern-lobby .contest-logo {
    width: 100px !important;
    height: 100px !important;
    background: linear-gradient(135deg, 
        rgba(220, 20, 60, 0.15) 0%, 
        rgba(220, 20, 60, 0.05) 100%) !important;
    border: 2px solid rgba(220, 20, 60, 0.25) !important;
    border-radius: 50% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 20px auto !important;
    position: relative !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

.modern-lobby .contest-logo img,
.modern-lobby .contest-left img {
    max-width: 60px !important;
    max-height: 60px !important;
    filter: brightness(1.2) !important;
    display: block !important;
    object-fit: contain !important;
}

/* Contest Details Section (Card Bottom) */
.modern-lobby .contest-right,
.modern-lobby .contest-details {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    gap: 15px !important;
}

/* Contest Info Wrapper */
.modern-lobby .contest-right > div:first-child,
.modern-lobby .contest-details > div:first-child {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
}

.modern-lobby .contest-title {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    color: #FFFFFF !important;
    margin-bottom: 10px !important;
    letter-spacing: 0.3px !important;
    line-height: 1.3 !important;
    text-align: center !important;
    min-height: 50px !important;
    display: flex !important;
    align-items: center !important;
}

.modern-lobby .contest-date {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 15px !important;
}

/* Contest Status Badge */
.modern-lobby .contest-begins {
    margin-top: auto !important;
    padding: 12px 24px !important;
    background: linear-gradient(135deg, 
        rgba(76, 175, 80, 0.2) 0%, 
        rgba(76, 175, 80, 0.1) 100%) !important;
    border: 1px solid rgba(76, 175, 80, 0.5) !important;
    border-radius: 30px !important;
    color: #4CAF50 !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 200px !important;
}

.modern-lobby .contest-game.locked .contest-begins,
.modern-lobby .contest-game.in-progress .contest-begins {
    background: linear-gradient(135deg, 
        rgba(244, 67, 54, 0.2) 0%, 
        rgba(244, 67, 54, 0.1) 100%) !important;
    border-color: rgba(244, 67, 54, 0.5) !important;
    color: #F44336 !important;
}

/* Contest Type Badge */
.modern-lobby .contest-type {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    color: #DC143C !important;
    letter-spacing: 0.5px !important;
    padding: 5px 12px !important;
    background: linear-gradient(135deg, 
        rgba(220, 20, 60, 0.25) 0%, 
        rgba(220, 20, 60, 0.15) 100%) !important;
    border: 1px solid rgba(220, 20, 60, 0.4) !important;
    border-radius: 20px !important;
    white-space: nowrap !important;
    z-index: 10 !important;
}

.modern-lobby .contest-type span {
    font-size: 0.65rem !important;
    opacity: 0.8 !important;
}

/* Locked State */
.modern-lobby .contest-game.locked {
    opacity: 0.6 !important;
    filter: grayscale(50%) !important;
}

.modern-lobby .contest-game.locked:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* ============================================
   RESPONSIVE DESIGN - COMPLETE MOBILE OPTIMIZATION
   ============================================ */

/* Tablet Styles (768px - 1024px) */
@media (max-width: 1024px) {
    .modern-lobby .inner-wrap {
        padding: 0 20px !important;
    }
    
    .modern-lobby .lobby-title {
        font-size: 3.5rem !important;
    }
    
    .modern-lobby .hero-details h2 {
        font-size: 1.2rem !important;
    }
    
    .modern-lobby .lobby-games {
        padding: 30px 20px !important;
    }
}

/* Mobile Styles (320px - 768px) */
@media (max-width: 768px) {
    /* Hero Section Mobile */
    .modern-lobby .page-hero {
        padding: 60px 0 40px !important;
        width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .modern-lobby .inner-wrap {
        padding: 0 10px !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    
    .modern-lobby .lobby-title {
        font-size: 2rem !important;
        letter-spacing: -1px !important;
        margin: 0 0 15px 0 !important;
    }
    
    .modern-lobby .hero-details h2 {
        font-size: 1rem !important;
        margin: 0 0 25px 0 !important;
        letter-spacing: 1px !important;
    }
    
    /* Betting Mode Switcher Mobile */
    .modern-lobby .modern-betting-switcher {
        width: calc(100vw - 30px) !important;
        max-width: 320px !important;
        margin: 15px auto !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    
    .modern-lobby .modern-betting-switcher .mode-btn {
        padding: 12px 20px !important;
        font-size: 0.85rem !important;
        flex: 1 !important;
    }
    
    /* Leaderboard Button Mobile */
    .modern-lobby .modern-btn-secondary {
        padding: 14px 15px !important;
        font-size: 0.85rem !important;
        width: calc(100vw - 30px) !important;
        max-width: 320px !important;
        margin: 0 auto !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
    
    /* Tabs Mobile - Scrollable */
    .modern-lobby .lobby-tabs.noselect.upcoming-tab,
    .modern-lobby .lobby-tabs {
        padding: 0 !important;
        background: rgba(0, 0, 0, 0.95) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        width: 100vw !important;
        overflow-x: auto !important;
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
        padding-left: calc(50vw - 50%) !important;
        padding-right: calc(50vw - 50%) !important;
    }
    
    .modern-lobby .lobby-tabs.noselect.upcoming-tab ul,
    .modern-lobby .lobby-tabs ul {
        padding: 0 10px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        display: flex !important;
        align-items: center !important;
        height: 50px !important;
    }
    
    /* Hide scrollbar but keep functionality */
    .modern-lobby .lobby-tabs.noselect.upcoming-tab ul::-webkit-scrollbar,
    .modern-lobby .lobby-tabs ul::-webkit-scrollbar {
        display: none !important;
    }
    
    .modern-lobby .lobby-tabs.noselect.upcoming-tab ul li a,
    .modern-lobby .lobby-tabs ul li a {
        padding: 0 20px !important;
        font-size: 0.8rem !important;
        letter-spacing: 0.5px !important;
        height: 40px !important;
        white-space: nowrap !important;
    }
    
    /* Contest Cards Mobile - Grid Layout Fixed */
    .modern-lobby .lobby-games {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        padding: 20px 10px !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }
    
    .modern-lobby .contest-game {
        border-radius: 15px !important;
        min-height: 280px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }
    
    .modern-lobby .contest-game a {
        flex-direction: column !important;
        text-align: center !important;
        padding: 20px 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .modern-lobby .contest-logo {
        width: 70px !important;
        height: 70px !important;
        margin: 0 0 15px 0 !important;
    }
    
    .modern-lobby .contest-logo img {
        max-width: 40px !important;
        max-height: 40px !important;
    }
    
    .modern-lobby .contest-details {
        width: 100% !important;
    }
    
    .modern-lobby .contest-title {
        font-size: 1.1rem !important;
        margin-bottom: 10px !important;
    }
    
    .modern-lobby .contest-date {
        font-size: 0.85rem !important;
        margin-bottom: 10px !important;
    }
    
    .modern-lobby .contest-begins {
        margin: 15px auto 0 auto !important;
        padding: 10px 20px !important;
        font-size: 0.75rem !important;
    }
    
    /* Contest Type Badge Mobile */
    .modern-lobby .contest-type {
        font-size: 0.7rem !important;
        padding: 3px 6px !important;
        max-width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    /* Main Content Area Mobile */
    .modern-lobby .lobby-wrap {
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    
    .modern-lobby .lobby-main {
        width: 100% !important;
        padding: 0 !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    
    .modern-lobby .lobby-sidebar {
        width: 100% !important;
        padding: 20px 10px !important;
        margin-top: 20px !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
}

/* Small Mobile Styles (320px - 480px) */
@media (max-width: 480px) {
    .modern-lobby .lobby-title {
        font-size: 1.75rem !important;
        padding: 0 10px !important;
        text-align: center !important;
    }
    
    .modern-lobby .hero-details h2 {
        font-size: 0.9rem !important;
        padding: 0 10px !important;
        text-align: center !important;
    }
    
    .modern-lobby .modern-betting-switcher {
        width: calc(100vw - 20px) !important;
        max-width: 280px !important;
        margin: 15px 10px !important;
    }
    
    .modern-lobby .modern-betting-switcher .mode-btn {
        padding: 10px 8px !important;
        font-size: 0.7rem !important;
        flex: 1 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .modern-lobby .modern-btn-secondary {
        font-size: 0.8rem !important;
        padding: 12px 10px !important;
        width: calc(100vw - 20px) !important;
        margin: 10px !important;
    }
    
    /* No Contests Message Mobile */
    .modern-lobby .no-contests {
        padding: 40px 20px !important;
        font-size: 1rem !important;
        text-align: center !important;
        color: rgba(255, 255, 255, 0.6) !important;
    }
}

/* Landscape Mode Optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .modern-lobby .page-hero {
        padding: 40px 0 30px !important;
    }
    
    .modern-lobby .lobby-title {
        font-size: 2.5rem !important;
    }
    
    .modern-lobby .contest-game a {
        flex-direction: row !important;
        text-align: left !important;
    }
    
    .modern-lobby .contest-logo {
        margin: 0 20px 0 0 !important;
    }
    
    .modern-lobby .contest-begins {
        margin: 0 0 0 auto !important;
    }
}

/* ============================================
   MOBILE SIDEBAR STYLES
   ============================================ */

@media (max-width: 768px) {
    .modern-lobby .lobby-sidebar {
        position: fixed !important;
        right: -100% !important;
        top: 0 !important;
        width: 80% !important;
        max-width: 320px !important;
        height: 100vh !important;
        background: linear-gradient(180deg, #FFFFFF 0%, #F8F9FA 100%) !important;
        border-left: 2px solid rgba(218, 167, 24, 0.3) !important;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5) !important;
        overflow-y: auto !important;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        z-index: 999 !important;
        padding: 30px 20px !important;
    }
    
    .modern-lobby .lobby-sidebar.mobile-active {
        right: 0 !important;
    }
    
    /* Overlay for sidebar */
    .modern-lobby .lobby-sidebar.mobile-active::before {
        content: '' !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(0, 0, 0, 0.7) !important;
        z-index: -1 !important;
    }
    
    /* User box in mobile sidebar */
    .modern-lobby .lobby-sidebar .user-box {
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(220, 20, 60, 0.2) !important;
        border-radius: 15px !important;
        padding: 20px !important;
        margin-top: 20px !important;
    }
    
    .modern-lobby .lobby-sidebar .user-box p {
        margin: 10px 0 !important;
    }
    
    .modern-lobby .lobby-sidebar .user-box a {
        color: #B22222 !important;
        text-decoration: none !important;
        font-size: 0.9rem !important;
        display: block !important;
        padding: 8px 0 !important;
        transition: color 0.3s ease !important;
    }
    
    .modern-lobby .lobby-sidebar .user-box a:hover {
        color: #DC143C !important;
    }
    
    /* Hide tab scroll indicator when at end */
    .modern-lobby .lobby-tabs.at-end::after {
        display: none !important;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .modern-lobby .contest-game {
        -webkit-tap-highlight-color: transparent !important;
    }
    
    .modern-lobby .contest-game:active {
        transform: scale(0.98) !important;
    }
    
    .modern-lobby .lobby-tabs ul li a {
        -webkit-tap-highlight-color: rgba(218, 167, 24, 0.1) !important;
    }
    
    .modern-lobby .modern-betting-switcher .mode-btn {
        -webkit-tap-highlight-color: transparent !important;
    }
}

/* ============================================
   FINAL MOBILE OVERFLOW PREVENTION
   ============================================ */

@media (max-width: 768px) {
    /* Ensure nothing can overflow viewport */
    .modern-lobby,
    .modern-lobby .page-hero,
    .modern-lobby .lobby-box,
    .modern-lobby .lobby-wrap,
    .modern-lobby .lobby-main,
    .modern-lobby .lobby-games,
    .modern-lobby .inner-wrap {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        position: relative !important;
    }
    
    /* Contest game width constraints */
    .modern-lobby .contest-game,
    .modern-lobby .contest-game a,
    .modern-lobby .contest-game .table,
    .modern-lobby .contest-game .fullwidth {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Fix any text overflow */
    .modern-lobby .contest-title {
        overflow: hidden !important;
        word-wrap: break-word !important;
        white-space: normal !important;
        max-width: 100% !important;
    }
    
    .modern-lobby .contest-date,
    .modern-lobby .contest-type {
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        max-width: 100% !important;
    }
    
    /* Ensure images don't overflow */
    .modern-lobby img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Fix position sticky elements */
    .modern-lobby .lobby-tabs.noselect.upcoming-tab {
        position: sticky !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
    }
}

/* ============================================
   NO CONTESTS MESSAGE
   ============================================ */

.modern-lobby .no-contests {
    grid-column: 1 / -1 !important;
    padding: 60px 20px !important;
    text-align: center !important;
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 1.2rem !important;
    background: rgba(218, 167, 24, 0.05) !important;
    border: 1px solid rgba(220, 20, 60, 0.2) !important;
    border-radius: 20px !important;
    margin: 20px auto !important;
    max-width: 600px !important;
    width: 100% !important;
}

/* ============================================
   LOADING ANIMATION
   ============================================ */

.modern-lobby .contest-game {
    animation: fadeInUp 0.6s ease both !important;
}

.modern-lobby .contest-game:nth-child(1) { animation-delay: 0.1s !important; }
.modern-lobby .contest-game:nth-child(2) { animation-delay: 0.15s !important; }
.modern-lobby .contest-game:nth-child(3) { animation-delay: 0.2s !important; }
.modern-lobby .contest-game:nth-child(4) { animation-delay: 0.25s !important; }
.modern-lobby .contest-game:nth-child(5) { animation-delay: 0.3s !important; }

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   WAGERS DROPDOWN MENU
   ============================================ */

.header-nav .nav-dropdown {
    position: relative;
    display: inline-block;
}

.header-nav .nav-dropdown .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
}

.header-nav .nav-dropdown .dropdown-icon {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.header-nav .nav-dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

.header-nav .nav-dropdown .wagers-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 10px;
    overflow: hidden;
}

.header-nav .nav-dropdown:hover .wagers-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-nav .wagers-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-nav .wagers-menu .dropdown-item:last-child {
    border-bottom: none;
}

.header-nav .wagers-menu .dropdown-item:hover {
    background: rgba(212, 175, 55, 0.1);
    color: red;
    padding-left: 20px;
}

.header-nav .wagers-menu .dropdown-item i {
    width: 20px;
    text-align: center;
}

.filter-header h3{
	color: 	#0bd3d3 !important;
}

.header-nav .wagers-menu .dropdown-item span {
    font-size: 14px;
    font-weight: 500;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .header-nav .nav-dropdown {
        width: 100%;
    }
    
    .header-nav .nav-dropdown .wagers-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: rgba(26, 31, 58, 0.5);
        margin-top: 0;
        border-radius: 0;
    }
    
    .header-nav .nav-dropdown:not(.active) .wagers-menu {
        display: none;
    }
    
    .header-nav .nav-dropdown.active .wagers-menu {
        display: block;
    }
    
    .forgot-password-modal-links{
    flex-direction: column;
    }
}
