/* ==========================================================================
   EC CRICK - LIGHTER SPORTS STADIUM BROADCAST THEME (v4.0)
   Palette: Lighter Steel Slate (#1c334d) + Sports Cyan (#38bdf8) + Turf Emerald (#34d399)
   Noticeably lighter, rich in color, perfectly harmonized, zero black cut-offs
   ========================================================================== */

:root {
    --bg-page: #1c334d;
    --bg-card: rgba(40, 68, 100, 0.94);
    --bg-card-hover: rgba(48, 80, 116, 0.97);
    --bg-inner: rgba(26, 48, 72, 0.95);
    
    --text-primary: #ffffff;
    --text-secondary: #f1f5f9;
    --text-muted: #cbd5e1;
    
    --brand-emerald: #10b981;
    --brand-emerald-glow: rgba(16, 185, 129, 0.45);
    --brand-cyan: #38bdf8;
    --brand-cyan-glow: rgba(56, 189, 248, 0.45);
    --brand-crimson: #f43f5e;
    --brand-gold: #fbbf24;
    
    --card-border: rgba(125, 211, 252, 0.28);
    --card-border-active: rgba(52, 211, 153, 0.6);
}

/* Continuous Lighter Sports Atmosphere (Edge-to-Edge) */
html {
    min-height: 100%;
    background-color: #1c334d !important;
    background: #1c334d !important;
    color: #f1f5f9;
}

body {
    min-height: 100vh;
    height: auto !important;
    background-color: #1c334d !important;
    background-image: 
        radial-gradient(ellipse 85% 50% at 50% -10%, rgba(56, 189, 248, 0.25), transparent 70%),
        radial-gradient(ellipse 70% 45% at 90% 20%, rgba(52, 211, 153, 0.22), transparent 70%),
        radial-gradient(ellipse 70% 45% at 10% 85%, rgba(56, 189, 248, 0.18), transparent 70%),
        linear-gradient(180deg, #223e5e 0%, #1a3048 50%, #162a40 100%) !important;
    background-attachment: fixed !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
    color: #f1f5f9 !important;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow-x: hidden;
}

/* ==========================================================================
   AMBIENT STADIUM BACKDROP & BREATHING LIGHT ORBS
   ========================================================================== */

.cricket-stadium-backdrop {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.stadium-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.95;
}

/* Soft Breathing Ambient Light Orbs (Gentle & Premium) */
.stadium-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    opacity: 0.45;
    will-change: transform;
    animation: orbBreathe 14s ease-in-out infinite alternate;
}

.orb-cyan {
    top: -100px;
    right: 15%;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.45) 0%, transparent 70%);
}

.orb-emerald {
    top: 35%;
    left: -120px;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.35) 0%, transparent 70%);
    animation-duration: 18s;
}

.orb-gold {
    bottom: -150px;
    right: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.25) 0%, transparent 70%);
    animation-duration: 16s;
}

@keyframes orbBreathe {
    0% { transform: scale(0.95) translate(0, 0); opacity: 0.35; }
    50% { transform: scale(1.1) translate(30px, -20px); opacity: 0.55; }
    100% { transform: scale(1) translate(-20px, 20px); opacity: 0.4; }
}

/* ==========================================================================
   ELEVATED LIGHTER SPORTS CARDS & PANELS
   ========================================================================== */

.cricket-card {
    background: var(--bg-card) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border) !important;
    box-shadow: 0 10px 28px 0 rgba(10, 24, 40, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
    color: var(--text-secondary) !important;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.cricket-card:hover {
    background: var(--bg-card-hover) !important;
    border-color: var(--card-border-active) !important;
    box-shadow: 0 16px 36px -4px rgba(10, 24, 40, 0.5), 0 0 20px -2px rgba(52, 211, 153, 0.3) !important;
    transform: translateY(-2px);
}

.glass-panel {
    background: var(--bg-card) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border) !important;
    box-shadow: 0 10px 28px 0 rgba(10, 24, 40, 0.35) !important;
    color: var(--text-secondary) !important;
}

