/* 
   ANALYTICS GLOBAL STYLING & SPINNER 
   UK SOCCER LEAGUES
*/

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f1f5f9;
    color: #1e293b;
    margin: 0;
    padding: 0;
}

/* Spinner Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.3s ease;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #e2e8f0;
    border-top: 6px solid #4f46e5;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.loading-text {
    margin-top: 1.5rem;
    font-weight: 600;
    color: #4f46e5;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* General Layout Utilities */
.analytics-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

@media (max-width: 768px) {
    .analytics-container {
        margin: 1rem auto;
        padding: 0 1rem;
    }
}

.card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
    padding: 2rem;
    margin-bottom: 2rem;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    transition: color 0.2s;
}

.back-btn:hover { color: #4f46e5; }

/* Responsive Utilities */
@media (max-width: 768px) {
    h1 { font-size: 1.75rem !important; margin-bottom: 1.5rem !important; }
    .card { padding: 1.25rem !important; }
    .modern-grid th, .modern-grid td, 
    .stats-gridview th, .stats-gridview td,
    .discipline-grid th, .discipline-grid td { 
        padding: 0.6rem 0.5rem !important; 
        font-size: 0.75rem !important; 
    }
    .badge-yellow, .badge-red, .badge-card { min-width: 28px !important; padding: 0.15rem 0.35rem !important; }
}

.table-responsive {
    width: 100%;
    margin-bottom: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Ensure tables inside responsive wrapper don't shrink too much */
.table-responsive table {
    min-width: 600px;
}

/* Result Indicators - Thin Colored Bands (W/D/L) - Based on Clubs.aspx */
.score-container {
    display: inline-flex;
    align-items: stretch;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 60px;
    height: 32px;
}

.result-badge {
    width: 6px;
    display: block;
    flex-shrink: 0;
}

.badge-w { background: #10b981 !important; } /* Green */
.badge-l { background: #ef4444 !important; } /* Red */
.badge-d { background: #94a3b8 !important; } /* Gray */
.badge-a { background: #ef4444 !important; } /* Red for Abandoned */

.score-banner {
    background: #1e293b !important;
    color: white !important;
    padding: 0 0.75rem !important;
    font-weight: 800 !important;
    font-size: 0.9rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

/* Winner & Top Performer Highlights */
.winner-text { 
    color: #059669 !important; 
    font-weight: 800 !important; 
}
.winner-row { background: rgba(16, 185, 129, 0.04) !important; }
.winner-row:hover { background: rgba(16, 185, 129, 0.08) !important; }
