/* LEC Playoff Scenarios - Styles */

:root {
    --lec-gold: #C8AA6E;
    --lec-blue: #0AC8B9;
    --lec-dark: #0A1428;
    --lec-darker: #061119;
    --lec-light: #F0E6D2;
    --lec-accent: #C89B3C;
    --qualified-green: #28A745;
    --eliminated-red: #DC3545;
    --pending-gray: #6C757D;
    --card-bg: rgba(10, 20, 40, 0.9);
    --border-color: rgba(200, 170, 110, 0.3);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--lec-darker) 0%, var(--lec-dark) 50%, #0d2235 100%);
    min-height: 100vh;
    color: var(--lec-light);
    line-height: 1.6;
}

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

/* Header */
header {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 30px;
    background: linear-gradient(180deg, rgba(200, 170, 110, 0.1) 0%, transparent 100%);
    border-bottom: 1px solid var(--border-color);
}

.back-link {
    display: inline-block;
    color: var(--lec-gold);
    text-decoration: none;
    margin-bottom: 20px;
    padding: 8px 16px;
    border: 1px solid var(--lec-gold);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.back-link:hover {
    background-color: var(--lec-gold);
    color: var(--lec-dark);
}

header h1 {
    font-size: 2.5rem;
    color: var(--lec-gold);
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(200, 170, 110, 0.3);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--lec-blue);
    margin-bottom: 15px;
}

.description {
    color: rgba(240, 230, 210, 0.8);
    max-width: 700px;
    margin: 0 auto;
}

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 520px;
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--lec-gold);
}

.section-header h2 {
    font-size: 1.5rem;
    color: var(--lec-gold);
}

/* Games Section */
.games-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid var(--border-color);
}

