/* Modern UI/UX Core Design System - Next-Gen Betting Aesthetics */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
    /* Color Palette */
    --bg-main: #060913;
    --bg-surface: rgba(13, 20, 38, 0.45);
    --bg-surface-glow: rgba(13, 20, 38, 0.7);
    --border-color: rgba(255, 255, 255, 0.05);
    
    /* Neon Curated Accent HSL Accents */
    --accent: hsl(45, 100%, 50%);         /* Golden Yellow */
    --accent-rgb: 254, 190, 16;
    --success: #10b981;
    --success-rgb: 16, 185, 129;
    --error: #f43f5e;
    --error-rgb: 244, 63, 94;
    --info: #0ea5e9;
    --info-rgb: 14, 165, 233;
    
    /* Font family */
    --font-sans: 'Outfit', 'Inter', system-ui, sans-serif;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
    width: 100%;
}

/* Global resets for styling */
* {
    font-family: var(--font-sans);
    letter-spacing: -0.01em;
}

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(14, 165, 233, 0.04) 0%, transparent 40%);
    background-attachment: fixed;
    color: #f3f4f6;
}

/* Custom premium scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 99px;
    transition: background 0.3s;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Premium Glassmorphism Cards */
.glass-card {
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background: var(--bg-surface-glow);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 15px rgba(254, 190, 16, 0.04);
}

/* Header Glass Layout */
.header-glass {
    background: rgba(6, 9, 19, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

/* Glowing buttons and interactive elements */
.deposit-btn-glow {
    background: linear-gradient(135deg, var(--accent), #ff5a36);
    color: #000000 !important;
    font-weight: 800;
    box-shadow: 0 8px 24px rgba(254, 190, 16, 0.3);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.deposit-btn-glow:hover {
    box-shadow: 0 12px 32px rgba(254, 190, 16, 0.5);
    transform: translateY(-2px) scale(1.02);
}
.deposit-btn-glow:active {
    transform: translateY(0) scale(0.98);
}

/* User & Games Dropdowns with Modern Micro-animations */
.user-dropdown, .games-dropdown {
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.97);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: rgba(13, 20, 38, 0.95) !important;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6) !important;
}
.user-menu:hover .user-dropdown,
.user-dropdown.show,
.games-menu:hover .games-dropdown,
.games-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Balance Pill Design */
.balance-pill {
    background: rgba(254, 190, 16, 0.08);
    border: 1px solid rgba(254, 190, 16, 0.2);
    padding: 6px 16px;
    border-radius: 99px;
    box-shadow: inset 0 0 12px rgba(254, 190, 16, 0.05);
    transition: all 0.3s ease;
}
.balance-pill:hover {
    border-color: rgba(254, 190, 16, 0.4);
    background: rgba(254, 190, 16, 0.12);
}

/* Odds and Buttons Interactive click animations */
.odd-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.odd-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}
.odd-btn:active {
    transform: translateY(1px) scale(0.95);
}
.odd-btn.selected {
    background: linear-gradient(135deg, var(--accent), #e29f00) !important;
    color: #000000 !important;
    border-color: transparent !important;
    font-weight: 800;
    box-shadow: 0 0 20px rgba(254, 190, 16, 0.45);
}

/* Live Badge with Breathing Glow Effect */
@keyframes breathing-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(244, 63, 94, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 15px rgba(244, 63, 94, 0.6);
        transform: scale(1.02);
    }
}
.live-badge {
    background: linear-gradient(135deg, #f43f5e, #be123c) !important;
    animation: breathing-glow 2.5s infinite ease-in-out;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 800;
    text-transform: uppercase;
}

/* Sidebar navigation panels active state icon glow */
.sports-nav-item {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 4px solid transparent;
}
.sports-nav-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-left-color: rgba(255, 255, 255, 0.2);
}
.sports-nav-item.active {
    background: rgba(254, 190, 16, 0.06);
    border-left-color: var(--accent);
}
.sports-nav-item.active i {
    color: var(--accent);
    filter: drop-shadow(0 0 8px rgba(254, 190, 16, 0.6));
}

/* Toast Notifications Modern System */
#toast-container {
    position: fixed;
    top: 75px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.toast {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(25px);
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    min-width: 320px;
    max-width: 400px;
    transform: translateX(120%);
    animation: toast-enter 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.toast.toast-exit {
    animation: toast-exit 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--error); }
.toast-info { border-left: 4px solid var(--info); }

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--error); }
.toast-info .toast-icon { color: var(--info); }

