/* ==========================================================================
   ArenaX Ultra-Premium Responsive Glassmorphism Core Layout Engine
   Safe Mode: UTF-8 Encoding Standard | 0% Persian Characters in Comments
   ========================================================================== */

:root {
    --bg-dark: #060b11;
    --neon-green: #39FF14;
    --neon-blue: #00f0ff;
    --neon-red: #ff3366;
    --text-white: #ffffff;
    --text-gray: #8292a6;
    --crystal-glass: rgba(255, 255, 255, 0.03);
    --crystal-border: rgba(255, 255, 255, 0.09);
    --crystal-shadow: rgba(0, 0, 0, 0.65);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

.stadium-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url('../images/backgrond.png') no-repeat center center;
    background-size: cover;
    filter: brightness(0.3) contrast(1.15);
    z-index: -1;
}

/* ANTI-COLLAPSE RIGID CONTAINER PIPELINE */
#app-container {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport safety for mobile web wrappers */
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.flex-fixed-element {
    flex-shrink: 0; /* Totally locks dimensions from compressing during height changes */
}

/* NATIVE LOOK APP SCROLL ENGINE WITH EMBEDDED PADDING GUARD */
#main-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Butter-smooth haptic scrolling on iOS wrappers */
    padding: 8px 16px 100px 16px; /* 100px bottom cushion prevents content from bleeding beneath nav dock */
}

/* PREMIUM CYBERPUNK CUSTOM SCROLLBAR DOCK */
#main-content::-webkit-scrollbar {
    width: 4px;
}
#main-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
#main-content::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.2);
    border-radius: 10px;
}

/* PURE TRANSPARENT 3D GLASS PANEL BLUEPRINT */
.glass-panel {
    background: var(--crystal-glass);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--crystal-border);
    border-radius: 16px;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.08), 0 16px 36px var(--crystal-shadow);
}

#main-header {
    padding: 16px 16px 6px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.header-logos {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wc-logo, .arenax-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.user-stats-box {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 700;
}

.stat-label { color: var(--text-gray); }
.neon-green {
    color: var(--neon-green);
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.35);
}

.tab-section { display: none; width: 100%; flex-direction: column; }
.tab-section.active { display: flex; }
.section-title { font-size: 1.3rem; text-align: center; text-transform: uppercase; margin: 12px 0; line-height: 1.2; }

/* MATCHES VIEW CARD */
.match-card { padding: 18px 14px; text-align: center; margin-bottom: 20px; }
.teams-display { display: flex; justify-content: space-around; align-items: center; font-size: 1rem; font-weight: 800; }
.team { display: flex; align-items: center; gap: 10px; }
.vs { color: var(--neon-green); font-style: italic; font-weight: 900; }
.countdown-timer { font-size: 1.2rem; margin: 12px 0; font-weight: 600; letter-spacing: 0.05em; }
.neon-text { text-shadow: 0 0 6px rgba(255, 255, 255, 0.25); }

.prediction-options { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; }

/* 3D MATTE CRYSTAL BUTTONS WITH TRUE EXTRACTED SHADOW HAPTICS */
.glass-btn-3d {
    flex: 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 12px 4px;
    border-radius: 12px;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 4px 8px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
}

.glass-btn-3d[data-choice="1"]:hover, .glass-btn-3d[data-choice="1"].selected {
    border-color: var(--neon-green);
    color: var(--neon-green);
    background: rgba(57, 255, 20, 0.04);
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.25), inset 0 0 6px rgba(57, 255, 20, 0.15);
}
.glass-btn-3d[data-choice="X"]:hover, .glass-btn-3d[data-choice="X"].selected {
    border-color: var(--neon-blue);
    color: var(--neon-blue);
    background: rgba(0, 240, 255, 0.04);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.25), inset 0 0 6px rgba(0, 240, 255, 0.15);
}
.glass-btn-3d[data-choice="2"]:hover, .glass-btn-3d[data-choice="2"].selected {
    border-color: var(--neon-red);
    color: var(--neon-red);
    background: rgba(255, 51, 102, 0.04);
    box-shadow: 0 0 15px rgba(255, 51, 102, 0.25), inset 0 0 6px rgba(255, 51, 102, 0.15);
}

