:root {
    --bg-color: #121212;
    --panel-bg: #1A1A1A;
    --text-primary: #EDEDED;
    --text-secondary: #A0A0A0;
    --accent-color: #DAF42D;
    /* Neon Lime FootX style */
    --accent-hover: #C2D926;
    --border-color: #333333;
    --success: #2ECC71;
    --danger: #E74C3C;
    --font-stack: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-stack);
    line-height: 1.6;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.league-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: #fff;
    /* fallback */
    border-radius: 50%;
    padding: 5px;
}

h1 {
    font-size: 1.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.subtitle {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.badge-matchday {
    background: var(--accent-color);
    color: #000;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
}

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    background: var(--panel-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.kpi-card h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.kpi-card .value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-color);
}

.kpi-card .value.small-text {
    font-size: 1.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.panel {
    background: var(--panel-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 20px;
}

.panel-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.panel-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

/* Standings Table */
.table-wrapper {
    overflow-x: auto;
}

.standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.standings-table th,
.standings-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

.standings-table th {
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.2);
}

.standings-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.standings-table .center {
    text-align: center;
}

.standings-table .left {
    text-align: left;
}

.team-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.team-crest {
    width: 24px;
    height: 24px;
}

.mobile-hide {
    display: table-cell;
}

@media (max-width: 600px) {
    .mobile-hide {
        display: none;
    }
}

/* Chart Container */
.chart-container {
    padding: 20px;
}

.chart-bar-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.chart-label {
    width: 30px;
    /* Rank/Pos */
    color: var(--text-secondary);
}

.chart-bar-bg {
    flex: 1;
    background: #333;
    height: 8px;
    border-radius: 4px;
    margin: 0 10px;
    position: relative;
    overflow: hidden;
}

.chart-bar-fill {
    height: 100%;
    background: var(--accent-color);
    border-radius: 4px;
}

.chart-value {
    width: 30px;
    text-align: right;
    font-weight: bold;
}

/* Matches List */
.matches-list {
    padding: 0;
}

.match-item {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.match-item:last-child {
    border-bottom: none;
}

.match-info {
    flex: 1;
}

.teams-vs {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-weight: 600;
    font-size: 0.9rem;
}

.match-meta {
    margin-top: 5px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.match-status {
    background: #333;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
}