* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #121212;
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Изменено с center на flex-start для лучшего скроллинга */
    padding: 20px;
}

.main-container {
    width: 100%;
    max-width: 1200px;
    padding: 20px 0; /* Добавлено для отступов сверху/снизу */
}

.header {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: #e63946;
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative; /* Для возможных декоративных элементов */
}
.header-content {
    position: relative;
    display: inline-block;
}
.auth-buttons {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    display: flex;
    gap: 10px;
}

.auth-button {
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}
.search-bar {
    text-align: center;
    margin-bottom: 30px; /* Увеличен отступ */
}

.search-bar input {
    width: 80%;
    max-width: 600px;
    padding: 12px 20px; /* Увеличен padding для лучшего UX */
    border-radius: 25px; /* Скругленные углы */
    border: none;
    font-size: 1rem;
    background: #2a2a2a; /* Темный фон для input */
    color: white;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    outline: 2px solid #e63946; /* Акцент при фокусе */
    box-shadow: 0 0 10px rgba(230, 57, 70, 0.5);
}

.anime-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px;
}

.anime-item {
    text-decoration: none;
    color: inherit;
    background: #1e1e1e;
    border-radius: 10px;
    overflow: hidden;
    opacity: 1; /* Изменено с 0 на 1 (элементы должны быть видны по умолчанию) */
    transition: all 0.3s ease;
    display: block;
    transform: translateY(0);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.anime-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.anime-item.hidden {
    display: none; /* Просто скрываем элементы */
    /* Убраны лишние свойства (height, padding и т.д.) */
}

.anime-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-bottom: 3px solid #e63946;
    transition: transform 0.3s ease; /* Анимация для изображения */
}

.anime-item:hover img {
    transform: scale(1.03); /* Эффект увеличения при наведении */
}

.anime-info {
    padding: 20px;
    text-align: center;
}

.anime-info h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: #f1faee;
    transition: color 0.3s ease;
}

.anime-item:hover .anime-info h3 {
    color: #e63946; /* Изменение цвета при наведении */
}

.anime-info p {
    color: #a8dadc;
    font-size: 1rem;
}

/* Анимация появления элементов */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.anime-item {
    animation: fadeIn 0.5s ease forwards;
}

/* Медиа-запросы */
@media (max-width: 768px) {
    .anime-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .anime-item img {
        height: 300px; /* Уменьшенная высота для мобильных */
    }
    
    .header {
        font-size: 2rem;
    }
    
    .search-bar input {
        width: 90%;
        padding: 10px 15px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .header {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    
    .anime-info h3 {
        font-size: 1.3rem;
    }
}

.login-btn {
    background-color: #2a2a2a;
    color: #f1faee;
    border: 1px solid #e63946;
}

.login-btn:hover {
    background-color: #e63946;
    color: #f1faee;
}

.register-btn {
    background-color: #e63946;
    color: #f1faee;
    border: 1px solid #e63946;
}

.register-btn:hover {
    background-color: #c1121f;
    border-color: #c1121f;
}
@media (max-width: 768px) {
    .auth-buttons {
        position: static;
        transform: none;
        justify-content: center;
        margin-top: 15px;
    }
    
    .header-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
}

.game-btn {
    padding: 15px 30px; /* Увеличиваем размер */
    border: 2px solid #e63946; /* Красная обводка */
    background-color: transparent; /* Прозрачный фон */
    color: #f1faee; /* Белый текст */
    font-size: 1.2rem; /* Увеличиваем шрифт */
    font-weight: bold;
    text-transform: uppercase;
}

.game-btn:hover {
    background-color: #e63946; /* Красный фон при наведении */
    color: #121212; /* Чёрный текст при наведении */
}