* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

body {
    background: #f5f7fa;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 3rem 1rem;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    flex: 1;
}

.filters {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

#search {
    width: 100%;
    max-width: 400px;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

#search:focus {
    outline: none;
    border-color: #667eea;
}

.tournament-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 3rem;
}

.tournament-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.tournament-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.card-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.card-info {
    padding: 1.5rem;
    flex: 1;
}

.card-info p {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-info i {
    width: 20px;
    color: #667eea;
}

.card-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid #eee;
}

.card-actions a {
    text-align: center;
    padding: 12px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: all 0.3s;
    border-right: 1px solid #eee;
}

.card-actions a:last-child {
    border-right: none;
}

.card-actions a:hover {
    background: #667eea;
    color: white;
}

.loading {
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    color: #666;
    grid-column: 1 / -1;
}

footer {
    text-align: center;
    padding: 2rem;
    background: white;
    margin-top: 3rem;
    border-top: 1px solid #e0e0e0;
    color: #666;
}

/* Адаптивность */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .tournament-grid {
        grid-template-columns: 1fr;
    }
}