/* assets/css/matches.css */

/* -----------------------------------------------------------
   1. LAYOUT & CONTAINER
----------------------------------------------------------- */
.container { 
    padding-top: 20px; 
    padding-bottom: 60px; 
}

.matches-list-container { 
    min-height: 300px; 
    transition: opacity 0.3s; 
}
.matches-list-container.loading { 
    opacity: 0.5; 
    pointer-events: none; 
}
.matches-list { 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
}


/* -----------------------------------------------------------
   2. ROUND SLIDER (OBEN)
----------------------------------------------------------- */
.slider-container-outer { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    margin-bottom: 30px; 
    position: relative; 
}

.slider-btn { 
    background: var(--bg-card); 
    border: 1px solid var(--border); 
    color: var(--text-main); 
    width: 40px; height: 40px; 
    border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; 
    cursor: pointer; 
    font-size: 20px; 
    transition: all 0.2s; 
    flex-shrink: 0; 
    z-index: 2; 
}
.slider-btn:hover { 
    border-color: var(--primary); 
    color: var(--primary); 
    transform: scale(1.1); 
}

.slider-wrapper { 
    flex-grow: 1; 
    overflow: hidden; 
    position: relative; 
    mask-image: linear-gradient(to right, transparent, black 20px, black calc(100% - 20px), transparent); 
    -webkit-mask-image: linear-gradient(to right, transparent, black 20px, black calc(100% - 20px), transparent); 
}

.round-slider { 
    display: flex; 
    gap: 8px; 
    overflow-x: auto; 
    padding: 10px 20px; 
    scroll-behavior: smooth; 
    scrollbar-width: none; 
}
.round-slider::-webkit-scrollbar { display: none; }

.round-pill { 
    flex: 0 0 auto; 
    background: var(--bg-card); 
    border: 1px solid var(--border); 
    color: var(--text-muted); 
    padding: 8px 20px; 
    border-radius: 100px; 
    font-size: 14px; 
    font-weight: 600; 
    cursor: pointer; 
    transition: all 0.2s; 
    user-select: none;
}
.round-pill:hover { 
    border-color: var(--text-main); 
    color: var(--text-main); 
}
.round-pill.active { 
    background: var(--primary); 
    color: #022c22; 
    border-color: var(--primary); 
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4); 
    transform: scale(1.05); 
    font-weight: 700;
}


/* -----------------------------------------------------------
   3. MODERN MATCH CARD
----------------------------------------------------------- */
.match-link { text-decoration: none; display: block; }

.match-card-modern {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0;
    display: grid;
    grid-template-columns: 90px 1fr 140px 1fr; 
    align-items: stretch;
    transition: transform 0.2s, border-color 0.2s;
    overflow: hidden;
    position: relative;
    min-height: 90px;
}

.match-card-modern:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.mc-date-col {
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    background: rgba(0,0,0,0.2);
    border-right: 1px solid var(--border);
    padding: 10px;
    font-size: 12px; color: var(--text-muted);
}
.mc-time-big { font-size: 15px; font-weight: 800; color: #fff; margin-bottom: 2px; }
.mc-day { text-transform: uppercase; font-weight: 700; letter-spacing: 1px; font-size: 10px; }
.mc-year { font-size: 10px; opacity: 0.6; margin-top: 2px; }

.mc-team-col {
    display: flex; align-items: center; padding: 10px 15px;
    position: relative;
}
.mc-team-col.home { justify-content: flex-end; }
.mc-team-col.away { justify-content: flex-start; }

.team-badge-styled {
    display: flex; align-items: center; justify-content: center;
    padding: 6px 12px;     
    border-radius: 6px;
    font-weight: 700;
    font-size: 12px;       
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 160px;      
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mc-center-col {
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    position: relative;
    z-index: 2;
    padding: 10px 0;
}
.mc-score-box {
    font-family: 'Courier New', monospace;
    font-size: 20px; font-weight: 800;
    color: #fff;
    background: rgba(255,255,255,0.05);
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 4px;
}
.mc-score-box.pending { 
    color: var(--text-muted); 
    font-size: 14px; 
    border: none; 
    background: transparent; 
}
.mc-status-text { 
    font-size: 9px; 
    color: var(--primary); 
    font-weight: 700; 
    text-transform: uppercase; 
    margin-bottom: 6px; 
}
.status-live { 
    color: var(--danger); 
    animation: pulse 1.5s infinite; 
}
.mc-venue {
    font-size: 9px;
    color: var(--text-muted);
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 4px;
    text-align: center;
    line-height: 1.1;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }


/* -----------------------------------------------------------
   4. TEAM OF THE ROUND (TOP 11)
----------------------------------------------------------- */
.totr-container {
    margin-top: 50px;
    margin-bottom: 20px;
    animation: fadeIn 0.8s ease-in-out;
}

.totr-header {
    text-align: center;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-size: 22px; 
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

/* Das Spielfeld */
.football-pitch {
    background: linear-gradient(to bottom, #064e3b, #065f46);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 12px;
    position: relative;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    aspect-ratio: 3/4.2; 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px 5px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    overflow: hidden;
}

.pitch-line-center {
    position: absolute;
    top: 50%; left: 0; right: 0;
    height: 1px;
    background: rgba(255,255,255,0.2);
}
.pitch-circle {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 70px; height: 70px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
}
.pitch-box-top, .pitch-box-bottom {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 40%; height: 8%;
    border: 1px solid rgba(255,255,255,0.2);
}
.pitch-box-top { top: 0; border-top: none; }
.pitch-box-bottom { bottom: 0; border-bottom: none; }

.pitch-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1; 
}

/* --- PLAYER NODE (TOP 11) --- */
.totr-player-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative; 
    width: 80px; 
    transition: transform 0.2s;
    cursor: pointer;
    margin: 5px; 
}
.totr-player-wrapper:hover {
    transform: scale(1.15);
    z-index: 100;
}

.totr-match-rating {
    position: absolute;
    top: -6px;
    right: -4px;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 6px;
    border: 1px solid;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    z-index: 10;
}

.totr-player-card {
    border-radius: 6px;
    padding: 6px 4px;
    text-align: center;
    width: 100%;
    box-shadow: 0 3px 6px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-size: cover;
    position: relative;
    z-index: 1;
}

.totr-p-name {
    font-weight: 800;
    font-size: 10px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}
.totr-t-name {
    font-size: 7px;
    opacity: 0.9;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
}

.totr-stats-row { margin-top: 3px; }
.stat-badge {
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 8px;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 600;
}

.totr-stars-row {
    margin-top: 1px;
    font-size: 7px;
    color: #fbbf24; 
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    white-space: nowrap;
}


@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }


/* -----------------------------------------------------------
   5. STATISTIKEN SECTION
----------------------------------------------------------- */
.round-stats-container {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    animation: fadeIn 0.5s ease-in-out;
}

/* Header */
.rs-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
}

