/* Existing content */
:root {
    --card-bg: rgba(20, 20, 25, 0.6);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-hover-bg: rgba(30, 30, 40, 0.8);
    --card-hover-border: rgba(255, 215, 0, 0.3);
    --text-muted: #a0a0b0;
    --brand-gold-glow: 0 0 15px rgba(255, 215, 0, 0.15);
}

.page-container {
    padding-top: 120px;
    padding-bottom: 5rem;
    min-height: 100vh;
}

/* --- Hero Section --- */
.tournaments-hero {
    text-align: center;
    margin-bottom: 5rem;
    position: relative;
}

.tournaments-hero::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.05) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
}

.page-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.text-gold-glow {
    color: var(--brand-gold);
    text-shadow: 0 0 25px rgba(255, 215, 0, 0.4);
    position: relative;
    display: inline-block;
}

.page-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- Section Headers --- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-icon {
    font-size: 1.8rem;
    color: var(--brand-gold);
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.4));
}

/* --- Grid Layout --- */
.tournaments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

/* --- Tournament Card (Premium Glass) --- */
.tournament-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(12px);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tournament-card:hover {
    transform: translateY(-8px);
    background: var(--card-hover-bg);
    border-color: var(--card-hover-border);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3), var(--brand-gold-glow);
}

/* Banner Image */
.tournament-card__banner {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.tournament-card__banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80%;
    background: linear-gradient(to top, var(--card-bg) 0%, transparent 100%);
}

.tournament-card__banner--default {
    background: linear-gradient(45deg, #1a1a2e, #2d2d44);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tournament-card__banner--default i {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.05);
}

/* Status Badge */
.status-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2;
}

.status-badge.open {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

.status-badge.upcoming {
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
    border-color: rgba(255, 215, 0, 0.3);
}

/* Card Content */
.tournament-card__content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.tournament-card__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    color: #fff;
    min-height: 3rem;
    /* Align titles */
}

.tournament-card__organizer {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Stats Grid within Card */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 12px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.stat-value i {
    color: var(--brand-gold);
    font-size: 1rem;
}

/* Action Button */
.btn-register-card {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 165, 0, 0.1));
    border: 1px solid rgba(255, 215, 0, 0.2);
    color: var(--brand-gold);
    transition: 0.3s;
    text-decoration: none;
}

.btn-register-card:hover {
    background: var(--brand-gold);
    color: #000;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    transform: scale(1.02);
}

/* --- Compact List (All Tournaments) --- */
.compact-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.list-item {
    display: grid;
    grid-template-columns: 80px 2fr 1fr 1fr auto;
    align-items: center;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 12px;
    transition: 0.3s;
}

.list-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.list-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: #333;
    object-fit: cover;
}

.list-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    color: #fff;
}

.list-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.list-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.list-status .status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-dot.upcoming {
    background: #ffd700;
    box-shadow: 0 0 8px #ffd700;
}

.status-dot.open {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.status-dot.finished {
    background: #6b7280;
}

.status-dot.closed {
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}

/* Botón de ver bracket en el historial */
.btn-view-bracket {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-view-bracket:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: var(--brand-gold);
    color: var(--brand-gold);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.btn-view-bracket i {
    font-size: 1rem;
}

/* Botón de pick'ems en el historial */
.btn-pickems-compact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    background: rgba(244, 169, 66, 0.1);
    border: 1px solid rgba(244, 169, 66, 0.25);
    color: var(--brand-gold);
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-pickems-compact:hover {
    background: rgba(244, 169, 66, 0.2);
}

.btn-pickems-compact i {
    font-size: 1rem;
}

@media (max-width: 900px) {
    .tournaments-grid {
        grid-template-columns: 1fr;
    }

    .list-item {
        grid-template-columns: 60px 1fr auto;
        grid-template-areas: 
            "thumb info action"
            "thumb status action";
        gap: 0.4rem 1rem;
        align-items: center;
    }

    .list-thumb {
        grid-area: thumb;
    }

    .list-info {
        grid-area: info;
    }

    .list-status {
        grid-area: status;
    }

    .list-action {
        grid-area: action;
        display: block;
        text-align: right;
    }

    .list-stat {
        display: none;
    }
}

@media (max-width: 480px) {
    .btn-view-bracket .btn-text,
    .btn-pickems-compact .btn-text {
        display: none;
    }
    
    .btn-view-bracket,
    .btn-pickems-compact {
        padding: 0.6rem;
        border-radius: 50%;
        width: 38px;
        height: 38px;
    }
}