/* assets/css/league.css */

/* ============================
   1. MAIN LAYOUT
   ============================ */
.league-hero {
    background: linear-gradient(to bottom, #1e293b, #0f172a);
    padding: 60px 0 80px 0;
    margin-bottom: -40px;
    border-bottom: 1px solid var(--border);
}
.hero-inner { text-align: center; }
.hero-inner h1 { font-size: 42px; font-weight: 900; color: #fff; margin: 0; text-transform: uppercase; }
.hero-meta { color: var(--text-muted); font-size: 14px; margin-top: 10px; font-weight: 600; }

.section-title { font-size: 14px; text-transform: uppercase; font-weight: 800; color: #fff; margin: 40px 0 15px 0; border-left: 3px solid #10b981; padding-left: 10px; }

/* Helpers */
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-left { text-align: left !important; }

/* ============================
   2. TOP INFO GRID (Updated)
   ============================ */
.info-grid {
    display: grid;
    /* 4 Spalten = automatisch 2 Reihen bei 8 Items */
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px;
    margin-bottom: 40px;
}
.info-tile {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    height: 250px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.it-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.it-scroll-area {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) rgba(255,255,255,0.02);
}
.it-scroll-area::-webkit-scrollbar { width: 4px; }
.it-scroll-area::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* Mini Table */
.mini-table { width: 100%; font-size: 11px; border-collapse: collapse; }
.mini-table th { text-align: left; color: var(--text-muted); padding: 4px 0; font-size: 9px; text-transform: uppercase; }
.mini-table td { padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,0.05); color: #cbd5e1; }
.mini-table tr.clickable:hover td { background: rgba(255,255,255,0.05); cursor: pointer; color: #fff; }
.mini-table .rank-col { color: var(--text-muted); width: 25px; }

/* Info List Style */
.it-list { display: flex; flex-direction: column; gap: 8px; justify-content: center; height: 100%; }
.it-row { display: flex; justify-content: space-between; font-size: 13px; color: #cbd5e1; }
.it-row span { color: var(--text-muted); }
.it-row strong { color: #fff; }

/* ============================
   3. TEAM GRID
   ============================ */
.teams-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 15px; }
.team-card { 
    background: #1e293b; 
    border-radius: 8px; 
    overflow: hidden; 
    border: 1px solid var(--border); 
    transition: transform 0.2s, box-shadow 0.2s; 
    display: block; 
    text-decoration: none; 
}
.team-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.4); border-color: #64748b; }

.tc-top { 
    height: 60px; 
    position: relative; 
    display: flex; 
    align-items: center; 
    padding: 0 15px; 
}
.tc-badges-left { display: flex; gap: 8px; align-items: center; width: 100%; }

.tc-big-stat {
    background: rgba(0,0,0,0.4); backdrop-filter: blur(4px);
    color: #fbbf24; font-weight: 900; font-size: 18px;
    padding: 4px 8px; border-radius: 6px;
    border: 1px solid rgba(251, 191, 36, 0.3); line-height: 1;
}

.tc-small-stat {
    background: rgba(0,0,0,0.4); backdrop-filter: blur(4px);
    color: #cbd5e1; font-weight: 700; font-size: 14px;
    padding: 4px 8px; border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1); line-height: 1;
}

.tc-body { padding: 15px; }
.tc-name { 
    font-weight: 800; font-size: 14px; 
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
    margin-bottom: 10px; padding: 8px 10px; border-radius: 6px; text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2); letter-spacing: 0.5px;
}
.tc-meta { font-size: 10px; color: #94a3b8; margin-bottom: 3px; display: flex; align-items: center; gap: 5px; }
.tc-val { margin-top: 8px; font-size: 12px; color: #fbbf24; font-weight: 800; text-align: right; }

/* ============================
   4. STANDINGS TABLE
   ============================ */
.standings-page-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 0;
}
.standings-full-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.standings-full-table th { background: rgba(0,0,0,0.2); color: var(--text-muted); font-weight: 700; text-transform: uppercase; font-size: 12px; padding: 15px 10px; border-bottom: 1px solid var(--border); letter-spacing: 0.5px; text-align: inherit; }
.standings-full-table td { padding: 12px 10px; border-bottom: 1px solid rgba(255,255,255,0.05); color: var(--text-main); vertical-align: middle; }
.standings-full-table tr:last-child td { border-bottom: none; }

.row-champ { background: rgba(16, 185, 129, 0.15); }
.row-champ td:first-child { border-left: 3px solid var(--primary); }
.row-top { background: rgba(16, 185, 129, 0.05); }
.row-rel { background: rgba(220, 38, 38, 0.25) !important; }
.row-rel td:first-child { border-left: 3px solid var(--danger); }

.rank-cell { font-weight: 600; font-family: inherit; color: var(--text-muted); width: 40px; text-align: center; }
.team-cell { display: flex; align-items: center; font-weight: 500; font-size: 15px; }
.team-cell a { color: #fff; text-decoration: none; transition: color 0.2s; }
.team-cell a:hover { color: var(--primary); }
.num-cell { font-family: inherit; text-align: center; }
.points-cell { font-weight: 700; color: #fff; font-size: 16px; text-align: center; background: rgba(255,255,255,0.05); border-radius: 6px; padding: 4px 8px; display: inline-block; min-width: 30px; }
.team-square { width: 14px; height: 14px; display: inline-block; margin-right: 12px; border-radius: 2px; box-shadow: 0 1px 2px rgba(0,0,0,0.5); flex-shrink: 0; }
.table-legend { display: flex; gap: 20px; padding: 15px; font-size: 12px; color: var(--text-muted); border-top: 1px solid var(--border); background: rgba(0,0,0,0.1); flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 8px; }
.legend-box { width: 12px; height: 12px; border-radius: 3px; }
.form-beads { display: flex; gap: 3px; justify-content: flex-end; }
.bead { width: 18px; height: 18px; border-radius: 4px; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; color: rgba(0,0,0,0.6); }
.bead.win { background: var(--primary); }
.bead.draw { background: #64748b; color: #fff; }
.bead.lose { background: var(--danger); color: #fff; opacity: 0.9; }

/* Responsive Grid Adjustments */
@media (max-width: 1100px) {
    .info-grid { 
        grid-template-columns: 1fr 1fr; /* 2 Spalten auf Tablet -> 4 Reihen */
    }
}
@media (max-width: 768px) {
    .info-grid { 
        grid-template-columns: 1fr; /* 1 Spalte auf Mobile -> 8 Reihen */
    }
    .hide-mobile { display: none; }
    .hide-mobile-l { display: none; }
    .hero-inner h1 { font-size: 32px; }
    .standings-full-table th, .standings-full-table td { padding: 10px 5px; }
    .team-cell { font-size: 13px; }
}