/* Tournament Bracket */
.bracket-container {
    display: flex;
    gap: 3rem;
    justify-content: flex-start;
    align-items: flex-start;
    margin-bottom: 5rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2rem;
    background: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,179,71,0.03) 2px, rgba(255,179,71,0.03) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255,179,71,0.03) 2px, rgba(255,179,71,0.03) 4px),
        rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 179, 71, 0.1);
    border-radius: 8px;
    scrollbar-width: none;
}

.bracket-container::-webkit-scrollbar {
    display: none;
}

.bracket-round {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 280px;
    max-width: 280px;
    flex-shrink: 0;
    position: relative;
}

.bracket-round:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -2.05rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid rgba(255, 179, 71, 0.4);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
}

.bracket-title {
    font-size: 1rem;
    font-weight: 700;
    color: #ffb347;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: center;
    padding: 0;
    background: rgba(255, 179, 71, 0.1);
    border: 1px solid rgba(255, 179, 71, 0.3);
    border-radius: 4px;
    font-family: 'Geogrotesque', sans-serif;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    position: relative;
    cursor: pointer;
}

.bracket-day-tooltip {
    position: fixed;
    background: rgba(20, 20, 20, 0.98);
    border: 2px solid rgba(255, 179, 71, 0.3);
    border-radius: 4px;
    padding: 1.5rem;
    min-width: 300px;
    z-index: 9000;
    pointer-events: none;
    opacity: 0;
    display: none;
    transition: opacity 0.2s ease;
}

.bracket-match-tooltip {
    position: fixed;
    background: rgba(20, 20, 20, 0.98);
    border: 2px solid rgba(255, 179, 71, 0.3);
    border-radius: 4px;
    padding: 1.5rem;
    min-width: 400px;
    z-index: 9000;
    pointer-events: none;
    opacity: 0;
    display: none;
    transition: opacity 0.2s ease;
}

.bracket-tooltip-header {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffb347;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 179, 71, 0.2);
}

.bracket-tooltip-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bracket-tooltip-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.bracket-tooltip-label {
    color: #888;
    font-weight: 600;
}

.bracket-tooltip-value {
    color: #fff;
    font-weight: 600;
}

.bracket-tooltip-teams {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.bracket-tooltip-team {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bracket-tooltip-team-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffb347;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.bracket-tooltip-players {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

.bracket-match {
    background: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(100,100,100,0.1) 2px, rgba(100,100,100,0.1) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(100,100,100,0.1) 2px, rgba(100,100,100,0.1) 4px),
        rgba(20, 20, 20, 0.8);
    border: 2px solid rgba(255, 179, 71, 0.2);
    border-radius: 4px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 180px;
    justify-content: center;
}

.bracket-match::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 179, 71, 0.1), transparent);
    transition: left 0.5s ease;
}

.bracket-match:hover::before {
    left: 100%;
}

.bracket-match:hover {
    border-color: rgba(255, 179, 71, 0.5);
    background: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(100,100,100,0.15) 2px, rgba(100,100,100,0.15) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(100,100,100,0.15) 2px, rgba(100,100,100,0.15) 4px),
        rgba(30, 30, 30, 0.9);
    box-shadow: 0 8px 25px rgba(255, 179, 71, 0.2);
}

.bracket-match.final {
    border-color: #ffb347;
    background: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,179,71,0.1) 2px, rgba(255,179,71,0.1) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255,179,71,0.1) 2px, rgba(255,179,71,0.1) 4px),
        rgba(255, 179, 71, 0.05);
    box-shadow: 0 0 20px rgba(255, 179, 71, 0.3);
}

