/* ==========================================================================
   BDCAST PRO: FOOTBALL EDITION - BASE STYLES
   ========================================================================== */

body { 
    background-color: #020617; 
    color: white; 
    font-family: 'Oswald', sans-serif; 
    overflow-x: hidden; 
    touch-action: manipulation; 
}

.font-score { font-family: 'Teko', sans-serif; }
.font-text { font-family: 'Oswald', sans-serif; }

/* Force transparent overlay for OBS/vMix */
body.overlay-mode { background-color: transparent !important; }
#view-overlay { background-color: transparent; }

/* --- CUSTOM SCROLLBARS --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(71, 85, 105, 0.5); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(100, 116, 139, 0.8); }

/* ==========================================================================
   UI HELPERS & FORMS
   ========================================================================== */

.view { display: none !important; min-height: 100dvh; flex-direction: column; }
.view.active { display: flex !important; }

/* Modal & Input styling */
#modal-overlay { backdrop-filter: blur(5px); }
.input-dark { background-color: #0f172a !important; color: white !important; border: 1px solid #334155; border-radius: 0.25rem; }

/* Button press feedback */
button { transition: all 0.1s ease-in-out; }
button:active { transform: scale(0.95); }

/* ==========================================================================
   BROADCAST OVERLAY ANIMATIONS & STATES
   ========================================================================== */

/* The Scorebug (Top Left) 
   We use a subtle drop shadow to make it pop against bright green pitches.
*/
#fb-scorebug {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(255,255,255,0.2);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
}

/* Stoppage Time (+3) Slide Animation 
*/
#o-stoppage {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    transform: translateY(100%);
    opacity: 0;
}
#o-stoppage.active {
    transform: translateY(0);
    opacity: 1;
    display: block !important;
}

/* Lower-Third Event Card (Goal, Yellow Card, Red Card)
   These classes are toggled by JS to slide the card up from the bottom.
*/
#fb-event-card.show {
    opacity: 1 !important;
    transform: translateY(0) translateX(-50%) !important;
}

/* Specific Event Color Themes */
.event-theme-goal #fb-event-header { border-top-color: #10b981; color: #10b981; }
.event-theme-goal #fb-event-time { color: #10b981; }

.event-theme-yellow #fb-event-header { border-top-color: #eab308; color: #eab308; }
.event-theme-yellow #fb-event-time { color: #eab308; }

.event-theme-red #fb-event-header { border-top-color: #ef4444; color: #ef4444; }
.event-theme-red #fb-event-time { color: #ef4444; }

.event-theme-sub #fb-event-header { border-top-color: #3b82f6; color: #3b82f6; }
.event-theme-sub #fb-event-time { color: #3b82f6; }

/* ==========================================================================
   ADMIN / SCORER UI ELEMENTS
   ========================================================================== */

/* Timeline styling for the Scorer dashboard */
.timeline-event-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 6px;
    border-left: 3px solid #475569;
    margin-bottom: 4px;
    font-size: 0.8rem;
}

.timeline-goal { border-left-color: #10b981; }
.timeline-yellow { border-left-color: #eab308; }
.timeline-red { border-left-color: #ef4444; }

/* ==========================================================================
   MOBILE & RESPONSIVE ADJUSTMENTS
   ========================================================================== */
@media (max-width: 768px) {
    #fb-scorebug {
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        height: 40px; /* Slightly smaller for mobile streams */
    }
    
    #fb-scorebug > div {
        padding: 0 10px;
    }
    
    #fb-scorebug .text-2xl { font-size: 1.25rem; }
    #fb-scorebug .text-3xl { font-size: 1.5rem; }

    #fb-event-card {
        bottom: 20px;
        width: 95%;
    }
    
    #fb-event-player { font-size: 1.8rem; }
    #fb-event-time { font-size: 2rem; }
}
