﻿/* ============================================
   БЛОК ИГР - GAMES.CSS
   ============================================ */

/* Основные стили для блока игр */
.games-block {
    margin: 40px 0;
    padding: 30px 0;
}

.games-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.games-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #ffffff;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.games-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #6bc926, #42f71e);
    color: #000;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(87, 255, 53, 0.3);
}

.games-view-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(93, 255, 53, 0.4);
    color: #000;
    background: linear-gradient(135deg, #42f71e, #6bc926);
}

/* Фильтры и подкнопки */
.games-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.filter-btn:hover,
.filter-btn.active {
    color: #000;
    background: linear-gradient(135deg, #6bc926, #42f71e);
    border-color: #6bc926;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(93, 255, 53, 0.3);
}

/* Сортировка и управление */
.games-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.sort-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sort-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.sort-btn:hover,
.sort-btn.active {
    background: linear-gradient(135deg, #6bc926, #42f71e);
    border-color: #6bc926;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(87, 255, 53, 0.3);
    color: #000;
}

.theme-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.theme-filter {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.theme-filter:hover,
.theme-filter.active {
    background: rgba(87, 255, 53, 0.8);
    color: #000;
    border-color: #6bc926;
}

/* Категории игр */
.game-categories {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.category-btn:hover::before {
    left: 100%;
}

.category-btn:hover,
.category-btn.active {
    background: linear-gradient(135deg, #6bc926, #42f71e);
    border-color: #6bc926;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(87, 255, 53, 0.4);
    color: #000;
}

/* Сетка игр */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* Карточка игры */
.game-card {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.game-card:hover {
    box-shadow: 0 20px 40px rgba(100, 255, 53, 0.3);
    border-color: rgba(53, 255, 63, 0.5);
}

.game-image-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.game-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.game-card:hover .game-image {
    transform: scale(1.05);
}

/* Иконка типа игры */
.game-type-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
    z-index: 2;
}

.game-type-icon.slot {
    background: rgba(138, 43, 226, 0.8);
}

.game-type-icon.crash {
    background: rgba(255, 69, 0, 0.8);
}

.game-type-icon.arcade {
    background: rgba(34, 139, 34, 0.8);
}

.game-type-icon.wheel {
    background: rgba(255, 215, 0, 0.8);
}

/* Оверлей с кнопкой Play */
.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.game-card:hover .game-overlay {
    opacity: 1;
    visibility: visible;
}

.play-btn {
    background: linear-gradient(135deg, #6bc926, #42f71e);
    color: #000;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    z-index: 1111111111;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-bottom: 10px;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.play-btn:hover {
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(100, 255, 53, 0.6);
}

.demo-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.demo-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Информация об игре */
.game-info {
    padding: 20px;
    text-align: center;
}

.game-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 8px 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.game-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    line-height: 1.4;
}

/* Бейджи и метки */
.game-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 2;
}

.game-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-popular {
    background: linear-gradient(135deg, #6bc926, #42f71e);
    color: white;
    box-shadow: 0 2px 8px rgba(87, 255, 53, 0.4);
}

.badge-new {
    background: linear-gradient(135deg, #00ff87, #60efff);
    color: #000;
    box-shadow: 0 2px 8px rgba(0, 255, 135, 0.4);
}

.badge-hot {
    background: linear-gradient(135deg, #ff0066, #ff6b00);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 0, 102, 0.4);
}

/* Время игры */
.game-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    backdrop-filter: blur(5px);
}

/* CTA кнопки */
.games-cta {
    text-align: center;
    margin-top: 40px;
}

.cta-register {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #6bc926, #42f71e);
    color: #000;
    text-decoration: none;
    padding: 18px 36px;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(127, 255, 53, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-register:hover {
    transform: translateY(-3px);
    color: #000;
    box-shadow: 0 15px 35px rgba(100, 255, 53, 0.6);
    background: linear-gradient(135deg, #42f71e, #6bc926);
}

.cta-bonus {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    padding: 16px 32px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    margin-left: 15px;
}

.cta-bonus:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* Lazy loading эффект */
.game-image.loading {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-image.loaded {
    opacity: 1;
}

/* Адаптивность */
@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .games-header {
        flex-direction: column;
        align-items: center;
    }
    
    .games-title {
        font-size: 2rem;
    }
    
    .games-filters {
        justify-content: center;
    }
    
    .games-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .game-categories {
        justify-content: center;
    }
    
    .cta-bonus {
        margin-left: 0;
        margin-top: 15px;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .games-title {
        font-size: 1.8rem;
    }
    
    .filter-btn,
    .sort-btn,
    .category-btn {
        font-size: 0.8rem;
        padding: 8px 12px;
    }
}

/* Анимации загрузки */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.game-card.loading {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 200px 100%;
    animation: shimmer 2s infinite;
}
