/* =========================================
   1. GLOBAL VARIABLES & RESET
   ========================================= */
:root { 
    --primary-gold: #fbbf24; /* Keep gold as a rare special accent */
    --primary-green: #10b981; /* A signature brand green - vibrant but clean */
    --main-bg: #030712; /* A modern dark gray/off-black background */
    
    /* Sleek glass effect - less opacity, cleaner border */
    --glass-bg: rgba(17, 24, 39, 0.45); 
    --glass-border: rgba(16, 185, 129, 0.15); 
    
    /* Define text levels */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
}

body { 
    margin: 0; padding: 0; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; 
    background-color: var(--main-bg); 
    color: var(--text-primary); 
    -webkit-font-smoothing: antialiased; 
    overflow-x: hidden; 
}

/* =========================================
   2. VIDEO BACKGROUND & LAYOUT
   ========================================= */
.video-background { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -2; background: var(--main-bg); overflow: hidden; }
.video-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; background: linear-gradient(to bottom, rgba(3,7,18,0.85), rgba(0,0,0,0.95)); pointer-events: none; }
.video-background video { 
    position: absolute; top: 50%; left: 50%; min-width: 100vw; min-height: 100vh; width: auto; height: auto; transform: translate(-50%, -50%); object-fit: cover; opacity: 0.3; 
}

.layout-wrapper { padding-top: 100px; width: 100%; max-width: 1400px; margin: 0 auto; display: flex; position: relative; }
.main-content { width: 100%; padding: 10px; padding-bottom: 90px; box-sizing: border-box; }
.page-title { text-align: center; color: var(--text-primary); font-size: 20px; font-weight: 800; margin: 15px 0; text-transform: uppercase; letter-spacing: 2px;}

/* =========================================
   3. NAVIGATION (TOP BAR)
   ========================================= */
