/* =====================================================
   HALLAPP MAIN CSS - Extracted from hallapp.blade.php
   ===================================================== */

/* Base styles */
:root {
    /* Core Variables */
    --navbar-height: 70px;
    --mobile-navbar-height: 60px;
    
    /* Navbar specific heights */
    --banner-height: 40px;
    --main-nav-height: 70px;
    
    /* Z-index Hierarchy */
    --z-navbar: 1030;
    --z-mobile-panel: 1025;
    --z-dropdown: 1020;
    --z-whatsapp-modal: 1040;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    
    /* Colors */
    --primary: #7928CA;
    --secondary: #FF0080;
    --accent: #FFD700;
    --accent-alt: #FF6B00;
    --cool: #0095FF;
    --success: #00E676;
    --danger: #FF3D71;
    --dark: #0D0D20;
    --darker: #07071A;
    --light: #FFFFFF;
    
    /* Borders & Shadows */
    --border-light: rgba(255, 255, 255, 0.15);
}

body {
    background-color: #000;
    color: #fff;
    font-family: 'Poppins', 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Force all images to load immediately */
img {
    opacity: 1 !important; 
    visibility: visible !important;
    transition: none !important;
    animation: none !important;
    display: block !important;
    position: relative !important;
}

/* Exception for marquee animations - preserve smooth scrolling */
.winners-track,
.winners-scroll .winners-track {
    animation: scrollWinners 15s linear infinite !important;
    -webkit-animation: scrollWinners 15s linear infinite !important;
    -moz-animation: scrollWinners 15s linear infinite !important;
    -o-animation: scrollWinners 15s linear infinite !important;
    animation-play-state: running !important;
    animation-timing-function: linear !important;
    transform: translate3d(0, 0, 0) !important;
    -webkit-transform: translate3d(0, 0, 0) !important;
    will-change: transform !important;
}

/* Special handling for game list images */
.game-list img {
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
}

/* Navbar Container */
#navbar-container {
    position: relative;
    z-index: var(--z-navbar);
}

.navbar-wrapper {
    background: #212529;
    width: 100% !important;
    display: block !important;
    z-index: var(--z-navbar) !important;
}

.nav-container {
    display: block !important;
}

.nav-content {
    visibility: visible !important;
}

/* Main content area */
.main-content {
    margin-top: 0;
    padding-top: 60px;
    transition: margin-top 0.3s ease;
    overflow-x: hidden;
}

body.compact-nav-fixed .main-content {
    margin-top: 0;
}

/* Mobile Panel Styles */
.mobile-panel {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(30, 30, 30, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: var(--z-mobile-panel);
    padding: 8px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    width: 100%;
}

@media (max-width: 768px) {
    .mobile-panel {
        display: flex !important;
        justify-content: space-around;
        align-items: center;
    }
}

.mobile-panel.show {
    display: block !important;
    transform: translateX(0) !important;
}

.mobile-panel-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #fff;
    font-size: 0.75rem;
    padding: 5px;
    transition: all 0.3s ease;
    background: transparent;
    border: none;
    cursor: pointer;
    flex: 1;
    max-width: 80px;
}

.mobile-panel-item i {
    font-size: 1.25rem;
    margin-bottom: 2px;
}

.mobile-panel-item:hover,
.mobile-panel-item:focus {
    color: var(--accent);
    transform: scale(1.05);
}

/* Prevent body scrolling when modal is open */
body.modal-open {
    overflow: hidden;
    padding-right: 0 !important; /* Prevent layout shift */
}

/* Quick access menu toggle button */
.toggle-button {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
    transition: all 0.3s ease;
}

.toggle-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(255, 215, 0, 0.6);
}

.toggle-button.active {
    background: linear-gradient(135deg, #ff4444, #ff6b6b);
}

/* Quick access menu */
#quick-access-menu {
    position: fixed;
    bottom: 150px;
    right: 20px;
    background: rgba(20, 20, 30, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 12px;
    display: none;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 180px;
}

#quick-access-menu.show {
    display: block;
    animation: slideInUp 0.3s ease;
}

/* Ensure navbar is visible */
.hall-name {
    display: flex !important;
    visibility: visible !important;
    font-size: 1.5rem !important;
    font-weight: bold !important;
    color: #ffd700 !important;
    text-decoration: none !important;
}

.nav-container *,
.nav-content * {
    visibility: visible !important;
}

/* Add better button styles for WhatsApp modal trigger */
.custom-nav-link,
[data-bs-toggle="modal"][data-bs-target="#whatsappSupportModal"] {
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.custom-nav-link:hover,
[data-bs-toggle="modal"][data-bs-target="#whatsappSupportModal"]:hover {
    transform: scale(1.05) !important;
    opacity: 0.9 !important;
}

/* Accessibility improvements for touch targets */
button:not(.btn-alert-ok):not(.alert-close):not(.provider-btn):not(.section-toggle):not(.unread-messages-popup .btn) {
    min-height: 44px;
    min-width: 44px;
    padding: 8px 12px;
    margin: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Additional responsive adjustments */
@media (max-width: 768px) {
    .main-content {
        padding-bottom: 70px;
    }
    
    .toggle-button {
        bottom: 75px;
        right: 15px;
        width: 48px;
        height: 48px;
    }
    
    #quick-access-menu {
        right: 15px;
        bottom: 130px;
    }
    
    /* Move network indicator above mobile navbar */
    #network-status-indicator {
        bottom: 75px;
        right: 10px;
        font-size: 11px;
        padding: 5px 10px;
    }
}

/* Content area styling */
#content {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding-top: var(--navbar-height);
}

@media (max-width: 768px) {
    #content {
        padding-top: var(--mobile-navbar-height);
        padding-bottom: 60px;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Notification styles */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
}

/* Alert/Toast positioning fix */
.alert-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1060;
    max-width: 350px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Network status indicator styles */
#network-status-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    opacity: 0.9;
}

#network-status-indicator.online {
    background: linear-gradient(135deg, #00C851, #00ff00);
    color: white;
    animation: slideInRight 0.3s ease;
}

#network-status-indicator.offline {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: white;
    animation: pulse 2s infinite, slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 0.9;
    }
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

#network-status-indicator .status-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Animations */
@keyframes slideInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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