.action-center { display: flex; flex-direction: column; align-items: center; margin-top: 5px; gap: 8px; }
.football-orb { width: 100px; height: 100px; cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 50px !important;}
.football-asset { width: 100px; height: 100px; object-fit: contain; }
.submit-text { font-weight: 800; letter-spacing: 0.05em; font-size: 0.8rem; }
.neon-blue { color: var(--neon-blue); text-shadow: 0 0 8px rgba(0, 240, 255, 0.35); }

/* LEADERBOARD VIEW */
.podium-display { display: flex; justify-content: space-between; align-items: flex-end; margin: 15px 0; gap: 8px; }
.podium-spot { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 12px 6px; text-align: center; height: 110px; }
.podium-spot.first { height: 130px; border-color: rgba(255, 215, 0, 0.2); }
.medal-asset { width: 26px; height: 39px; object-fit: contain; margin-bottom: 6px; }
.medal-asset.main-gold { width: 32px; height: 48px; }
.rank-name { font-size: 0.75rem; font-weight: 600; max-width: 85px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-pts { font-size: 0.7rem; color: var(--neon-green); margin-top: 2px; }
.elite-glow { box-shadow: 0 0 20px rgba(255, 215, 0, 0.1), inset 0 1px 2px rgba(255, 255, 255, 0.1); }

.leaderboard-list { display: flex; flex-direction: column; gap: 6px; padding: 10px; }
.lb-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: rgba(255,255,255,0.01); border-radius: 10px; }
.user-capsule-trigger { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; }

/* GAIN POINTS VIEW */
.energy-card { display: flex; align-items: center; gap: 14px; padding: 14px; margin-bottom: 12px; }
.tank-asset { width: 44px; height: 44px; object-fit: contain; }
.energy-info h3, .tasks-section h3, .referral-zone h3, .ton-progress h3 { font-size: 0.9rem; margin-bottom: 2px; }
.tasks-section, .referral-zone, .ton-progress { padding: 14px; margin-bottom: 12px; }
.task-list { list-style: none; margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.task-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; background: rgba(255,255,255,0.01); border-radius: 8px; }
.task-meta h4 { font-size: 0.75rem; }
.task-meta span { font-size: 0.65rem; color: var(--neon-green); }

.cyber-border {
    border: 1px solid rgba(0, 240, 255, 0.25);
    background: rgba(0, 240, 255, 0.03);
    color: #fff;
    border-radius: 6px;
    padding: 5px 12px;
    font-weight: 700;
    font-size: 0.7rem;
    cursor: pointer;
}
.ref-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 0.75rem; }

.ton-progress { display: flex; align-items: center; gap: 14px; }
.ton-asset { width: 40px; height: 40px; object-fit: contain; }
.ton-info { flex: 1; }
.progress-bar-container { width: 100%; height: 6px; background: rgba(0,0,0,0.4); border-radius: 3px; margin: 4px 0; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--neon-blue), var(--neon-green)); }
.premium-glow { box-shadow: 0 0 20px rgba(0, 240, 255, 0.08); }

/* FLOATING NAVIGATION DOCK */
#bottom-nav {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    height: 68px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 8px;
    z-index: 100;
    border-radius: 20px;
    background: rgba(10, 17, 26, 0.85);
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-gray);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    width: 30%;
    height: 100%;
    justify-content: center;
    transition: color 0.25s ease;
}
.nav-btn .nav-label { font-size: 0.75rem; font-weight: 600; }
.nav-btn.active {
    color: var(--neon-blue);
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

/* MODAL NOTIFICATION PANELS */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(3, 6, 10, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}
.modal-box { width: 100%; max-width: 320px; padding: 20px; text-align: center; background: rgba(13, 22, 33, 0.9); }
.modal-content h3 { margin-bottom: 8px; font-size: 1.1rem; }
.modal-content p { font-size: 0.85rem; color: var(--text-gray); margin-bottom: 16px; line-height: 1.4; }
.hidden { display: none !important; }