/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --bg-main: #0f153e;
    --bg-header: #000c24;
    --bg-header-rgb: 11, 15, 25;
    --bg-popup-start: #191f43;
    --bg-popup-end: #273170;
    --primary: #bd1d25;
    --primary-gradient: linear-gradient(135deg, #bd1d25, #8a151b);
    --secondary: #10b981;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --safe-area-top: env(safe-area-inset-top);
    --safe-area-right: env(safe-area-inset-right);
    --safe-area-bottom: env(safe-area-inset-bottom);
    --safe-area-left: env(safe-area-inset-left);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

html, body {
    background-color: var(--bg-main);
}

body {
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
}

.app-container {
    width: 100%;
    padding: 20px;
    padding-bottom: calc(100px + max(12px, env(safe-area-inset-bottom)));
}

.glass-card {
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.header {
    background-color: var(--bg-header);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px 20px;
    margin: -20px -20px 25px -20px;
    /* Offset body padding */
    gap: 10px;
    border-bottom: 1px solid var(--glass-border);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
}

.nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-header);
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    border-top: 1px solid var(--glass-border);
    z-index: 1000;
}

.nav-item.active {
    color: var(--primary);
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.loader {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--bg-popup-start), var(--bg-popup-end));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.avatar {
    background: var(--primary-gradient);
    /* ... other properties remain same via previous view */
}

#header-logo-container {
    flex-shrink: 1;
    max-width: 40%;
}

#header-logo-container img {
    max-height: 32px;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.user-info {
    flex-shrink: 0;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    border: 2px solid var(--glass-border);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.balance-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.balance-amount {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.game-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.game-card {
    position: relative;
    overflow: hidden;
    height: 140px;
    cursor: pointer;
    transition: transform 0.2s;
}

.game-card:active {
    transform: scale(0.95);
}

.game-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.game-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    border-radius: 0 0 20px 20px;
}

.game-name {
    font-size: 14px;
    font-weight: 600;
}

/* iOS-Style Bottom Navigation Bar */
.nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 85px;
    background: rgba(var(--bg-header-rgb, 11, 15, 25), 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    padding-top: 8px;
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    touch-action: manipulation;
    -webkit-user-select: none;
}

.nav-item {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex: 1;
    position: relative;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    padding: 8px 0;
    touch-action: manipulation;
    -webkit-touch-callout: none;
}

.nav-item:active {
    transform: scale(0.85);
}

.nav-item:active .nav-icon {
    animation: navTap 0.3s ease-out;
}

@keyframes navTap {
    0% { transform: scale(1.2) translateY(-2px); }
    100% { transform: scale(1) translateY(0); }
}

.nav-item.nav-home {
    background: var(--primary-gradient);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 20px rgba(99, 102, 241, 0.3);
    flex: none;
    display: flex;
    position: relative;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    touch-action: manipulation;
}

.nav-item.nav-home:active {
    transform: scale(0.88);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5), 0 0 30px rgba(99, 102, 241, 0.5);
}

.nav-item.nav-home::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
    animation: navHomePulse 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes navHomePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

.nav-item.nav-home i {
    color: white;
    font-size: 24px;
    position: relative;
    z-index: 1;
}

.nav-item.active:not(.nav-home) {
    color: var(--primary);
}

.nav-item.active:not(.nav-home)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 3px;
    background: var(--primary);
    border-radius: 1.5px;
    animation: navUnderline 0.4s ease-out;
}

@keyframes navUnderline {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 28px;
        opacity: 1;
    }
}

.nav-icon {
    font-size: 22px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-item.active:not(.nav-home) .nav-icon {
    font-size: 24px;
    animation: navIconBounce 0.5s ease-out;
}

@keyframes navIconBounce {
    0% { transform: scale(0.8) translateY(4px); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1) translateY(0); }
}

/* Draggable Back Button */
#sport-back-btn {
    cursor: grab;
    transition: box-shadow 0.2s ease;
}

#sport-back-btn:active {
    cursor: grabbing;
    box-shadow: -4px 0 25px rgba(0, 0, 0, 0.7), 0 0 20px rgba(189, 29, 37, 0.3) !important;
}

#sport-back-btn:hover {
    box-shadow: -6px 0 20px rgba(0, 0, 0, 0.6) !important;
}


.loader {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--glass);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Slideshow */
.slideshow-container {
    position: relative;
    width: 100%;
    aspect-ratio: 13 / 8;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    touch-action: pan-y;
}

.slides-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-item {
    min-width: 100%;
    height: 100%;
}

.slide-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.slideshow-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s;
}

.dot.active {
    background: #fff;
    width: 18px;
    border-radius: 10px;
}

/* Footer Payment Methods Slider */
@keyframes footerPaymentScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.footer-payment-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 100px;
    flex-shrink: 0;
    white-space: nowrap;
}

.footer-payment-item img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.footer-payment-item span {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
}