.pro-navbar { position: fixed; top: 0; left: 0; width: 100%; height: 70px; display: flex; align-items: center; justify-content: space-between; background: rgba(3, 7, 18, 0.95); padding: 0 20px; box-sizing: border-box; z-index: 1000; border-bottom: 1px solid rgba(16, 185, 129, 0.3); box-shadow: 0 4px 15px rgba(22, 208, 105, 0.597); }
.menu-btn { background: none; border: none; cursor: pointer; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.menu-btn span { display: block; width: 24px; height: 2px; background-color: var(--text-primary); border-radius: 2px; }
.nav-logo { color: white; font-weight: bold; font-size: 22px; font-style: italic; letter-spacing: 1px; display: flex; align-items: center; gap: 15px; text-decoration: none;}
.nav-logo span { color: var(--primary-green); }
.desktop-menu { display: none; }
.nav-right { display: flex; align-items: center; gap: 15px; }
.msg-icon { position: relative; cursor: pointer; display: flex; align-items: center; color: var(--text-primary); }
.msg-icon:hover { color: var(--primary-green); }
.desktop-nav-btns { display: none; }

/* =========================================
   4. MOBILE SIDEBAR & BOTTOM NAV
   ========================================= */
.sidebar { position: fixed; top: 0; left: -100%; width: 280px; height: 100vh; background: rgba(3, 7, 18, 0.98); z-index: 1100; transition: left 0.3s ease; box-shadow: 10px 0 30px rgba(0,0,0,0.8); padding: 20px; box-sizing: border-box; overflow-y: auto; border-right: 1px solid rgba(16, 185, 129, 0.3); }
.sidebar.active { left: 0; } 
.sidebar-close { color: var(--text-secondary); font-size: 36px; cursor: pointer; float: right; line-height: 1; margin-bottom: 20px; }
.sidebar-menu { margin-top: 20px; list-style: none; padding: 0; clear: both; }
.sidebar-menu li a { display: flex; align-items: center; gap: 12px; padding: 15px 0; border-bottom: 1px solid rgba(16, 185, 129, 0.1); color: white; font-size: 14px; text-decoration: none; transition: 0.2s; font-weight: bold; }
.sidebar-menu li a:hover { padding-left: 5px; color: var(--primary-green); }

.bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; background: #030712; border-top: 2px solid var(--primary-green); box-shadow: 0 -4px 15px rgba(0,0,0,0.4); display: flex; justify-content: space-around; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)) 0; z-index: 900; }
.nav-item { display: flex; flex-direction: column; align-items: center; color: var(--text-secondary); text-decoration: none; font-size: 10px; gap: 4px; width: 20%; }
.nav-item.active { color: var(--primary-green); font-weight: bold; }
.nav-item svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.5; fill: none; } 
.nav-circle { background: linear-gradient(135deg, #fbbf24, #d97706); color: #000 !important; width: 50px; height: 50px; border-radius: 50%; display: flex; justify-content: center; transform: translateY(-20px); border: 4px solid #030712; box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4); }

/* =========================================
   5. PC DESKTOP OVERRIDES
   ========================================= */
@media (min-width: 850px) {
    .menu-btn, .bottom-nav, .sidebar { display: none !important; }
    .desktop-nav-btns { display: flex; gap: 10px; align-items: center; margin-left: 20px; }
    .btn-login { background: transparent; border: 2px solid var(--primary-green); color: var(--primary-green); padding: 8px 24px; border-radius: 4px; font-weight: bold; cursor: pointer; transition: 0.2s; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }
    .btn-login:hover { background: rgba(16, 185, 129, 0.1); }
    .desktop-menu { display: flex; align-items: center; gap: 5px; margin-left: 30px; }
    .desktop-menu a { color: #cbd5e1; text-decoration: none; font-size: 12px; font-weight: 700; text-transform: uppercase; padding: 8px 12px; transition: 0.2s; border: 2px solid transparent; border-radius: 4px; }
    .desktop-menu a:hover, .desktop-menu a.active { color: var(--primary-green); border-color: var(--primary-green); background: rgba(16, 185, 129, 0.05); }
    .main-content { margin-left: auto; margin-right: auto; max-width: 1200px; padding: 0px 20px 20px 20px; }
}

/* =========================================
   6. HOME PAGE COMPONENTS
   ========================================= */
.category-scroll { display: flex; overflow-x: auto; gap: 5px; padding-bottom: 10px; margin-top: 5px; scrollbar-width: none; }
.category-scroll::-webkit-scrollbar { display: none; }
.cat-btn { display: flex; align-items: center; gap: 4px; background: var(--glass-bg); border: 1px solid var(--glass-border); padding: 8px 16px; border-radius: 20px; color: var(--text-primary); white-space: nowrap; font-size: 13px; cursor: pointer; transition: 0.2s; font-weight: 500; }
.cat-btn.active { background: var(--primary-green); color: #fff; font-weight: bold; border-color: var(--primary-green); box-shadow: 0 4px 10px rgba(16, 185, 129, 0.4); }
.section-header { padding: 5px 5px 10px 5px; font-size: 14px; font-weight: bold; color: var(--primary-green); text-transform: uppercase; letter-spacing: 1px; }
.match-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 15px; }
.match-card { background: rgba(17, 24, 39, 0.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 12px; border: 1px solid var(--glass-border); overflow: hidden; padding-bottom: 10px; box-shadow: 0 8px 20px rgba(0,0,0,0.4); transition: transform 0.3s ease; }
.match-card:hover { transform: translateY(-3px); }
.match-header { display: flex; justify-content: space-between; padding: 10px 15px; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 11px; color: var(--text-secondary); }
.match-league { padding: 10px 15px 0 15px; font-size: 12px; color: #cbd5e1; font-weight: 600; }
.team-row { display: flex; justify-content: space-between; padding: 6px 15px; font-weight: bold; font-size: 14px; }
@keyframes pulse-green { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); } 70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }
.live-dot { width: 8px; height: 8px; background-color: var(--primary-green); border-radius: 50%; display: inline-block; animation: pulse-green 2s infinite; }
.match-click-area { cursor: pointer; transition: background 0.2s; padding-bottom: 5px; }
.match-click-area:hover { background: rgba(255,255,255,0.02); }

/* =========================================
   7. MATCH DETAILS & BETTING (MATCH.PHP)
   ========================================= */
/* MATCH SCHEDULE CARD */
.match-schedule-card { background: rgba(17, 24, 39, 0.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 2px solid var(--glass-border); border-radius: 12px; padding: 20px; text-align: center; margin-bottom: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.league-name { color: var(--primary-green); font-size: 12px; font-weight: bold; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 10px; }
.team-vs-team { display: flex; justify-content: center; align-items: center; gap: 15px; margin-bottom: 15px; }
.team-vs-team .team { font-size: 20px; font-weight: bold; color: #fff; text-align: center; flex: 1; }
.team-vs-team .vs { font-size: 14px; color: var(--primary-green); font-weight: 800; border: 2px solid var(--primary-green); padding: 4px 10px; border-radius: 8px; }
.match-details { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; font-size: 13px; color: #cbd5e1; font-weight: 500; }
@keyframes pulse-red { 0% { opacity: 1; } 50% { opacity: 0.3; } 100% { opacity: 1; } }

/* BACK TO MATCHES BUTTON */
.btn-back { display: inline-flex; align-items: center; gap: 8px; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); border: 1px solid var(--glass-border); color: var(--primary-green); padding: 8px 24px; border-radius: 25px; text-decoration: none; font-size: 14px; font-weight: bold; text-transform: uppercase; letter-spacing: 0.5px; transition: all 0.2s ease; box-shadow: 0 4px 15px rgba(0,0,0,0.5); }
.btn-back:hover { background: rgba(16, 185, 129, 0.15); border-color: var(--primary-green); transform: translateY(-2px); }

/* TAB SWITCHER */
.view-tabs { display: flex; gap: 10px; margin-bottom: 15px; justify-content: center; }
.tab-btn { background: rgba(0,0,0,0.4); border: 2px solid rgba(255,255,255,0.2); color: white; padding: 8px 20px; border-radius: 25px; font-size: 13px; cursor: pointer; transition: 0.2s; font-weight: bold;}
.tab-btn.active { background: var(--primary-green); color: #fff; border-color: var(--primary-green); box-shadow: 0 4px 10px rgba(16, 185, 129, 0.4); }
.tab-btn:hover:not(.active) { background: rgba(16, 185, 129, 0.15); border-color: var(--primary-green); color: var(--primary-green); }

/* LIVE DASHBOARD (PITCH, TV & STATS) */
.live-dashboard-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 25px; }
@media (min-width: 850px) { .live-dashboard-grid { grid-template-columns: 1.2fr 1fr; } }
.media-column { width: 100%; }

/* 2D PITCH */
.live-pitch-wrapper { background: #0c0c0c; border: 1px solid rgba(255,255,255,0.05); border-radius: 12px; padding: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.8); }
.pitch-field { position: relative; width: 100%; height: 200px; background: repeating-linear-gradient(90deg, #111827, #111827 20px, #030712 20px, #030712 40px); border: 2px solid rgba(255,255,255,0.5); border-radius: 4px; overflow: hidden; }
.pitch-line-center { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: rgba(255,255,255,0.5); transform: translateX(-50%); }
.pitch-circle-center { position: absolute; left: 50%; top: 50%; width: 50px; height: 50px; border: 2px solid rgba(255,255,255,0.5); border-radius: 50%; transform: translate(-50%, -50%); }
.pitch-penalty-left { position: absolute; left: 0; top: 25%; bottom: 25%; width: 15%; border: 2px solid rgba(255,255,255,0.5); border-left: none; }
.pitch-penalty-right { position: absolute; right: 0; top: 25%; bottom: 25%; width: 15%; border: 2px solid rgba(255,255,255,0.5); border-right: none; }
.action-zone { position: absolute; top: 20%; bottom: 20%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.action-right { right: 10%; width: 30%; }
.action-pulse { position: absolute; width: 60px; height: 60px; background: rgba(16, 185, 129, 0.4); border-radius: 50%; animation: attack-pulse 1.5s infinite; z-index: 1;}
.action-text { position: relative; background: rgba(0,0,0,0.8); color: var(--primary-green); font-size: 10px; font-weight: bold; padding: 4px 8px; border-radius: 4px; border: 1px solid var(--primary-green); z-index: 2; white-space: nowrap; transform: translateY(-30px); }
@keyframes attack-pulse { 0% { transform: scale(0.5); opacity: 1; } 100% { transform: scale(2.5); opacity: 0; } }

/* LIVE TV WRAPPER */
.live-tv-wrapper { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 10px 30px rgba(0,0,0,0.8); height: 232px;}

/* DEEP STATS PANEL */
.live-stats-wrapper { background: rgba(17, 24, 39, 0.95); border: 1px solid var(--glass-border); border-radius: 12px; padding: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.8); display: flex; flex-direction: column; justify-content: space-between;}
.stats-title { color: var(--primary-green); font-size: 14px; text-transform: uppercase; margin: 0 0 15px 0; text-align: center; font-weight: bold; letter-spacing: 1px; }
.stat-row { margin-bottom: 12px; }
.stat-labels { display: flex; justify-content: space-between; font-size: 12px; font-weight: bold; margin-bottom: 5px; color: var(--text-primary); }
.stat-bar { display: flex; height: 6px; background: #334155; border-radius: 3px; overflow: hidden; gap: 2px;}
.bar-fill { height: 100%; transition: width 0.5s ease; }
.home-fill { background: var(--primary-green); }
.away-fill { background: var(--text-secondary); }
.card-stats { display: flex; justify-content: space-between; align-items: center; border-top: 1px dashed rgba(255,255,255,0.1); padding-top: 10px; margin-top: 5px; margin-bottom: 0;}
.card-box { display: flex; gap: 5px; }
.y-card, .r-card { padding: 2px 6px; border-radius: 3px; font-size: 11px; font-weight: bold; color: #000; }
.y-card { background: #facc15; }
.r-card { background: #ef4444; color: #fff;}

/* BETTING BOX */
.betting-sheet { background: rgba(17, 24, 39, 0.9); border-radius: 12px; border: 2px solid var(--glass-border); padding: 20px 15px; max-width: 1000px; margin: 0 auto; box-shadow: 0 10px 40px rgba(0,0,0,0.6); }
.odds-layout-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.odds-section { width: 100%; }
@media (min-width: 850px) { .odds-layout-grid { grid-template-columns: 1fr 1fr; gap: 40px; } }

.sheet-header { text-align: center; color: var(--primary-green); font-size: 18px; font-weight: bold; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 1px; }
.odds-table { width: 100%; border-collapse: collapse; margin-bottom: 30px; }
.odds-table th { padding: 8px 5px; border-bottom: 1px solid rgba(255,255,255,0.2); font-size: 13px; font-weight: bold; }
.odds-table th:nth-child(1) { text-align: left; color: var(--primary-green); width: 30%; }
.odds-table th:nth-child(2) { text-align: center; color: #fff; width: 30%; }
.odds-table th:nth-child(3) { text-align: right; color: #fff; width: 40%; }
.odds-table td { padding: 6px 5px; font-size: 14px; vertical-align: middle; }
.odds-table td:nth-child(1) { text-align: left; color: var(--primary-green); font-weight: bold; }
.odds-table td:nth-child(2) { text-align: center; color: #cbd5e1; }
.odds-table td:nth-child(3) { text-align: right; }
.bet-input { background: #fff; border: none; border-radius: 20px; width: 100px; padding: 6px 12px; font-size: 14px; font-weight: bold; text-align: right; color: #000; outline: none; box-shadow: inset 0 2px 4px rgba(0,0,0,0.2); transition: 0.2s; }
.bet-input:focus { box-shadow: 0 0 0 2px var(--primary-green); }

/* INTEGRATED BET ACTION AREA */
.bet-action-area { margin-top: 10px; padding-top: 20px; border-top: 1px dashed rgba(16, 185, 129, 0.4); display: flex; flex-direction: column; gap: 15px; }
.total-row { display: flex; justify-content: space-between; align-items: center; font-size: 18px; color: #fff; font-weight: bold; }
.total-amount { background: #fff; color: #000; padding: 6px 15px; border-radius: 20px; min-width: 120px; text-align: right; font-size: 18px; }
.btn-bet { background: linear-gradient(135deg, #10b981, #059669); color: #fff; width: 100%; border: none; padding: 15px; border-radius: 8px; font-size: 18px; font-weight: bold; text-transform: uppercase; cursor: pointer; box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4); transition: 0.2s; }
.btn-bet:hover { filter: brightness(1.1); transform: translateY(-2px); }

/* =========================================
   8. PROMO & INVITE COMPONENTS
   ========================================= */
.invite-wrapper { max-width: 450px; margin: 20px auto; background: rgba(17, 24, 39, 0.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 12px; overflow: hidden; border: 2px solid var(--glass-border); box-shadow: 0 10px 30px rgba(0,0,0,0.8); }
.invite-header-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; background: rgba(0,0,0,0.3); border-bottom: 1px solid rgba(255,255,255,0.05); }
.invite-header-bar h2 { margin: 0; font-size: 18px; color: var(--primary-green); font-weight: bold; text-transform: uppercase; letter-spacing: 1px; }
.promo-container { position: relative; width: 100%; aspect-ratio: 1 / 1; background: url('https://placehold.co/600x600/111827/10b981?text=Drop+Promo+Image+Here') center/cover; }
.qr-box { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); background: #fff; padding: 8px; border-radius: 8px; border: 3px solid var(--primary-green); text-align: center; box-shadow: 0 10px 25px rgba(0,0,0,0.5); }
.qr-box img { width: 110px; height: 110px; display: block; margin-bottom: 8px; }
.btn-scan { background: linear-gradient(135deg, #10b981, #059669); color: #fff; font-weight: bold; padding: 6px 15px; border-radius: 20px; font-size: 12px; text-transform: uppercase; }

/* =========================================
   9. HISTORY / RECEIPTS
   ========================================= */
.receipt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 15px; }
.receipt-card { background: rgba(17, 24, 39, 0.95); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border: 1px solid var(--glass-border); border-radius: 12px; padding: 15px; }
.receipt-header { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-secondary); border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; margin-bottom: 10px; }
.receipt-match { font-weight: bold; font-size: 15px; margin-bottom: 10px; color: var(--text-primary); }
.receipt-details { background: rgba(0,0,0,0.4); border-radius: 8px; padding: 12px; }
.receipt-row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 13px; color: var(--text-secondary); }
.status-badge { padding: 4px 8px; border-radius: 4px; font-size: 11px; font-weight: bold; text-transform: uppercase; }

/* =========================================
   10. PROFILE 
   ========================================= */
.avatar { width: 70px; height: 70px; background: rgba(16, 185, 129, 0.1); border: 2px solid var(--primary-green); border-radius: 50%; margin: 0 auto 15px auto; display: flex; align-items: center; justify-content: center; }
.menu-list { background: rgba(17, 24, 39, 0.85); border-radius: 12px; overflow: hidden; margin-bottom: 15px; border: 1px solid var(--glass-border); }
.menu-list-item { display: flex; justify-content: space-between; padding: 15px 20px; border-bottom: 1px solid rgba(16, 185, 129, 0.1); color: white; text-decoration: none; font-size: 14px; font-weight: bold; }
.menu-list-item:hover { color: var(--primary-green); }
.agent-avatar { width: 45px; height: 45px; border-radius: 50%; background: rgba(16, 185, 129, 0.1); border: 1px solid var(--primary-green); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: bold; color: var(--primary-green); }
.agent-name { font-weight: bold; color: #fff; font-size: 16px; }
.agent-status { font-size: 12px; color: var(--primary-green); font-weight: bold; margin-top: 2px; }
.bubble-admin { background: rgba(255,255,255,0.1); color: #fff; border-radius: 18px 18px 18px 4px; align-self: flex-start; border: 1px solid rgba(255,255,255,0.05); }
.bubble-player { background: var(--primary-green); color: #fff; font-weight: 500; border-radius: 18px 18px 4px 18px; align-self: flex-end; margin-left: auto; }
.bubble-player .chat-time { color: rgba(255,255,255,0.6); }
.btn-attach { background: none; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0 5px; }
.btn-attach svg { width: 22px; height: 22px; stroke: #94a3b8; stroke-width: 2; fill: none; transition: 0.2s; stroke-linecap: round; stroke-linejoin: round; }
.btn-attach:hover svg { stroke: var(--primary-green); transform: scale(1.1); }