/* Headings Contrast */
.cricket-card h1, .cricket-card h2, .cricket-card h3,
.glass-panel h1, .glass-panel h2, .glass-panel h3 {
    color: #ffffff !important;
    font-weight: 800;
}

/* Sub-containers & inner blocks inside cards */
.cricket-card .bg-slate-900,
.glass-panel .bg-slate-900,
.cricket-card .bg-slate-900\/80,
.cricket-card .bg-slate-900\/60,
.glass-panel .bg-slate-900\/60 {
    background-color: var(--bg-inner) !important;
    border-color: rgba(125, 211, 252, 0.22) !important;
}

.cricket-card .text-slate-300,
.glass-panel .text-slate-300 {
    color: #f1f5f9 !important;
}

.cricket-card .text-slate-400,
.glass-panel .text-slate-400 {
    color: #cbd5e1 !important;
}

.cricket-card .text-white,
.glass-panel .text-white {
    color: #ffffff !important;
}

/* ==========================================================================
   FORM CONTROLS & INPUTS (Clean Lighter Contrast)
   ========================================================================== */

.cricket-card input, .cricket-card select, .cricket-card textarea,
.glass-panel input, .glass-panel select, .glass-panel textarea,
body input:not([type="checkbox"]):not([type="radio"]),
body select,
body textarea {
    background-color: #19314c !important;
    color: #ffffff !important;
    border: 1px solid #3c6591 !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border-radius: 0.75rem;
}

body input::placeholder,
body textarea::placeholder {
    color: #cbd5e1 !important;
}

body input:focus, body select:focus, body textarea:focus {
    border-color: #34d399 !important;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.35) !important;
    outline: none !important;
}

body select option {
    background-color: #19314c !important;
    color: #ffffff !important;
}

/* Match Header Strip */
.stadium-strip {
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.2) 0%, rgba(52, 211, 153, 0.18) 50%, rgba(244, 63, 94, 0.12) 100%) !important;
    border-bottom: 1px solid rgba(125, 211, 252, 0.25) !important;
}

/* Cricket Pitch Turf Strip Decoration */
.pitch-strip {
    height: 4px;
    background: linear-gradient(90deg, #10b981 0%, #14b8a6 25%, #fbbf24 50%, #38bdf8 75%, #10b981 100%);
    border-radius: 9999px;
}

/* ==========================================================================
   BALL-BY-BALL BROADCAST CHIPS
   ========================================================================== */

.ball-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    transition: transform 0.15s ease;
    user-select: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
}

.ball-chip:hover {
    transform: scale(1.15);
}

.ball-dot {
    background: #254265;
    color: #e2e8f0;
    border: 1px solid #3c6591;
}

.ball-run {
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    color: #ffffff;
    border: 1px solid rgba(125, 211, 252, 0.5);
}

.ball-four {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #032417;
    font-weight: 900;
    border: 1px solid #34d399;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.ball-six {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #ffffff;
    font-weight: 900;
    border: 1px solid #c084fc;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.55);
}

