:root {
    --accent-color: #ffab00;
    --accent-hover: #ffcc00;
    --primary-bg: #090b10;
    --text-primary: #f0f6fc;
    --glass-bg: rgba(22, 27, 34, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
}

body {
    background-color: var(--primary-bg);
    color: var(--text-primary);
    font-family: 'Exo 2', sans-serif;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Utilities */
.text-gradient-gold {
    background: linear-gradient(to right, #ffd700, #ffab00, #ff8800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
}

/* Navbar */
.navbar {
    background: rgba(15, 15, 19, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-link {
    color: rgba(255,255,255,0.7);
    transition: all 0.2s;
}
.nav-link:hover, .nav-link.active {
    color: var(--accent-color);
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 80px 0;
    background-size: cover;
    background-position: center;
}

.hero-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), var(--primary-bg));
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Search Container */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.hero-search-bar {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    border-radius: 50px;
    padding: 12px 25px;
    width: 100%;
    transition: all 0.3s ease;
}

.hero-search-bar:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(255, 171, 0, 0.3);
    outline: none;
}

/* Mobile Bottom Nav */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #1a1d21;
    border-top: 1px solid #2d333b;
    z-index: 1000;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #999;
    gap: 3px;
    font-size: 11px;
    padding: 8px 0;
    border-radius: 0;
    position: relative;
    transition: all 0.2s ease;
}

.mobile-bottom-nav .nav-item.active,
.mobile-bottom-nav .nav-item:hover {
    color: var(--accent-color);
    background: transparent;
    box-shadow: none;
    transform: none;
}

.mobile-bottom-nav .nav-item i {
    font-size: 18px;
    margin-bottom: 2px;
}

/* Mobile User Info Bar (New) */
.mobile-user-card {
    background: rgba(20, 20, 25, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.mobile-user-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--accent-color), #ff8800);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(255, 171, 0, 0.3);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin-animation {
    animation: spin 1s linear infinite;
}

/* Support Chat Widget */
.support-chat-widget {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 999;
}

/* Nav Badge */
.nav-badge {
    background: var(--accent-color);
    color: #000;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
}

/* Product Card Grid */
.product-card-grid {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.product-card-grid:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    border-color: var(--accent-color);
}
.product-card-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-collapse {
        background: rgba(15, 15, 19, 0.98);
        padding: 1rem;
        border-radius: 0 0 1rem 1rem;
    }
}
:root {
    --primary-bg: #0f0f13;
    --secondary-bg: #1a1a20;
    --accent-color: #ffab00;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --card-bg: #212529;
}

body {
    background-color: var(--primary-bg);
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
}