@keyframes headerPromoPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* ==========================================================================
   SPORTSBOOK QUICK BETTING WIDGET & BETSLIP DRAWER CSS SYSTEM
   ========================================================================== */

/* Match Feed Wrapper */
.quick-sports-wrapper {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.quick-sports-wrapper::-webkit-scrollbar {
    display: none;
}

/* Glassmorphic Sport Card */
.quick-sport-card {
    min-width: 260px;
    max-width: 280px;
    background: rgba(30, 41, 59, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, border-color 0.2s ease;
    flex-shrink: 0;
}
.quick-sport-card:hover {
    border-color: rgba(16, 185, 129, 0.25);
}

.quick-sport-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 700;
}
.quick-sport-league {
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 6px;
}
.quick-sport-live-badge {
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 800;
}

.quick-sport-teams {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.quick-sport-team-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}
.quick-sport-team-name {
    display: flex;
    align-items: center;
    gap: 8px;
}
.quick-sport-team-icon {
    width: 16px;
    height: 16px;
    color: rgba(255, 255, 255, 0.3);
}
.quick-sport-score {
    color: #10b981;
    font-weight: 900;
    font-size: 14px;
}

/* Odds Grid */
.quick-sport-odds-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 4px;
}
.quick-sport-odds-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 8px 4px;
    color: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: all 0.2s ease;
}
.quick-sport-odds-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}
.quick-sport-odds-btn:active {
    transform: scale(0.95);
}
.quick-sport-odds-btn.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.2) 100%);
    border-color: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}
.quick-sport-odds-btn.odds-up {
    border-color: #10b981 !important;
    background: rgba(16, 185, 129, 0.15) !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
    animation: flashGreen 1.5s ease;
}
.quick-sport-odds-btn.odds-down {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.15) !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
    animation: flashRed 1.5s ease;
}
@keyframes flashGreen {
    0% { background: rgba(16, 185, 129, 0.5); }
    100% { background: rgba(16, 185, 129, 0.15); }
}
@keyframes flashRed {
    0% { background: rgba(239, 68, 68, 0.5); }
    100% { background: rgba(239, 68, 68, 0.15); }
}
.quick-sport-odds-btn-label {
    font-size: 9px;
    opacity: 0.5;
    font-weight: 800;
}
.quick-sport-odds-btn-val {
    font-size: 12px;
    font-weight: 900;
    color: #10b981;
}

/* Betslip Bottom Drawer */
.betslip-drawer {
    position: fixed;
    inset: 0;
    z-index: 100002;
    visibility: hidden;
    transition: visibility 0.3s ease;
}
.betslip-drawer.active {
    visibility: visible;
}

.betslip-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.betslip-drawer.active .betslip-overlay {
    opacity: 1;
}

.betslip-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #0f172a;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px 24px 0 0;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.betslip-drawer.active .betslip-content {
    transform: translateY(0);
}

.betslip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
}
.betslip-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.betslip-match-details {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 12px;
}
.betslip-league {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 800;
    margin-bottom: 4px;
}
.betslip-teams {
    font-size: 14px;
    font-weight: 800;
    color: white;
    margin-bottom: 6px;
}
.betslip-selection {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}
.betslip-odds-badge {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
    border-radius: 6px;
    padding: 1px 6px;
    font-weight: 900;
    margin-left: 4px;
}

.betslip-wallet-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.betslip-wallet-option {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.betslip-wallet-option.active {
    background: rgba(16, 185, 129, 0.08);
    border-color: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

.betslip-quick-stakes {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    margin-top: 8px;
}
.betslip-quick-stakes button {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px 0;
    color: white;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
}
.betslip-quick-stakes button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.betslip-summary {
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    padding-top: 12px;
}

.betslip-submit-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    padding: 14px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}
.betslip-submit-btn:hover {
    opacity: 0.95;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}
.betslip-submit-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    box-shadow: none;
}

/* Betting History Items */
.sport-bet-card {
    background: rgba(30, 41, 59, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.sport-bet-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 6px;
}
.sport-bet-badge {
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 9px;
}
.sport-bet-badge.pending {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.sport-bet-badge.won {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.sport-bet-badge.lost {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.sport-bet-teams-title {
    font-size: 13px;
    font-weight: 800;
    color: white;
}
.sport-bet-detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}
.sport-bet-detail-label {
    color: rgba(255, 255, 255, 0.55);
}
.sport-bet-detail-val {
    font-weight: 700;
    color: white;
}
.sport-bet-detail-val.win {
    color: #10b981;
    font-weight: 800;
}

/* Heartbeat & Pulse Animations for Live Match Indicators */
@keyframes supportPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45);
        transform: scale(0.92);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
        transform: scale(0.92);
    }
}

@keyframes pulseOp {
    0% { opacity: 0.35; }
    50% { opacity: 1; }
    100% { opacity: 0.35; }
}