.bracket-team {
    font-size: 0.95rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    padding: 0.75rem 0.5rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-family: 'Geogrotesque', sans-serif;
    transition: all 0.2s ease;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.bracket-team.winner {
    color: #ffb347;
    background: rgba(255, 179, 71, 0.15);
    border: 2px solid rgba(255, 179, 71, 0.4);
    box-shadow: 0 0 15px rgba(255, 179, 71, 0.2);
    text-shadow: 0 0 10px rgba(255, 179, 71, 0.5);
}

.bracket-score {
    font-size: 1.1rem;
    font-weight: 900;
    color: #fff;
    text-align: center;
    padding: 0;
    background: rgba(255, 179, 71, 0.1);
    border-radius: 4px;
    font-family: 'Geogrotesque', sans-serif;
    letter-spacing: 0.1em;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

/* Matches Grid */
.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.match-card {
    background: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(100,100,100,0.08) 2px, rgba(100,100,100,0.08) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(100,100,100,0.08) 2px, rgba(100,100,100,0.08) 4px),
        rgba(20, 20, 20, 0.7);
    border: 2px solid rgba(255, 179, 71, 0.2);
    border-radius: 8px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.match-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ffb347, #ff8c00, #ffb347);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.match-card:hover::before {
    transform: scaleX(1);
}

.match-card:hover {
    border-color: rgba(255, 179, 71, 0.5);
    background: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(100,100,100,0.12) 2px, rgba(100,100,100,0.12) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(100,100,100,0.12) 2px, rgba(100,100,100,0.12) 4px),
        rgba(30, 30, 30, 0.8);
    box-shadow: 0 10px 30px rgba(255, 179, 71, 0.15);
}

.match-time {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-family: 'Geogrotesque', sans-serif;
    background: rgba(255, 179, 71, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    display: inline-block;
}

.match-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    margin: 2rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 179, 71, 0.2);
    border-bottom: 1px solid rgba(255, 179, 71, 0.2);
}

.match-team {
    font-size: 1.4rem;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Geogrotesque', sans-serif;
    padding: 0.8rem 1.2rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.match-team:hover {
    color: #ffb347;
    border-color: rgba(255, 179, 71, 0.3);
}

.match-vs {
    font-size: 1.1rem;
    color: #ffb347;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: 'Geogrotesque', sans-serif;
    padding: 0.5rem 1rem;
    background: rgba(255, 179, 71, 0.1);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.match-map {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-family: 'Geogrotesque', sans-serif;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.match-status {
    font-size: 0.9rem;
    color: #ffb347;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 700;
    background: linear-gradient(45deg, rgba(255, 179, 71, 0.2), rgba(255, 179, 71, 0.1));
    padding: 0.8rem 1.5rem;
    border-radius: 20px;
    display: inline-block;
    border: 1px solid rgba(255, 179, 71, 0.3);
    font-family: 'Geogrotesque', sans-serif;
    box-shadow: 0 4px 15px rgba(255, 179, 71, 0.2);
}

/* Enhanced Table Styles */
.table-container {
    background: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,179,71,0.02) 2px, rgba(255,179,71,0.02) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255,179,71,0.02) 2px, rgba(255,179,71,0.02) 4px),
        rgba(20, 20, 20, 0.6);
    border: 2px solid rgba(255, 179, 71, 0.2);
    border-radius: 8px;
    overflow: hidden;
    margin: 2rem 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.players-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Geogrotesque', sans-serif;
}

.players-table thead {
    background: linear-gradient(135deg, rgba(255, 179, 71, 0.2), rgba(255, 179, 71, 0.1));
}

.players-table th {
    padding: 1.5rem 2rem;
    text-align: left;
    color: #ffb347;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    border-bottom: 2px solid rgba(255, 179, 71, 0.3);
    position: relative;
}

.players-table tbody tr {
    transition: all 0.25s ease;
    cursor: pointer;
}

.players-table tbody tr:hover {
    background: rgba(255, 179, 71, 0.08);
}

.players-table tbody tr:nth-child(1) td:first-child {
    color: #FFD700;
    font-weight: 900;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.players-table tbody tr:nth-child(2) td:first-child {
    color: #C0C0C0;
    font-weight: 900;
}

.players-table tbody tr:nth-child(3) td:first-child {
    color: #CD7F32;
    font-weight: 900;
}

/* Section Spacing */
#tournament-bracket,
#leaderboard,
#upcoming-matches {
    margin-bottom: 5rem;
}

.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 3rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #ffb347, transparent);
    border-radius: 2px;
}

@media (max-width: 768px) {
    .bracket-container {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
        padding: 2rem 1rem;
    }
    
    .bracket-round:not(:last-child)::after {
        display: none;
    }
    
    .matches-grid {
        grid-template-columns: 1fr;
    }
    
    .match-teams {
        flex-direction: column;
        gap: 1rem;
    }
    
    .match-vs {
        transform: rotate(90deg);
    }
    
    .players-table th,
    .players-table td {
        padding: 1rem;
        font-size: 0.9rem;
    }
}