.rs-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rs-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rs-badge {
    background: var(--primary);
    color: #022c22;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
}

/* Toggle Buttons */
.stats-toggle-container {
    display: flex;
    gap: 5px;
}

.stats-toggle-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
}
.stats-toggle-btn:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
    border-color: var(--text-muted);
}
.stats-toggle-btn.active {
    background: var(--primary);
    color: #022c22;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

/* Grid Layout */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 15px;
}

/* Widget Card */
.stat-widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sw-header {
    background: rgba(0,0,0,0.3);
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.sw-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Tabelle */
.sw-table {
    width: 100%;
    border-collapse: collapse;
}
.sw-table tr {
    border-bottom: 1px solid rgba(255,255,255,0.02);
}
.sw-table tr:last-child { border-bottom: none; }
.sw-table td {
    padding: 8px 10px;
    font-size: 11px;
    color: #e2e8f0;
    vertical-align: middle;
}

.sw-rank { width: 20px; text-align: center; color: var(--text-muted); font-weight: 600; }
.sw-val { text-align: right; font-weight: 700; color: #fff; }

.sw-table tr:first-child .sw-val { color: var(--primary); }
.sw-table tr:first-child .sw-rank { color: #fbbf24; }


/* --- SPECIFIC BADGES FOR STATS --- */
.sw-team-badge {
    width: 100%;
    max-width: 100%;
    font-size: 10px; 
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block; 
    text-align: center;
}

.sw-player-card {
    width: 100%;
    padding: 4px 6px;
    border-radius: 4px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sw-p-name {
    font-weight: 800;
    font-size: 10px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sw-t-name {
    font-size: 7px;
    opacity: 0.9;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

/* -----------------------------------------------------------
   NEU: TOTAL STATS GRID
----------------------------------------------------------- */
.total-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
}

.ts-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.ts-card:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.03);
}

.ts-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
}

.ts-data {
    display: flex;
    flex-direction: column;
}

.ts-val {
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 2px;
}

.ts-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}


/* -----------------------------------------------------------
   6. RESPONSIVE (MOBILE)
----------------------------------------------------------- */
@media (max-width: 768px) {
    .match-card-modern {
        grid-template-columns: 60px 1fr 1fr; 
        grid-template-rows: auto auto auto;
        padding-bottom: 10px;
    }
    
    .mc-date-col { grid-row: 1 / 4; width: 100%; border-right: 1px solid var(--border); }
    .mc-team-col { padding: 6px 10px; }
    .mc-team-col.home { grid-column: 2; grid-row: 1; justify-content: flex-start; }
    .mc-team-col.away { grid-column: 2; grid-row: 2; justify-content: flex-start; }
    .mc-center-col { grid-column: 3; grid-row: 1 / 3; border-left: 1px solid var(--border); padding: 5px; }
    .team-badge-styled { font-size: 10px; padding: 5px 8px; max-width: 100%; }
    
    .football-pitch { width: 100%; max-width: 100%; padding: 10px 2px; }
    .totr-player-wrapper { width: 70px; }
    .totr-p-name { font-size: 8px; }
    .totr-t-name { font-size: 6px; }

    .stats-grid { grid-template-columns: 1fr; }
    .total-stats-grid { grid-template-columns: 1fr 1fr; } /* 2 Spalten mobil */
    
    .rs-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .stats-toggle-container {
        width: 100%;
        justify-content: flex-start;
    }
    .stats-toggle-btn {
        flex: 1;
        justify-content: center;
    }
}

/* Am Ende einfügen für Total Card Erweiterung */
.ts-meta {
    font-size: 9px;
    margin-top: 3px;
    font-weight: 600;
}
																																												  
/* TOTAL STATS ADDITIONAL STYLES */
.ts-meta {
    font-size: 9px;
    margin-top: 3px;
    font-weight: 600;
}

.ts-meta-best {
    font-size: 8px;
    margin-top: 2px;
    font-weight: 600;
    color: #cbd5e1; /* Ein etwas helleres Grau als Text-Muted */
    letter-spacing: 0.2px;
}																																												  