.toast-body {
    flex: 1;
}
.toast-title {
    font-weight: 700;
    font-size: 15px;
    color: white;
    margin-bottom: 4px;
}
.toast-message {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    line-height: 1.4;
}
.toast-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    transition: color 0.2s;
}
.toast-close:hover {
    color: white;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    width: 100%;
    animation-name: toast-progress;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}
.toast-success .toast-progress { background: var(--success); }
.toast-error .toast-progress { background: var(--error); }
.toast-info .toast-progress { background: var(--info); }

@keyframes toast-enter {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes toast-exit {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(120%); opacity: 0; }
}
@keyframes toast-progress {
    from { width: 100%; }
    to { width: 0%; }
}

/* Custom Inputs Focus Glow Styles */
input:focus, select:focus, textarea:focus {
    outline: none !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(254, 190, 16, 0.2) !important;
}

/* Responsive tables redesign style */
@media (max-width: 768px) {
    .responsive-table, 
    .responsive-table thead, 
    .responsive-table tbody, 
    .responsive-table th, 
    .responsive-table td, 
    .responsive-table tr {
        display: block;
        width: 100%;
    }
    .responsive-table thead {
        display: none; /* Hide header columns on mobile */
    }
    .responsive-table tr {
        background: rgba(13, 20, 38, 0.6) !important;
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 16px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
        margin-bottom: 16px;
        padding: 12px;
    }
    .responsive-table td {
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 4px;
        text-align: right;
    }
    .responsive-table td:last-child {
        border-bottom: none;
    }
    .responsive-table td::before {
        content: attr(data-label);
        float: left;
        font-weight: 700;
        color: #9ca3af;
        text-align: left;
        font-size: 11px;
        text-transform: uppercase;
    }

    /* Prevent mobile browser zoom on input focus by forcing font size to be at least 16px */
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="search"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* Premium Empty State Layout */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3.5rem 1.5rem;
    background: rgba(13, 20, 38, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    margin-top: 1rem;
}
.empty-state i.fa-ticket {
    font-size: 3.5rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    opacity: 0.85;
    filter: drop-shadow(0 0 15px rgba(254, 190, 16, 0.35));
}

/* Premium Filter Tabs with Swipeable Mobile Overflow */
.filter-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 4px 10px 4px;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    -ms-overflow-style: none; /* Hide scrollbar for IE/Edge */
}
.filter-tabs::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari */
}
.filter-tab {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #9ca3af;
    padding: 8px 18px;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap; /* Prevent multi-line wrapping */
    cursor: pointer;
}
.filter-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}
.filter-tab.active {
    background: linear-gradient(135deg, var(--accent), #e29f00);
    color: #000000;
    border-color: transparent;
    font-weight: 800;
    box-shadow: 0 4px 18px rgba(254, 190, 16, 0.3);
}

/* ==========================================================================
   Mobile Menu Drawer & Overlay
   ========================================================================== */
#mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 6, 14, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
#mobile-menu-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#mobile-menu-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 290px;
    height: 100%;
    background: rgba(10, 15, 30, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 101;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 25px 0 50px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
}
#mobile-menu-drawer.open {
    transform: translateX(0);
}

body.drawer-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

#mobile-menu-toggle {
    touch-action: manipulation;
}

#mobile-menu-close {
    touch-action: manipulation;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

/* User profile section inside mobile drawer */
.drawer-user-profile {
    padding: 0 20px 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 15px;
}
.drawer-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent), #e29f00);
    color: black;
    font-weight: 800;
    font-size: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(254, 190, 16, 0.3);
}

