/*
 * PREMIUM STADIUM-THEMED VERTICAL TOURNAMENT TREE
 */

@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;700;900&display=swap');

.cb-tournament-timeline-wrap {
    background: url('../images/stadium-bg.png') no-repeat center center;
    background-size: cover;
    padding: 80px 40px;
    border-radius: 20px;
    font-family: 'Rubik', sans-serif;
    color: #fff;
    min-height: 1000px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Overlay for better readability */
.cb-tournament-timeline-wrap::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(var(--cb-primary-rgb), 0.4) 0%, rgba(var(--cb-primary-rgb), 0.8) 100%);
    z-index: 1;
}

.cb-tournament-banner,
.cb-tournament-timeline {
    position: relative;
    z-index: 2;
    width: 100%;
}

.cb-tournament-banner {
    text-align: center;
    margin-bottom: 60px;
}

.cb-tournament-banner h2 {
    color: #fff;
    font-weight: 900;
    font-size: 40px;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    margin-bottom: 10px;
}

.cb-tournament-banner .cb-sub-banner {
    background: #d32f2f;
    color: #fff;
    display: inline-block;
    padding: 5px 30px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    clip-path: polygon(10% 0%, 90% 0%, 100% 100%, 0% 100%);
}

/* Vertical Tree Container */
.cb-tournament-timeline {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
}

.cb-timeline-round {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cb-round-header {
    margin-bottom: 30px;
}

.cb-round-header h3 {
    margin: 0;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    padding: 6px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.cb-round-matches {
    display: flex;
    justify-content: center;
    gap: 40px;
    width: 100%;
    flex-wrap: wrap;
    position: relative;
}

/* Match Card Glassmorphism */
.cb-match-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom: 3px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    padding: 0;
    width: 260px;
    transition: all 0.3s ease;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.cb-match-card:hover {
    transform: translateY(-5px) scale(1.02);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

.cb-match-date {
    background: rgba(0, 0, 0, 0.2);
    font-size: 10px;
    color: #ccc;
    padding: 8px;
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cb-team-row {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cb-team-row:last-child {
    border-bottom: 0;
}

.cb-flag-strip {
    width: 40px;
    height: 24px;
    background: #1d3163;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
}

.cb-team-logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.cb-team-name {
    flex: 1;
    font-weight: 700;
    font-size: 13px;
    color: #fff;
    text-transform: uppercase;
}

.cb-team-score {
    font-weight: 900;
    color: #fff;
    font-size: 14px;
}

/* Winner Section */
.cb-winner-wrap {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.cb-winner-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    border: 2px solid #fff;
    border-radius: 8px;
    padding: 20px 40px;
    text-align: center;
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 3;
}

.cb-winner-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: #ffd700;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.cb-winner-name {
    margin: 0;
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
    color: #fff;
}

/* Connectors - Vertical & Branching */
.cb-tournament-timeline {
    position: relative;
}

.cb-match-card::before {
    content: '';
    position: absolute;
    top: -30px;
    left: 50%;
    width: 2px;
    height: 30px;
    background: rgba(255, 255, 255, 0.4);
}

/* Horizontal connectors for rounds with multiple matches */
.cb-round-matches::after {
    content: '';
    position: absolute;
    top: -30px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: rgba(255, 255, 255, 0.4);
    display: none;
}

/* Show branching horizontal line for SF and QF */
.cb-timeline-round:not(:first-child) .cb-round-matches::after {
    display: block;
}

/* Special centering for Final -> SF branching */
.cb-timeline-round:nth-child(2) .cb-round-matches::after {
    left: 25%;
    right: 25%;
}

.cb-timeline-round:first-child .cb-match-card::before {
    display: block;
    top: -60px;
    height: 60px;
}

/* Groups Layout */
.cb-groups-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    width: 100%;
    margin-top: 80px;
    position: relative;
}

.cb-groups-container::before {
    content: '';
    position: absolute;
    top: -40px;
    left: 50%;
    width: 2px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
}

.cb-group-box {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.cb-group-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    text-align: center;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cb-group-teams {
    padding: 10px;
}

.cb-group-team {
    display: flex;
    align-items: center;
    padding: 8px;
    font-size: 11px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cb-group-team:last-child {
    border-bottom: 0;
}

/* Add Match Button */
.cb-add-match-btn {
    border: 1px dashed rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    width: 260px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ccc;
    font-weight: 600;
    font-size: 12px;
}

.cb-add-match-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}