/* tournament-index.css */

.ti-hero {
    padding: 140px 0 60px;
    background: #030712 radial-gradient(circle at top, rgba(37, 99, 235, 0.15) 0%, transparent 60%);
    text-align: center;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #fff;
}

.ti-hero .breadcrumb {
    justify-content: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 16px;
    display: flex;
    gap: 8px;
}

.ti-hero .breadcrumb a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s;
}

.ti-hero .breadcrumb a:hover {
    color: #60a5fa;
}

.ti-hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.ti-hero p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 16px;
}

/* Advanced Filters */
.ti-filters {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(16px);
    box-shadow: 0 4px 24px rgba(0,0,0,0.04);
}

.ti-filters-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 0 24px;
    flex-wrap: wrap;
}

.ti-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 160px;
}

.ti-filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ti-filter-input {
    background: #fff;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.ti-filter-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ti-filter-input::placeholder {
    color: #94a3b8;
}

select.ti-filter-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

select.ti-filter-input option {
    background: #fff;
    color: #0f172a;
}

.ti-filter-actions {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex: 0;
    padding-top: 24px;
}

.btn-filter-apply, .btn-filter-reset {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    height: 45px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-filter-apply {
    background: #3b82f6;
    color: #fff;
}

.btn-filter-apply:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.btn-filter-reset {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.btn-filter-reset:hover {
    background: #e2e8f0;
}

/* Grid & Content */
.ti-content {
    max-width: 1200px;
    margin: 40px auto 100px;
    padding: 0 24px;
}

.tourn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.ti-loader {
    text-align: center;
    padding: 60px;
    color: #64748b;
    font-size: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.ti-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 16px;
    border: 1px dashed #cbd5e1;
}

.ti-empty-icon {
    font-size: 56px;
    margin-bottom: 20px;
}

.ti-empty-title {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
}

.ti-empty-desc {
    font-size: 16px;
    color: #64748b;
    max-width: 400px;
    margin: 0 auto;
}

/* Fix completed badge on white/light cards */
.tourn-card-light .tc-live-badge.completed {
    background: rgba(100, 116, 139, 0.08);
    border-color: rgba(100, 116, 139, 0.2);
    color: #475569;
}

/* Ensure the grid fills the section */
#tourn-grid {
    min-height: 200px;
}

@media (max-width: 768px) {
    .ti-hero {
        padding: 100px 0 40px;
    }
    .ti-hero h1 {
        font-size: 32px;
    }
    .ti-filters-inner {
        flex-direction: column;
        align-items: stretch;
    }
    .ti-filter-actions {
        width: 100%;
        padding-top: 8px;
    }
    .btn-filter-apply, .btn-filter-reset {
        flex: 1;
    }
}