.games-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.control-btn {
    background: transparent;
    border: 1px solid var(--lec-blue);
    color: var(--lec-blue);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.control-btn:hover {
    background: var(--lec-blue);
    color: var(--lec-dark);
}

.games-counter {
    color: rgba(240, 230, 210, 0.7);
    font-size: 0.9rem;
}

/* Game Weeks */
.game-week {
    margin-bottom: 25px;
}

.game-week:last-child {
    margin-bottom: 0;
}

.game-week h3 {
    font-size: 1.1rem;
    color: var(--lec-blue);
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 3px solid var(--lec-blue);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

/* Individual Game Cards */
.game-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.game-card:hover {
    border-color: var(--lec-gold);
    box-shadow: 0 4px 15px rgba(200, 170, 110, 0.2);
}

.game-card.decided {
    border-color: var(--lec-blue);
}

.game-card.locked {
    opacity: 0.7;
    border-color: var(--success-green);
    background: rgba(76, 175, 80, 0.1);
}

.game-card.locked:hover {
    border-color: var(--success-green);
    box-shadow: none;
    cursor: default;
}

.game-card.locked .team-btn {
    cursor: default;
}

.game-card.locked .team-btn:disabled {
    opacity: 1;
}

.game-header {
    text-align: center;
    font-size: 0.8rem;
    color: rgba(240, 230, 210, 0.5);
    margin-bottom: 10px;
}

.game-matchup {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.team-btn {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    background: rgba(0, 0, 0, 0.4);
    color: var(--lec-light);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
}

.team-btn:hover {
    border-color: var(--lec-gold);
    background: rgba(200, 170, 110, 0.1);
}

.team-btn.selected {
    border-color: var(--qualified-green);
    background: rgba(40, 167, 69, 0.3);
    color: #fff;
}

.team-btn.loser {
    opacity: 0.4;
    border-color: var(--eliminated-red);
}

.vs-text {
    color: var(--lec-gold);
    font-weight: bold;
    font-size: 0.9rem;
}

/* Team logos */
.team-logo {
    vertical-align: middle;
    border-radius: 2px;
    object-fit: contain;
}

.team-btn .team-logo {
    margin-right: 6px;
}

.team-chip .team-logo {
    margin-right: 4px;
}

/* Standings Section */
.standings-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid var(--border-color);
    height: fit-content;
}

.standings-info {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
}

.qualified-indicator {
    color: var(--qualified-green);
}

.eliminated-indicator {
    color: var(--eliminated-red);
}

.pending-indicator {
    color: var(--pending-gray);
}

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

.standings-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.standings-table th,
.standings-table td {
    padding: 12px 8px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.standings-table th {
    background: rgba(200, 170, 110, 0.1);
    color: var(--lec-gold);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.standings-table th:nth-child(2) {
    text-align: left;
}

.standings-table td:nth-child(2) {
    text-align: left;
    font-weight: 600;
}

.standings-table tbody tr {
    transition: background-color 0.2s ease;
}

.standings-table tbody tr:hover {
    background: rgba(200, 170, 110, 0.05);
}

.standings-table tbody tr.qualified {
    background: rgba(40, 167, 69, 0.15);
}

.standings-table tbody tr.eliminated {
    background: rgba(220, 53, 69, 0.15);
}

.standings-table tbody tr.playoff-line td {
    border-bottom: 2px solid var(--lec-gold);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.in {
    background: var(--qualified-green);
    color: white;
}

.status-badge.out {
    background: var(--eliminated-red);
    color: white;
}

.status-badge.pending {
    background: var(--pending-gray);
    color: white;
}

/* Playoff Summary */
.playoff-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.summary-card {
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.summary-card.qualified {
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid var(--qualified-green);
}

.summary-card.eliminated {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid var(--eliminated-red);
}

.summary-card h4 {
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: var(--lec-light);
}

.team-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

.team-chip {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.team-chip.qualified {
    background: var(--qualified-green);
    color: white;
}

.team-chip.eliminated {
    background: var(--eliminated-red);
    color: white;
}

/* Scenarios Section */
.scenarios-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.scenarios-section h2 {
    font-size: 1.5rem;
    color: var(--lec-gold);
    margin-bottom: 10px;
}

.scenarios-description {
    color: rgba(240, 230, 210, 0.7);
    margin-bottom: 20px;
}

.probability-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.probability-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
}

.probability-card:hover {
    border-color: var(--lec-gold);
}

.probability-card.clinched {
    border-color: var(--qualified-green);
    background: rgba(40, 167, 69, 0.15);
}

.probability-card.eliminated {
    border-color: var(--eliminated-red);
    background: rgba(220, 53, 69, 0.15);
}

.probability-team {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.probability-bar-container {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.probability-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--lec-blue), var(--lec-gold));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.probability-bar.high {
    background: linear-gradient(90deg, var(--qualified-green), #5cb85c);
}

.probability-bar.low {
    background: linear-gradient(90deg, var(--eliminated-red), #e74c3c);
}

.probability-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--lec-blue);
}

.probability-label {
    font-size: 0.8rem;
    color: rgba(240, 230, 210, 0.6);
}

/* Rules Section */
.rules-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.rules-section h2 {
    font-size: 1.5rem;
    color: var(--lec-gold);
    margin-bottom: 15px;
}

.rules-content {
    color: rgba(240, 230, 210, 0.8);
}

.rules-content ol {
    margin-left: 20px;
    margin-top: 10px;
}

.rules-content li {
    margin-bottom: 8px;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 20px;
    border-top: 1px solid var(--border-color);
    color: rgba(240, 230, 210, 0.6);
    font-size: 0.9rem;
}

footer a {
    color: var(--lec-blue);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

footer p {
    margin-bottom: 5px;
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.updating {
    animation: pulse 0.5s ease-in-out;
}

/* Team Colors (optional enhancement) */
.team-fnc { --team-color: #FF6600; }
.team-g2 { --team-color: #1F1F1F; }
.team-gx { --team-color: #7B00FF; }
.team-kc { --team-color: #0066CC; }
.team-kcb { --team-color: #003366; }
.team-lr { --team-color: #ED1C24; }
.team-mkoi { --team-color: #00A859; }
.team-navi { --team-color: #FFD700; }
.team-shft { --team-color: #9932CC; }
.team-sk { --team-color: #00B4D8; }
.team-th { --team-color: #FF4500; }
.team-vit { --team-color: #FFE600; }

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .probability-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .playoff-summary {
        grid-template-columns: 1fr;
    }
    
    .standings-info {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 20px 10px;
    }
    
    .games-section,
    .standings-section,
    .scenarios-section,
    .rules-section {
        padding: 15px;
    }
    
    .probability-grid {
        grid-template-columns: 1fr;
    }
}
