/* ==========================================================
   ESports Platform — Tournaments, Wizard & Brackets
   ========================================================== */

/* Tournament Grid & Card */
.tourney-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.tourney-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
}

.tourney-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px var(--accent-primary-glow);
}

.tourney-card-banner {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: var(--bg-elevated);
}

.tourney-card-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(180deg, rgba(23, 23, 31, 0) 0%, var(--bg-card) 100%);
}

.tourney-card-badge-row {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

.tourney-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.tourney-card-org {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.tourney-card-org img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.tourney-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
    line-height: 1.3;
}

.tourney-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
    font-size: 0.85rem;
}

.tourney-meta-item span {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.tourney-meta-item strong {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.tourney-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.tourney-prize-tag {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent-secondary);
}

/* Tournament Details Hero */
.tourney-hero {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
    background: var(--bg-card);
}

.tourney-hero-banner {
    height: 320px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.tourney-hero-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(9, 9, 13, 0.2) 0%, rgba(9, 9, 13, 0.95) 100%);
}

.tourney-hero-content {
    position: relative;
    padding: 0 36px 36px;
    margin-top: -80px;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.tourney-branding-group {
    display: flex;
    align-items: center;
    gap: 20px;
}

.tourney-logo-badge {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 2px solid var(--accent-primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    object-fit: cover;
}

.tourney-hero-meta h1 {
    font-size: 2.2rem;
    color: #fff;
    margin-bottom: 6px;
}

.powered-by-tag {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Direct Off-Platform Payment Disclaimer Box */
.paid-disclaimer-box {
    background: rgba(255, 181, 71, 0.08);
    border: 1px solid rgba(255, 181, 71, 0.35);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 24px;
}

.paid-disclaimer-box h4 {
    color: var(--accent-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.paid-disclaimer-box p {
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Multi-step Creation Wizard */
.wizard-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 36px;
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px 30px;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
    cursor: pointer;
}

.step-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: var(--transition);
}

.wizard-step.active .step-circle {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
    box-shadow: 0 0 15px var(--accent-primary-glow);
}

.wizard-step.completed .step-circle {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.step-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}

.wizard-step.active .step-label {
    color: var(--text-primary);
}

/* Brackets Layout */
.bracket-wrapper {
    overflow-x: auto;
    padding: 30px 10px;
}

.bracket-container {
    display: flex;
    gap: 40px;
    align-items: center;
    min-width: 800px;
}

.bracket-round {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 30px;
    flex: 1;
}

.round-title {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.bracket-match {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    width: 220px;
    box-shadow: var(--shadow-card);
}

.bracket-team-slot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    font-weight: 600;
}

.bracket-team-slot:last-child {
    border-bottom: none;
}

.bracket-team-slot.winner {
    background: rgba(50, 201, 135, 0.1);
    color: var(--success);
}

/* Responsive Navigation Tabs */
.tourney-tabs-nav {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
}

.tourney-tabs-nav .btn {
    white-space: nowrap;
    flex-shrink: 0;
}

/* Mobile Responsiveness for Tournaments */
@media (max-width: 768px) {
    .tourney-hero-banner {
        height: 220px;
    }

    .tourney-hero-content {
        padding: 0 16px 20px;
        margin-top: -50px;
    }

    .tourney-logo-badge {
        width: 70px;
        height: 70px;
    }

    .tourney-hero-meta h1 {
        font-size: 1.6rem;
    }

    .tourney-grid {
        grid-template-columns: 1fr;
    }

    .wizard-progress {
        padding: 14px 16px;
        overflow-x: auto;
        gap: 16px;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }

    .wizard-step {
        flex-shrink: 0;
    }

    .step-label {
        font-size: 0.7rem;
    }

    .step-circle {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}