/* Drawer navigation links */
.drawer-nav-item {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 12px;
    padding: 12px 20px;
    color: #9ca3af;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}
.drawer-nav-item:hover {
    color: white;
    background: rgba(255, 255, 255, 0.03);
    border-left-color: rgba(255, 255, 255, 0.2);
}
.drawer-nav-item.active {
    color: var(--accent);
    background: rgba(254, 190, 16, 0.04);
    border-left-color: var(--accent);
}
.drawer-nav-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

/* Accordion style mini games list inside drawer */
.drawer-games-accordion {
    display: flex;
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(255,255,255,0.02);
}
.drawer-games-accordion.open {
    max-height: 500px; /* arbitrary height to fit all games */
}
.drawer-game-link {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 10px;
    padding: 8px 32px;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}
.drawer-game-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
   Premium My Bets Page Styles
   ========================================================================== */
.bet-card {
    background: rgba(13, 20, 38, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.bet-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(13, 20, 38, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 15px rgba(254, 190, 16, 0.03);
}

.bet-card-header {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.01);
}

.bet-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-won {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}
.badge-lost {
    background: rgba(244, 63, 94, 0.1);
    color: #f43f5e;
    border: 1px solid rgba(244, 63, 94, 0.2);
}
.badge-active {
    background: rgba(254, 190, 16, 0.1);
    color: var(--accent);
    border: 1px solid rgba(254, 190, 16, 0.2);
    box-shadow: 0 0 10px rgba(254, 190, 16, 0.1);
}
.badge-void {
    background: rgba(107, 114, 128, 0.1);
    color: #9ca3af;
    border: 1px solid rgba(107, 114, 128, 0.2);
}

.match-card {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.2s;
}
.match-card:hover {
    background: rgba(255, 255, 255, 0.01);
}
.match-card:last-child {
    border-bottom: none;
}

.match-league {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}
.league-logo-sm {
    width: 14px;
    height: 14px;
    border-radius: 2px;
    object-fit: contain;
}

.match-teams {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.team-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}
.team-info.away {
    justify-content: flex-end;
    text-align: right;
}

.team-logo {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.03);
    padding: 2px;
    flex-shrink: 0;
}

.team-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.team-winner {
    color: white;
    font-weight: 700;
}
.team-loser {
    color: rgba(156, 163, 175, 0.4);
}

.score-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    flex-shrink: 0;
}
.score-badge.finished {
    background: rgba(255, 255, 255, 0.06);
}
.score-badge.live {
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.25);
}
.score-digit {
    font-size: 16px;
    font-weight: 800;
    color: white;
}
.score-sep {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.25);
    font-weight: 600;
}

.selection-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-top: 10px;
}

.selection-pick {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sel-result-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}
.sel-result-icon.won {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}
.sel-result-icon.lost {
    background: rgba(244, 63, 94, 0.15);
    color: #f43f5e;
}
.sel-result-icon.pending {
    background: rgba(254, 190, 16, 0.15);
    color: var(--accent);
}

.pick-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}
.pick-value {
    font-size: 12px;
    font-weight: 700;
    color: white;
}

.result-explain {
    padding: 8px 12px;
    margin-top: 8px;
    border-radius: 8px;
    font-size: 11px;
    line-height: 1.4;
}
.result-explain.won {
    background: rgba(16, 185, 129, 0.05);
    color: #34d399;
    border-left: 3px solid #10b981;
}
.result-explain.lost {
    background: rgba(244, 63, 94, 0.05);
    color: #fca5a5;
    border-left: 3px solid #f43f5e;
}
.result-explain.pending {
    background: rgba(254, 190, 16, 0.05);
    color: #fde68a;
    border-left: 3px solid var(--accent);
}

.bet-footer {
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.payout-won {
    color: #10b981;
    font-weight: 800;
    font-size: 16px;
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.3));
}
.payout-lost {
    color: #f43f5e;
    font-weight: 600;
    text-decoration: line-through;
    font-size: 13px;
    opacity: 0.4;
}
.payout-pending {
    color: var(--accent);
    font-weight: 800;
    font-size: 15px;
}

/* Responsive adjustment for bet selections */
@media (max-width: 640px) {
    .match-teams {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .team-info.away {
        justify-content: flex-start;
        text-align: left;
    }
    .score-badge {
        align-self: flex-start;
        padding: 4px 10px;
    }
    .bet-footer {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    .bet-footer .text-right {
        text-align: left;
    }
}


