/* 
   PRO BROADCAST SCORER - CONTROL PANEL STYLESHEET 
   Optimized for Speed, Accuracy, and Tactile Feedback.
*/

/* 1. SCORING CARD ARCHITECTURE */
.scoring-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    margin-bottom: 20px;
}

/* 2. MAIN SCOREBOARD DISPLAY */
#mainScore {
    color: #ffffff;
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.2);
}

#oversDisplay {
    color: #94a3b8;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
}

/* 3. BATSMAN & BOWLER CARDS */
#strikerCard, #nonStrikerCard {
    transition: all 0.3s ease;
    border-width: 2px !important;
}

#strikerCard {
    background: rgba(251, 191, 36, 0.1) !important;
}

.striker-active-glow {
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
}

#strikerStats, #nonStrikerStats {
    font-family: 'Consolas', monospace;
    letter-spacing: -1px;
}

/* 4. RUN CONTROLLER - THE HEART OF SCORING */
.btn-run {
    width: 70px;
    height: 70px;
    border-radius: 50% !important;
    font-size: 1.8rem !important;
    font-weight: 900 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid transparent !important;
}

.btn-run:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

.btn-run:active {
    transform: scale(0.9);
}

/* Run Specific Colors */
.btn-outline-light.btn-run { background: #334155; color: white; border-color: #475569 !important; }
.btn-success.btn-run { background: #16a34a; color: white; border-color: #4ade80 !important; } /* 4 RUNS */
.btn-warning.btn-run { background: #d97706; color: white; border-color: #fbbf24 !important; } /* 6 RUNS */

/* 5. ACTION BUTTONS (EXTRAS & WICKET) */
.btn-extra {
    font-weight: 800 !important;
    letter-spacing: 1px;
    padding: 12px 25px !important;
    border-radius: 12px !important;
    text-transform: uppercase;
}

.btn-danger {
    background: #ef4444 !important;
    border: none;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
    background: #dc2626 !important;
}

/* 6. DISPLAY CONTROLLER GRID */
.display-controller-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.display-controller-grid .btn {
    font-size: 0.7rem !important;
    font-weight: 800;
    padding: 10px 5px;
    border-radius: 8px;
    background: #0f172a;
    border: 1px solid #334155;
    color: #94a3b8;
    text-transform: uppercase;
}

.display-controller-grid .btn:hover {
    background: #fbbf24;
    color: #000;
    border-color: #fbbf24;
}

.display-controller-grid .btn.active {
    background: #fbbf24;
    color: #000;
}

/* 7. LIVE VIEW PREVIEW WINDOW */
.live-view-window {
    border: 3px solid #fbbf24;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.live-view-header {
    background: #fbbf24;
    color: #000;
    font-weight: 900;
    padding: 6px 15px;
    text-transform: uppercase;
    font-size: 0.75rem;
}

/* 8. OVER HISTORY (Ball by Ball) */
#overHistory {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

#overHistory .ball-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    background: #334155;
    color: white;
    border: 2px solid #475569;
}

.ball-4 { 
    background: #16a34a !important; 
    border-color: #22c55e !important;
}

.ball-6 { 
    background: #d97706 !important; 
    border-color: #fbbf24 !important;
}

.ball-w { 
    background: #ef4444 !important; 
    border-color: #f87171 !important;
}

/* 9. RESPONSIVE OPTIMIZATIONS */
@media (max-width: 992px) {
    #mainScore { font-size: 3.5rem; }
    .btn-run { width: 55px; height: 55px; font-size: 1.3rem !important; }
    .display-controller-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .scoring-card { padding: 15px; }
    .btn-run { width: 50px; height: 50px; font-size: 1.1rem !important; }
}

/* 10. CUSTOM ANIMATIONS FOR SCORER FEEDBACK */
@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.wicket-pulse {
    animation: pulse-red 1.5s infinite;
}