/* ==========================================================================
   CUSTOM TEAM CSS (FULL MERGE)
   ========================================================================== */

/* --- TEAM-SPECIFIC HELPERS --- */
.team-logo-header {
    height: 100px;
    width: auto;
    object-fit: contain;
}

.team-hero-media {
    height: 200px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
}
.team-hero-media__img {
    max-height: 180px;
    width: auto;
    object-fit: contain;
}

.team-logo-watermark {
    width: 400px;
    max-width: 80%;
    filter: grayscale(100%);
}

.team-award-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.team-lead { line-height: 1.8; }

.table-stats {
    table-layout: fixed;
    width: 100%;
}
.table-stats col.col-match { width: auto; }
.table-stats col.col-shots { width: 120px; }
.table-stats col.col-poss  { width: 100px; }
.table-stats col.col-pass  { width: 90px; }
.table-stats col.col-fouls { width: 80px; }
.table-stats col.col-cards { width: 95px; }
.table-stats col.col-saves { width: 80px; }

.match-cell { white-space: normal; overflow-wrap: anywhere; }
.minw-0 { min-width: 0; }
.flex-1-0 { flex: 1 1 0; }
.progress-w-48 { width: 48px; max-width: 48px; }

.no-adapt-img { height: 200px; object-fit: contain; padding: 1rem; background-color: #f8f9fa; }

/* ==========================================================================
   LINEUP / PITCH STYLES
   (Restored to working version)
   ========================================================================== */
.field {
    background: #228B22; 
    position: relative; 
    width: 100%; 
    max-width: 450px; 
    height: 600px; 
    margin: 20px auto; 
    border: 2px solid white; 
    border-radius: 10px; 
    overflow: hidden; 
}

.line {
    position: absolute; 
    width: 100%; 
    height: 2px; 
    background: white; 
}

.center-circle {
    position: absolute; 
    width: 120px; 
    height: 120px; 
    border: 2px solid white; 
    border-radius: 50%; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
}

.player {
    display: inline-flex; 
    justify-content: center; 
    align-items: center; 
    width: 40px; 
    height: 40px; 
    border-radius: 50%; 
    background-color: #fff; 
    color: #000; 
    font-weight: bold; 
    border: 2px solid #000; 
    position: relative; 
    z-index: 10;
}

.player-row {
    position: absolute; 
    width: 100%; 
    text-align: center; 
    display: flex;
    justify-content: space-around;
    align-items: center;
}

/* ==========================================================================
   MONEYBALL / RATINGS DASHBOARD
   ========================================================================== */

/* --- Header Dashboard --- */
.ratings-dashboard {
    background: white;
    border: 1px solid #eaeaea;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

/* Superscore Circle (0-99) */
.superscore-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-right: 2rem;
    border-right: 1px solid #eee;
}

.superscore-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--main-purple);
    background: linear-gradient(135deg, var(--main-purple) 0%, #5a189a 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 800;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
    font-family: 'Segoe UI', sans-serif;
    margin-bottom: 0.5rem;
}

.elo-badge {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Tactical Rating Bars */
.rating-bar-container {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
}
.rating-bar-container:last-child { margin-bottom: 0; }

.rating-label {
    width: 70px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #6c757d;
    letter-spacing: 0.5px;
}

.progress-rating {
    height: 8px;
    flex-grow: 1;
    background-color: #f1f1f1;
    border-radius: 4px;
    overflow: hidden;
    margin: 0 10px;
}

.progress-rating-bar {
    height: 100%;
    border-radius: 4px;
}

.rating-val {
    width: 30px;
    text-align: right;
    font-weight: 800;
    font-size: 0.9rem;
    color: #212529;
}

/* Tactical Colors */
.bg-attack { background-color: #ef233c; } /* Red */
.bg-defense { background-color: #06d6a0; } /* Green */
.bg-control { background-color: #3a86ff; } /* Blue */

/* --- KPI GRID (Stats Section) --- */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.2rem 1rem;
    text-align: center;
    transition: all 0.2s ease;
}

.kpi-card:hover {
    transform: translateY(-3px);
    background: white;
    box-shadow: 0 8px 15px rgba(0,0,0,0.05);
    border-color: var(--main-purple-border);
}

.kpi-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--main-purple);
    line-height: 1.1;
    margin-bottom: 0.3rem;
}

.kpi-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    color: #6c757d;
    display: block;
}

.kpi-sub {
    font-size: 0.65rem;
    color: #adb5bd;
    margin-top: 4px;
    display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .superscore-box {
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid #eee;
        padding-bottom: 1.5rem;
        margin-bottom: 1.5rem;
    }
}
