/* --- 2. Data Display (Tables) --- */
.table-standard {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.table-standard th {
    background-color: var(--bg-color);
    color: var(--text-secondary);
    font-weight: var(--fw-medium);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    border-bottom: 2px solid var(--border-color);
}
.table-standard td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}
.table-standard tr:last-child td { border-bottom: none; }

.table-container {
    background-color: var(--card-bg);
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
}

/* --- Base Shapes & Global Utilities --- */

/* The "Oval Fix": Forces a perfect 1:1 circle regardless of parent pressure */
.rounded-circle {
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
    text-align: center;
    overflow: hidden;
}



/* Responsive Table Logic */
@media screen and (max-width: 768px) {
    .responsive-table {
        width: 100%;
        border-collapse: collapse;
    }

    .responsive-table thead { display: none; }

    .responsive-table tbody,
    .responsive-table tr,
    .responsive-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .responsive-table tr {
        margin-bottom: 15px;
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        padding: 0 10px;
    }

    .responsive-table td {
        padding-left: 50%;
        position: relative;
        padding-top: 10px;
        padding-bottom: 10px;
        border-bottom: 1px solid var(--border-color);
        text-align: right;
    }

    .responsive-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 45%;
        padding-right: 10px;
        font-weight: bold;
        text-align: left;
    }
}

/* --- Discovery Hub (Leaderboard v0.10.0) --- */
.podium-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.podium-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    transition: transform 0.2s ease;
}

.podium-card:hover { transform: translateY(-4px); }

/* --- Match History Compact Rows --- */
.match-compact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    min-height: 60px; /* Use min-height to allow content growth */
    gap: 12px;
}

.match-info-compact {
    flex: 1;
    min-width: 0; /* Critical for text-overflow to work */
    font-size: 0.9rem;
}

.match-score-badge-compact {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Badge specific constraints */
.match-score-badge-compact .badge.rounded-circle {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.75rem;
}

.score-badge {
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-weight: var(--fw-bold);
    font-size: 0.8rem;
    white-space: nowrap;
    border: 1px solid transparent;
}

.score-badge-win {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border-color: var(--success-color);
}

.score-badge-loss {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border-color: var(--danger-color);
}
