/* Tournament Details Page Styling */

/* Tournament header */
.tournament-header {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
}

.tournament-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;charset=utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"%3E%3Cpath fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,213.3C672,192,768,128,864,128C960,128,1056,192,1152,208C1248,224,1344,192,1392,176L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"%3E%3C/path%3E%3C/svg%3E');
    background-size: cover;
    background-position: center;
    opacity: 0.3;
}

.tournament-header h1 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.tournament-header .badge {
    font-size: 0.85rem;
    padding: 0.5em 0.85em;
    position: relative;
    z-index: 1;
}

/* Tournament image */
.tournament-image-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    max-height: 300px;
}

.tournament-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: var(--border-radius);
    transition: transform 0.5s ease;
}

.tournament-image-container:hover .tournament-image {
    transform: scale(1.05);
}

.tournament-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    padding: 2rem 1rem 1rem;
    color: white;
}

/* Tournament details card */
.tournament-details-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.tournament-details-card .card-header {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    padding: 1rem 1.5rem;
    border-bottom: none;
}

.tournament-details-card .card-body {
    padding: 1.5rem;
}

.tournament-details-card .list-group-item {
    padding: 1rem 1.5rem;
    border-color: rgba(0,0,0,0.05);
}

/* Tournament description */
.tournament-description {
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* Tournament countdown */
.tournament-countdown-container {
    background: linear-gradient(135deg, var(--info-color), var(--primary-color));
    color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.tournament-countdown-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;charset=utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"%3E%3Cpath fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,213.3C672,192,768,128,864,128C960,128,1056,192,1152,208C1248,224,1344,192,1392,176L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"%3E%3C/path%3E%3C/svg%3E');
    background-size: cover;
    background-position: center;
    opacity: 0.2;
}

.tournament-countdown-container h5 {
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.tournament-countdown {
    display: flex;
    justify-content: space-around;
    text-align: center;
    position: relative;
    z-index: 1;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.countdown-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

/* Participants list */
.participant-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.participant-item:last-child {
    border-bottom: none;
}

.participant-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 1rem;
    object-fit: cover;
    background-color: var(--gray-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.participant-info {
    flex: 1;
}

.participant-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.participant-meta {
    font-size: 0.85rem;
    color: var(--gray-color);
}

.participant-seed {
    font-size: 0.85rem;
    padding: 0.25em 0.5em;
    border-radius: 20px;
}

/* Bracket styling */
.bracket {
    display: flex;
    overflow-x: auto;
    padding: 1.5rem 0;
    margin-bottom: 1.5rem;
}

.bracket-round {
    margin-right: 2rem;
    min-width: 220px;
}

.bracket-round h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
}

.bracket-match {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.bracket-match::after {
    content: '';
    position: absolute;
    right: -2rem;
    top: 50%;
    width: 2rem;
    height: 2px;
    background: var(--gray-color);
}

.bracket-round:last-child .bracket-match::after {
    display: none;
}

.bracket-team {
    padding: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 4px;
}

.bracket-team:first-child {
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.bracket-team.winner {
    font-weight: 600;
    background-color: rgba(46, 204, 113, 0.1);
    color: var(--success-color);
}

.bracket-score {
    font-weight: 700;
    font-size: 1.1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tournament-header {
        padding: 1.5rem 0;
        margin-bottom: 1.5rem;
    }
    
    .tournament-header h1 {
        font-size: 1.8rem;
    }
    
    .tournament-image {
        height: 200px;
    }
    
    .tournament-image-container {
        max-height: 200px;
    }
    
    .tournament-countdown-value {
        font-size: 1.5rem;
    }
    
    .tournament-countdown-label {
        font-size: 0.75rem;
    }
    
    .bracket {
        flex-direction: column;
    }
    
    .bracket-round {
        margin-right: 0;
        margin-bottom: 2rem;
    }
    
    .bracket-match::after {
        display: none;
    }
}

@media (max-width: 576px) {
    .tournament-header h1 {
        font-size: 1.5rem;
    }
    
    .tournament-image {
        height: 150px;
    }
    
    .tournament-image-container {
        max-height: 150px;
    }
    
    .tournament-countdown-value {
        font-size: 1.2rem;
    }
    
    .tournament-countdown-label {
        font-size: 0.7rem;
    }
}
