/* assets/css/matchup.css */
:root {
    --bg-dark: #0b0f19;
    --card-gradient: linear-gradient(135deg, #111c24 0%, #1a1026 100%);
    --accent-cyan: #00e5ff;
    --accent-purple: #9d4edd;
    --text-main: #ffffff;
    --text-muted: #aaa;
    --border-color: rgba(255, 255, 255, 0.1);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: sans-serif;
    margin: 0;
    padding: 0;
}

.matchup-container {
    max-width: 1000px;
    margin: 60px auto 40px auto; 
    padding: 20px 20px 20px 20px; 
}

.matchup-container h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

/* Selector Bar */
.selector-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
}

.selector-bar select {
    background: #111827;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    min-width: 220px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.selector-bar select:focus {
    border-color: var(--accent-cyan);
    outline: none;
}

.selector-bar select:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Matchup History Table */
.games-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.games-table th, 
.games-table td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.games-table th {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.games-table tr.game-row {
    cursor: pointer;
    transition: background 0.2s;
}

.games-table tr.game-row:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* Interactive Breakdown Panel */
.details-panel {
    background: var(--card-gradient);
    border-radius: 12px;
    padding: 24px;
    margin-top: 10px;
    margin-bottom: 15px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.panel-title {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    color: var(--accent-cyan);
    margin-bottom: 20px;
}

/* Stat Bars */
.stat-bar-container {
    margin-bottom: 18px;
}

.stat-label {
    text-align: center;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: bold;
    margin-bottom: 6px;
}

.bar-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.bar-value {
    width: 50px;
    font-weight: bold;
    font-size: 1.1rem;
}

.progress-track {
    flex-grow: 1;
    height: 16px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    border-radius: 4px;
    overflow: hidden;
}

.p-bar-left {
    height: 100%;
    background: var(--accent-cyan);
    transition: width 0.5s ease;
}

.p-bar-right {
    height: 100%;
    background: var(--accent-purple);
    transition: width 0.5s ease;
}

/* Top Leaders Section */
.leaders-section {
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.leader-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.leader-player {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
}

.leader-stat-val {
    font-size: 1rem;
    font-weight: bold;
    color: var(--text-main);
}

.no-records {
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    color: var(--text-muted);
}

/* Additional Custom Enhancements for Game Leader Bar Splits */
.leader-row-container {
    margin-bottom: 14px;
    position: relative;
}

.leader-category-label {
    text-align: center;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: bold;
    margin-bottom: 4px;
}

.leader-split-track {
    display: flex;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    overflow: hidden;
    height: 38px;
    position: relative;
}

.leader-side {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.leader-fill-bar {
    position: absolute;
    top: 0;
    height: 100%;
    z-index: 1;
    transition: width 0.6s cubic-bezier(0.1, 0.8, 0.3, 1);
}

.leader-fill-bar.left {
    right: 0;
}

.leader-fill-bar.right {
    left: 0;
}

.leader-info-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 0 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.leader-info-content.text-left {
    justify-content: space-between;
}

.leader-info-content.text-right {
    justify-content: space-between;
    flex-direction: row;
}

.leader-name {
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leader-value-badge {
    background: rgba(255, 255, 255, 0.08);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 800;
    color: #fff;
}