/* Glassmorphism & UI Utilities */
.glass-effect {
    background: rgba(30, 30, 40, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-header {
    background: rgba(255, 171, 0, 0.15);
    border-bottom: 1px solid rgba(255, 171, 0, 0.2);
}

.letter-spacing-1 {
    letter-spacing: 1px;
}

.hover-effect {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-effect:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color) !important;
}

/* Navbar */
.navbar {
    background: rgba(15, 15, 19, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar-brand {
    font-weight: 800;
    letter-spacing: 1px;
}

.nav-link {
    font-weight: 500;
    position: relative;
    transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-color) !important;
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 80px 0 60px;
    background: radial-gradient(circle at 50% 50%, rgba(255, 171, 0, 0.1) 0%, rgba(15, 15, 19, 0) 70%);
}

/* Game Cards */
.game-card {
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    aspect-ratio: 1/1;
    cursor: pointer;
}

.game-card.big-card {
    aspect-ratio: 16/9;
}

.game-card img {
    transition: transform 0.5s ease;
}

.game-card:hover img {
    transform: scale(1.1);
}

.game-card-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    pointer-events: none;
}

.small-title {
    font-size: 0.9rem; 
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* Product List Styling */
.product-item-text {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.product-item-text:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 171, 0, 0.5);
}

.product-item-text.active {
    background: rgba(255, 171, 0, 0.15);
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(255, 171, 0, 0.2);
}

.product-title-text {
    font-size: 0.95rem;
    font-weight: 500;
}

.product-price-text {
    font-size: 1rem;
    font-weight: 700;
}

/* Admin Panel */
.admin-stat-card {
    background: linear-gradient(145deg, #1e1e24, #16161a);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.status-badge {
    padding: 0.4em 0.8em;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending { background: rgba(255, 193, 7, 0.2); color: #ffc107; border: 1px solid rgba(255, 193, 7, 0.3); }
.status-completed { background: rgba(25, 135, 84, 0.2); color: #198754; border: 1px solid rgba(25, 135, 84, 0.3); }
.status-rejected { background: rgba(220, 53, 69, 0.2); color: #dc3545; border: 1px solid rgba(220, 53, 69, 0.3); }

/* Search Bar Improvements */
.hero-search-bar {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 5px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.hero-search-bar:focus-within {
    background: rgba(20, 20, 25, 0.9);
    border-color: var(--accent-color);
    box-shadow: 0 4px 30px rgba(255, 171, 0, 0.2);
}

.hero-search-bar .input-group-text {
    background: transparent;
    border: none;
    color: var(--accent-color);
    padding-left: 20px;
}

.hero-search-bar input.form-control {
    background: transparent;
    border: none;
    color: #fff;
    box-shadow: none;
    padding: 12px 10px;
}

.hero-search-bar input.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.hero-search-bar button.btn {
    border-radius: 50px;
    padding: 10px 25px;
    transition: all 0.3s ease;
}

.hero-search-bar button.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 171, 0, 0.4);
}

/* Mobile Bottom Nav */
.mobile-bottom-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 12px;
    width: calc(100% - 20px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    background: rgba(20, 20, 25, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1020;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-radius: 20px;
}

.mobile-bottom-nav::before {
    display: none;
}

/* Insufficient Balance Modal - Bright Theme */
#insufficientBalanceModal .modal-content {
    box-shadow: 0 16px 40px rgba(255, 171, 0, 0.25);
    border-radius: 14px;
}
#insufficientBalanceModal .modal-header {
    background: #fff;
}
#insufficientBalanceModal .modal-title {
    letter-spacing: 0.2px;
}
#insufficientBalanceModal .modal-body p {
    font-size: 0.95rem;
}
#insufficientBalanceModal .btn-success {
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
}
#insufficientBalanceModal .btn-outline-secondary:hover {
    background: #f5f5f5;
}
.mobile-bottom-nav .nav-item {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #999;
    gap: 3px;
    font-size: 11px;
    padding: 8px 0;
    border-radius: 0;
    position: relative;
    transition: all 0.2s ease;
}

.mobile-bottom-nav .nav-item i {
    font-size: 20px;
    color: #bbb;
    transition: all 0.2s ease;
    margin-bottom: 2px;
}

.mobile-bottom-nav .nav-item.active,
.mobile-bottom-nav .nav-item:hover {
    color: var(--accent-color);
    background: transparent;
    box-shadow: none;
    transform: none;
}

.mobile-bottom-nav .nav-item.active i {
    transform: scale(1.1);
    color: var(--accent-color);
    filter: drop-shadow(0 0 5px rgba(255, 171, 0, 0.4));
}

.mobile-bottom-nav .nav-item span {
    font-weight: 500;
    letter-spacing: 0.2px;
    white-space: nowrap;
    font-size: 10px;
}

.mobile-bottom-nav .nav-item.active::before {
    display: none;
}


.support-chat-widget .chat-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(255,171,0,0.35), rgba(255,136,0,0.25));
    box-shadow: none;
}

.support-chat-widget:hover .chat-icon {
    transform: translateY(-4px);
}

.mobile-bottom-nav .nav-item .nav-badge {
    position: absolute;
    top: 2px;
    right: 10px;
    background: var(--accent-color);
    color: #000;
    border-radius: 10px;
    padding: 0 6px;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
}

.mobile-bottom-nav .nav-item .nav-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-item-mobile {
    color: #888;
    transition: all 0.3s;
    text-decoration: none;
    font-size: 0.8rem;
}

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

.nav-item-mobile.active, .nav-item-mobile:hover {
    color: var(--accent-color);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0f0f13; 
}
 
::-webkit-scrollbar-thumb {
    background: #333; 
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color); 
}