.ball-wicket {
    background: linear-gradient(135deg, #e11d48, #f43f5e);
    color: #ffffff;
    font-weight: 900;
    border: 1px solid #fda4af;
    box-shadow: 0 0 12px rgba(244, 63, 94, 0.6);
}

.ball-extra {
    background: linear-gradient(135deg, #d97706, #fbbf24);
    color: #241401;
    font-weight: 800;
    border: 1px solid #fde68a;
}

/* ==========================================================================
   BUTTONS (Tactile & High Contrast)
   ========================================================================== */

.btn-cricket-primary {
    background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%) !important;
    color: #042618 !important;
    font-weight: 800 !important;
    box-shadow: 0 6px 20px -3px rgba(16, 185, 129, 0.45) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-cricket-primary:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 10px 24px -3px rgba(16, 185, 129, 0.6) !important;
    filter: brightness(1.06);
}
.btn-cricket-primary:active {
    transform: scale(0.97);
}

.btn-cricket-danger {
    background: linear-gradient(135deg, #f43f5e 0%, #be123c 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    box-shadow: 0 6px 20px -3px rgba(244, 63, 94, 0.45) !important;
}

.btn-cricket-gold {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #241401 !important;
    font-weight: 800 !important;
    box-shadow: 0 6px 20px -3px rgba(245, 158, 11, 0.45) !important;
}

.btn-cricket-glass {
    background: rgba(30, 52, 78, 0.85) !important;
    border: 1px solid rgba(125, 211, 252, 0.3) !important;
    color: #ffffff !important;
    font-weight: 700;
}
.btn-cricket-glass:hover {
    background: rgba(40, 68, 100, 0.95) !important;
    border-color: rgba(52, 211, 153, 0.6) !important;
}

/* ==========================================================================
   NAVIGATION & MOBILE DOCK
   ========================================================================== */

header.cricket-card, header {
    background: rgba(26, 46, 70, 0.95) !important;
    backdrop-filter: blur(18px) !important;
    border-bottom: 1px solid rgba(125, 211, 252, 0.25) !important;
}

/* ==========================================================================
   MOBILE BOTTOM DOCK (NATIVE SPORTS APP TAB BAR)
   ========================================================================== */

@media (min-width: 768px) {
    .mobile-bottom-dock {
        display: none !important;
    }
}

@media (max-width: 767px) {
    body {
        padding-bottom: 84px !important;
    }

    .mobile-bottom-dock {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 9999 !important;
        background: rgba(22, 40, 62, 0.98) !important;
        backdrop-filter: blur(24px) !important;
        -webkit-backdrop-filter: blur(24px) !important;
        border-top: 1px solid rgba(52, 211, 153, 0.35) !important;
        box-shadow: 0 -8px 25px rgba(5, 12, 22, 0.5) !important;
        padding-top: 6px !important;
        padding-bottom: max(8px, env(safe-area-inset-bottom, 8px)) !important;
        display: flex !important;
        align-items: flex-end !important;
        justify-content: space-around !important;
    }

    /* Support both grid wrapper and direct items */
    .mobile-bottom-dock > .grid {
        width: 100% !important;
    }

    .mobile-bottom-dock .dock-item,
    .mobile-bottom-dock .mobile-tab-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 1 !important;
        padding: 4px 2px !important;
        color: #94a3b8 !important;
        text-decoration: none !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        letter-spacing: -0.01em !important;
        transition: color 0.15s ease, transform 0.15s ease !important;
        min-height: 48px !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    .mobile-bottom-dock .dock-item i,
    .mobile-bottom-dock .mobile-tab-item i {
        font-size: 17px !important;
        margin-bottom: 2px !important;
        transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.15s ease !important;
    }

    .mobile-bottom-dock .dock-item.active,
    .mobile-bottom-dock .mobile-tab-item.active,
    .mobile-bottom-dock .dock-item:active,
    .mobile-bottom-dock .mobile-tab-item:active {
        color: #34d399 !important;
    }

    .mobile-bottom-dock .dock-item.active i,
    .mobile-bottom-dock .mobile-tab-item.active i {
        transform: translateY(-2px) scale(1.15) !important;
        color: #34d399 !important;
    }

    .mobile-bottom-dock .dock-item.active::after,
    .mobile-bottom-dock .mobile-tab-item.active::after {
        content: '';
        display: block;
        width: 14px;
        height: 3px;
        border-radius: 9999px;
        background: #34d399;
        margin-top: 2px;
        box-shadow: 0 0 8px rgba(52, 211, 153, 0.8);
    }
}

.mobile-fab-center {
    width: 48px;
    height: 48px;
    margin-top: -20px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%) !important;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.6), 0 4px 10px rgba(0, 0, 0, 0.35) !important;
    border: 3px solid #1c334d !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #042618 !important;
    font-size: 20px;
    transition: transform 0.15s ease;
}

.mobile-fab-center:active {
    transform: scale(0.92);
}

/* Animations */
@keyframes ballSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.animate-ball-spin {
    display: inline-block;
    animation: ballSpin 8s linear infinite;
}

@keyframes livePulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.8); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.live-turf-beacon {
    animation: livePulse 2.2s infinite ease-in-out;
}

/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #1c334d;
}
::-webkit-scrollbar-thumb {
    background: #3c6591;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #10b981;
}
