/* styles/non-critical.css */

/* Анимации и переходы */
.btn-login, .btn-register {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-login {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-register {
    background: var(--accent-green);
    color: white;
}

.btn-login:hover {
    background: white;
    color: var(--primary-blue);
}

.btn-register:hover {
    background: #27AE60;
    transform: scale(1.05);
}

/* Детальные стили для игровых карточек */
.game-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover img {
    transform: scale(1.05);
}

.game-info {
    padding: 1rem;
}

.game-info h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.game-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Стили для CTA кнопки */
.cta-button {
    background: linear-gradient(45deg, var(--accent-green), #27AE60);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.4);
}

/* ========== НОВЫЕ СТИЛИ ДЛЯ ИГРОВОЙ СЕТКИ ========== */

/* Дополнительные стили для игровых карточек */
.game-image {
    position: relative;
    overflow: hidden;
}

.game-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-red);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 2;
}

.game-badge.new {
    background: var(--accent-green);
}

.game-badge.hot {
    background: #FF6B00;
}

.game-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.game-info h3 {
    color: var(--text-primary);
    font-size: 1rem;
    margin: 0;
    line-height: 1.3;
}

.game-info p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin: 0;
    opacity: 0.8;
}

.game-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.feature {
    background: var(--border-light);
    color: var(--text-secondary);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    white-space: nowrap;
}

/* Стили для кнопки Играть */
.play-button {
    background: linear-gradient(45deg, var(--accent-green), #27AE60);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: auto;
}

.play-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.4);
    background: linear-gradient(45deg, #27AE60, var(--accent-green));
}

/* Анимация появления карточек */
.game-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.game-card:nth-child(1) { animation-delay: 0.1s; }
.game-card:nth-child(2) { animation-delay: 0.2s; }
.game-card:nth-child(3) { animation-delay: 0.3s; }
.game-card:nth-child(4) { animation-delay: 0.4s; }
.game-card:nth-child(5) { animation-delay: 0.5s; }
.game-card:nth-child(6) { animation-delay: 0.6s; }
.game-card:nth-child(7) { animation-delay: 0.7s; }
.game-card:nth-child(8) { animation-delay: 0.8s; }
.game-card:nth-child(9) { animation-delay: 0.9s; }
.game-card:nth-child(10) { animation-delay: 1.0s; }
.game-card:nth-child(11) { animation-delay: 1.1s; }
.game-card:nth-child(12) { animation-delay: 1.2s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Эффекты при наведении для карточек */
.game-card:hover .game-image img {
    transform: scale(1.1);
}

.game-card:hover .play-button {
    background: linear-gradient(45deg, #219653, var(--accent-green));
}

/* Стили для уведомлений */
.game-notification {
    transition: all 0.3s ease;
}

.notification-content h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.notification-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid var(--border-light);
    border-top: 3px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Стили для быстрых фильтров */
.quick-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0 2rem;
    flex-wrap: wrap;
}

.quick-filter {
    background: var(--background-white);
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
}

.quick-filter:hover,
.quick-filter.active {
    background: var(--primary-blue);
    color: white;
}

.quick-filter.new {
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.quick-filter.new:hover,
.quick-filter.new.active {
    background: var(--accent-green);
    color: white;
}

.quick-filter.popular {
    border-color: #FF6B00;
    color: #FF6B00;
}

.quick-filter.popular:hover,
.quick-filter.popular.active {
    background: #FF6B00;
    color: white;
}

/* Стили для счетчика игр */
.games-counter {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Стили для фильтров игр */
.games-filter {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-button {
    background: var(--background-white);
    border: 2px solid var(--border-light);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-button:hover,
.filter-button.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* ========== КОНЕЦ НОВЫХ СТИЛЕЙ ДЛЯ ИГРОВОЙ СЕТКИ ========== */

/* Стили для футера */
footer {
    background: var(--text-primary);
    color: white;
    padding: 3rem 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

.footer-section a {
    color: #CCCCCC;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--background-white);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Кастомный скроллбар */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-blue);
}

/* Специфические стили для iPhone */
@supports (-webkit-touch-callout: none) {
    .game-card {
        -webkit-tap-highlight-color: transparent;
    }
    
    .cta-button {
        -webkit-appearance: none;
    }
    
    .play-button {
        -webkit-appearance: none;
    }
}

/* Адаптивность для очень маленьких экранов */
@media (max-width: 360px) {
    .top-bar {
        padding: 0.5rem;
    }
    
    .nav-item {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .hero-banner {
        height: 150px;
        font-size: 1.2rem;
    }
}

/* Адаптивность для игровой сетки */
@media (max-width: 768px) {
    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.75rem;
    }
    
    .game-info {
        padding: 0.75rem;
    }
    
    .game-info h3 {
        font-size: 0.9rem;
    }
    
    .play-button {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    .feature {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }
    
    .quick-filters {
        gap: 0.5rem;
    }
    
    .quick-filter {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .game-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .game-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    .games-filter {
        gap: 0.25rem;
    }
    
    .filter-button {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Стили для темной темы (опционально) */
@media (prefers-color-scheme: dark) {
    :root {
        --background-white: #1a1a1a;
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
        --border-light: #333333;
    }
    
    .game-card {
        background: #2d2d2d;
    }
    
    .feature {
        background: #404040;
        color: #cccccc;
    }
    
    .quick-filter {
        background: #2d2d2d;
        border-color: var(--primary-blue);
        color: var(--primary-blue);
    }
    
    .filter-button {
        background: #2d2d2d;
        border-color: #404040;
        color: #cccccc;
    }
}

/* Стили для печати */
@media print {
    .top-bar, .cta-button, footer, .play-button, .quick-filters, .games-filter {
        display: none;
    }
    
    .game-card {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
}

/* Дополнительные утилитарные классы */
.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

/* Стили для состояний загрузки */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-light);
    border-top: 2px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Стили для пульсации при наведении */
.pulse:hover {
    animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Градиентные тексты */
.gradient-text {
    background: linear-gradient(45deg, var(--primary-blue), var(--secondary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Тени для карточек */
.card-shadow {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.card-shadow:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

/* Стили для разделителей */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
    margin: 3rem 0;
}

/* Стили для бейджей с иконками */
.badge-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.badge-icon {
    width: 12px;
    height: 12px;
}
/* Простая адаптивность */
.game-image {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    background: #f8f9fa;
}

.game-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

/* Адаптивность */
@media (max-width: 768px) {
    .game-image {
        padding-bottom: 75%; /* 4:3 для планшетов */
    }
}

@media (max-width: 480px) {
    .game-image {
        padding-bottom: 100%; /* Квадрат для мобильных */
    }
}