/* Typography & Utilities */
.text-gradient-gold {
    background: linear-gradient(to right, #ffd700, #ffab00, #ff8800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(255, 171, 0, 0.3);
}

/* Animations */
@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}

.shake {
  animation: shake 0.4s ease-in-out;
}

/* Login Modal Improvements */
#loginModal .modal-content, #registerModal .modal-content {
    background: rgba(20, 20, 25, 0.95);
    border: 1px solid rgba(255, 171, 0, 0.2);
    box-shadow: 0 0 50px rgba(255, 171, 0, 0.15);
}

/* Support Chat Widget */
.support-chat-widget {
    position: fixed;
    bottom: 30px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.chat-box {
    position: fixed;
    bottom: 100px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 350px;
    height: 450px;
    background: rgba(20, 20, 25, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 171, 0, 0.2);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    z-index: 1001;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    overflow: hidden;
    transition: all 0.3s ease;
}

.chat-header {
    background: rgba(255, 171, 0, 0.1);
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-input-area {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 10px;
}

.chat-message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.chat-message.sent {
    align-self: flex-end;
    background: var(--accent-color);
    color: #000;
    border-bottom-right-radius: 2px;
}

.chat-message.received {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-bottom-left-radius: 2px;
}

.chat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-color), #ff8800);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(255, 171, 0, 0.5);
    font-size: 1.6rem;
    color: #000;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.support-chat-widget:hover .chat-icon {
    transform: scale(1.1) rotate(10deg);
}

.chat-tooltip {
    background: rgba(255, 255, 255, 0.95);
    color: #000;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.support-chat-widget:hover .chat-tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* Product Grid View */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.product-card-grid {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    min-height: 160px;
}

.product-card-grid:hover {
    background: rgba(255, 171, 0, 0.1);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.product-card-grid.active {
    background: rgba(255, 171, 0, 0.2);
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(255, 171, 0, 0.3);
}

.product-card-grid .product-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 5px rgba(0,0,0,0.5));
}

.product-card-grid .product-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.3;
}

.product-card-grid .product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(255, 171, 0, 0.3);
}

/* Mobile Adjustments - Critical Logic Preserved */
@media (max-width: 768px) {
    body {
        padding-bottom: 70px;
    }
    /* Hide bottom nav when modal is open to prevent overlap and interaction issues */
    body.modal-open .mobile-bottom-nav {
        display: none !important;
    }

    .modal {
        z-index: 2050 !important; /* Ensure modals are above everything else */
    }
    .modal-backdrop {
        z-index: 2040 !important;
    }
    
    /* Ensure modal content is scrollable and comfortable */
    .modal-dialog {
        margin-bottom: 30px;
        margin-top: 30px;
    }

    /* Fix for Confirm Button visibility in Verification Modal */
    #verificationOrderSummary .d-flex {
        padding-bottom: 24px;
    }
    
    /* Better spacing on mobile */
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Hero Search Bar Mobile Fix */
    .hero-search-bar {
        padding: 3px;
        flex-wrap: nowrap; /* Prevent wrapping */
    }
    
    .hero-search-bar .input-group-text {
        padding-left: 12px;
        font-size: 1rem;
    }
    
    .hero-search-bar input.form-control {
        font-size: 0.95rem;
        padding: 10px 5px;
        width: auto !important; /* Allow shrinking */
        flex: 1 1 auto;
    }
    
    .hero-search-bar button.btn {
        padding: 8px 16px; /* Reduce padding */
        font-size: 0.8rem;
        margin: 3px;
        white-space: nowrap;
    }
    
    /* Adjust grid for mobile */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    /* Mobile Chat Box */
    .chat-box {
        width: 92%;
        height: 60vh;
        bottom: 85px; /* Above mobile bottom nav */
        border-radius: 16px;
    }
    
    .product-card-grid {
        padding: 10px;
        min-height: 140px;
    }
    
    .product-card-grid .product-icon {
        width: 45px;
        height: 45px;
        margin-bottom: 10px;
    }
    
    .product-card-grid .product-title {
        font-size: 0.8rem;
    }
    
    .product-card-grid .product-price {
        font-size: 0.95rem;
    }
}
