/* ============================
   Tournament Module Styles
   ============================ */

.tournament-wrapper {
    min-height: 80vh;
    font-family: "Urbanist", sans-serif;
    color: #212529;
    background: #c5c2b8;
}

.tournament-heading {
    color: #212529;
    font-weight: 700;
    margin: 0;
}

.section-title {
    color: #555;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Live Indicator */
.live-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #ff4444;
    border-radius: 50%;
    animation: pulse-live 1.5s infinite;
}

@keyframes pulse-live {
    0% { box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(255, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 68, 68, 0); }
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(255, 68, 68, 0.15);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 20px;
    color: #ff4444;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Tournament Cards */
.tournament-card {
    background: #000;
    border: 1px solid #c5c2b8;
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.2s, border-color 0.2s;
}

.tournament-card:hover {
    transform: translateY(-2px);
    border-color: #aaa;
}

.tournament-card.live {
    border-color: rgba(255, 68, 68, 0.5);
}

.tournament-card-header {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.tournament-card-title {
    color: #fff;
    font-size: 2.5rem;
    margin: 16px;
    text-align: center;
}

.tournament-card-meta {
    display: flex;
    justify-content: space-between;
    color: #555;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.entry-fee {
    font-weight: 600;
    color: #0077b6;
}

.entry-fee.free {
    color: #48e350;
    font-size: 18px;
}

.tournament-card-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.tournament-card .btn.btn-success.join-tournament-btn {
    font-size: 125%;
    font-weight: 700;
    background-color: #28a745;
    border-color: #28a745;
}

.tournament-card-header .badge.bg-success {
    font-weight: 400;
    font-size: 100%;
}

.tournament-card-header .entry-fee {
    display: flex;
    align-items: center;
}

/* Tournament Detail Card */
.tournament-card-detail {
    background: #dfdcd2;
    border: 1px solid #c5c2b8;
    border-radius: 12px;
    color: #212529;
}

.tournament-card-detail .card-body {
    padding: 24px;
}

.tournament-card-detail h5 {
    color: #212529;
    margin-bottom: 16px;
}

.rules-list {
    padding-left: 20px;
    color: #333;
}

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

/* Results Table */
.tournament-results-table {
    color: #212529;
}

.tournament-results-table th {
    color: #212529;
    border-color: #c5c2b8;
    font-weight: 600;
    background: #deddd3 !important;
    font-size: 1.35rem;
}

.tournament-results-table td {
    border-color: #c5c2b8;
    vertical-align: middle;
    font-size: 1.15rem;
    background: #eeeae0;
}

.winner-cell {
    color: #2e7d32;
    font-weight: 600;
}

/* Player List */
.player-item {
    padding: 6px 0;
    border-bottom: 1px solid #c5c2b8;
}

.seed-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #c5c2b8;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
}

.player-name {
    color: #212529;
    font-weight: 500;
}

.country-flag {
    border-radius: 2px;
}

/* Waiting Room */
.waiting-room-card {
    background: #dfdcd2;
    border: 1px solid #c5c2b8;
    border-radius: 12px;
    color: #212529;
}

.countdown-display {
    font-size: 3rem;
    font-weight: 700;
    color: #0077b6;
    font-variant-numeric: tabular-nums;
}

.player-count {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2e7d32;
}

/* Bracket View */
.bracket-view {
    display: flex;
    gap: 40px;
    overflow-x: auto;
    padding: 20px 0;
    min-height: 300px;
}

.bracket-round {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
}

.bracket-round h6 {
    color: #555;
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    margin-bottom: 12px;
}

.bracket-match {
    background: var(--bracket-color, #dfdcd2);
    border: 1px solid #c5c2b8;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: var(--bracket-font-size, 14px);
    transition: border-color 0.2s;
}

.bracket-match.active {
    border-color: #2e7d32;
    box-shadow: 0 0 8px rgba(46, 125, 50, 0.2);
}

.bracket-match .player {
    padding: 4px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    color: #fff;
}

.bracket-match .player.winner {
    color: #2e7d32;
    font-weight: 700;
}

.bracket-match .player.loser {
    color: #999;
    text-decoration: line-through;
}

.bracket-match .vs-divider {
    border-top: 1px solid #c5c2b8;
    margin: 2px 0;
}

.tournament-wrapper .badge {
    font-size: 125%;
    line-height: 1.25;
}

.tournament-wrapper .btn-sm {
    padding: .25rem .5rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: .2rem;
    background: #c4c2b9;
}

.tournament-wrapper .btn-outline-light {
    color: #000;
    border-color: #000;
}

/* Winner Banner */
.tournament-winner-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background: #dfdcd2;
    border: 1px solid #c5c2b8;
    border-radius: 12px;
}

.winner-trophy {
    font-size: 2rem;
}

.tournament-winner-banner h5 {
    color: #2e7d32;
    margin: 0;
}

/* Nav Pills (tabs) for tournament pages */
.tournament-wrapper .nav-pills .nav-link {
    color: #555;
    background: transparent;
    border: 1px solid #c5c2b8;
    margin-right: 8px;
    border-radius: 8px;
}

.tournament-wrapper .nav-pills .nav-link.active {
    color: #ffffff;
    background: #0077b6;
    border-color: #0077b6;
}

/* Description text */
.tournament-description {
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .bracket-view {
        gap: 20px;
    }
    .bracket-round {
        min-width: 160px;
    }
    .countdown-display {
        font-size: 2rem;
    }
}
