/* Tournaments List Page Styles */

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--bg-card);
    border-bottom: 2px solid var(--border-color);
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.header-left {
    flex-shrink: 0;
}

.header h1 {
    flex: 1;
    text-align: center;
    margin: 0;
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
}

/* Filters Section */
.filters {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.search-box {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-card);
    color: var(--text-light);
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color, #ff6b35);
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-filter {
    padding: 10px 20px;
    border: 2px solid rgba(168, 85, 247, 0.3);
    background: var(--bg-card);
    color: var(--text-light);
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.btn-filter::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(147, 51, 234, 0.15));
    transition: left 0.3s ease;
    z-index: 0;
}

.btn-filter:hover::before {
    left: 0;
}

.btn-filter:hover {
    border-color: var(--primary-color);
    color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.2);
}

.btn-filter span {
    position: relative;
    z-index: 1;
}

.btn-filter.active {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 5px 20px var(--glow-primary);
}

/* Loading and Empty States */
.loading-state,
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 107, 53, 0.2);
    border-top-color: var(--primary-color, #ff6b35);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h2 {
    color: #333;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #666;
}

/* Tournaments Grid */
.tournaments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

/* Tournament Card */
.tournament-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.tournament-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 5px 20px var(--glow-primary);
}

.tournament-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
}

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

.tournament-card-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tournament-card-meta {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.badge-brackets {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-leaderboard {
    background: #f3e5f5;
    color: #7b1fa2;
}

.badge-1v1 {
    background: #fff3e0;
    color: #f57c00;
}

.badge-team {
    background: #e8f5e9;
    color: #388e3c;
}

.badge-pending {
    background: rgba(251, 191, 36, 0.2);
    color: var(--warning-color);
    border: 1px solid var(--warning-color);
}

.badge-active {
    background: #c8e6c9;
    color: #2e7d32;
}

.badge-completed {
    background: #e0e0e0;
    color: #616161;
}

.tournament-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-icon {
    width: 20px;
    text-align: center;
}

.tournament-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.prize-pool {
    font-weight: bold;
    color: var(--primary-color, #ff6b35);
    font-size: 1.1rem;
}

.participants-count {
    color: #666;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tournaments-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .search-box {
        flex-direction: column;
    }
}
