/* assets/css/style.css - Полные стили для сайта */

:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --dark: #1a1a2e;
    --light: #f8f9fa;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #333;
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animated-bg::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' opacity='0.1'%3E%3Ccircle cx='20' cy='20' r='2'/%3E%3Ccircle cx='80' cy='30' r='3'/%3E%3Ccircle cx='50' cy='70' r='2'/%3E%3Ccircle cx='90' cy='80' r='1'/%3E%3C/svg%3E");
    animation: float 20s linear infinite;
}

@keyframes float {
    from { transform: translateY(0px); }
    to { transform: translateY(-100px); }
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo a {
    text-decoration: none;
}

.logo h1 {
    color: var(--primary);
    font-size: 1.8rem;
    font-weight: 700;
}

nav a {
    color: #333;
    text-decoration: none;
    margin-left: 30px;
    transition: color 0.3s;
    font-weight: 500;
}

nav a:hover {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* Banners */
.banner-top-container {
    max-width: 1000px;
    margin: 20px auto;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 0 20px;
}

.banner {
    width: 468px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-placeholder {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
}

/* Search & Filter */
.search-filter-section {
    background: rgba(255,255,255,0.95);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.search-wrapper {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-wrapper input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
}

.search-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-wrapper select {
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    background: white;
    cursor: pointer;
}

.genre-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.genre-btn {
    display: inline-block;
    padding: 8px 20px;
    background: #f0f0f0;
    text-decoration: none;
    color: #333;
    border-radius: 25px;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
}

.genre-btn:hover,
.genre-btn.active {
    background: var(--primary);
    color: white;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.game-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.game-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: #f0f0f0;
}

.game-info {
    padding: 15px;
}

.game-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-description-short {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.play-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.2s;
}

.play-btn:hover {
    transform: scale(1.02);
}

.no-games {
    text-align: center;
    padding: 50px;
    font-size: 18px;
    color: white;
    background: rgba(0,0,0,0.3);
    border-radius: 15px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-block;
    padding: 10px 15px;
    background: rgba(255,255,255,0.9);
    text-decoration: none;
    color: #333;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 500;
}

.page-btn:hover,
.page-btn.active {
    background: var(--primary);
    color: white;
}

.page-dots {
    padding: 10px 5px;
    color: white;
}

/* Game Page */
.back-button {
    background: rgba(255,255,255,0.95);
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    margin: 20px 0;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
}

.back-button:hover {
    background: white;
    transform: translateX(-5px);
}

.game-page h1 {
    color: white;
    margin-bottom: 20px;
    font-size: 2rem;
}

.game-container {
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.game-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
}

.game-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.game-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-content {
    text-align: center;
    color: white;
}

.placeholder-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.placeholder-content p {
    margin-bottom: 20px;
    font-size: 18px;
}

.start-game-btn {
    padding: 15px 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.2s;
    font-weight: 600;
}

.start-game-btn:hover {
    transform: scale(1.05);
}

.fullscreen-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    z-index: 10;
    font-size: 14px;
    transition: background 0.3s;
}

.fullscreen-btn:hover {
    background: rgba(0,0,0,0.9);
}

.game-description {
    background: rgba(255,255,255,0.95);
    border-radius: 15px;
    padding: 30px;
    margin-top: 20px;
}

.game-description h2 {
    margin-bottom: 15px;
    color: var(--primary);
    font-size: 1.5rem;
}

.game-description h3 {
    margin: 25px 0 10px;
    color: var(--primary);
    font-size: 1.2rem;
}

.game-description p {
    line-height: 1.7;
    color: #444;
}

.game-genres {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.genre-tag {
    display: inline-block;
    background: #f0f0f0;
    padding: 5px 12px;
    border-radius: 20px;
    margin: 5px 5px 0 0;
    font-size: 12px;
    color: #666;
}

.game-stats {
    margin-top: 20px;
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #666;
}

.stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Page Content */
.page-content {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 40px;
    margin: 30px auto;
    min-height: 500px;
}

.page-content h1 {
    color: var(--primary);
    margin-bottom: 25px;
    font-size: 2rem;
}

.page-content .content {
    line-height: 1.8;
    color: #333;
}

.page-content .content h2 {
    margin: 20px 0 10px;
    color: var(--primary);
}

.page-content .content ul, 
.page-content .content ol {
    margin: 15px 0 15px 25px;
}

.page-content .content li {
    margin: 8px 0;
}

/* Ad Overlay */
.ad-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    max-width: 90%;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.ad-banner {
    width: 468px;
    max-width: 100%;
    height: auto;
    min-height: 60px;
    background: #f0f0f0;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    overflow: hidden;
}

.ad-banner img {
    max-width: 100%;
    height: auto;
}

.timer-container {
    text-align: center;
}

.timer-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.timer-countdown {
    font-size: 48px;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 20px;
}

.continue-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.2s;
    font-weight: 600;
}

.continue-btn:hover {
    transform: scale(1.05);
}

/* Footer */
footer {
    background: rgba(0,0,0,0.9);
    color: white;
    padding: 40px 0 20px;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
    color: rgba(255,255,255,0.6);
}

/* Error Page */
.error-page {
    text-align: center;
    padding: 80px 20px;
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    margin: 50px auto;
}

.error-page h1 {
    font-size: 80px;
    color: var(--primary);
    margin-bottom: 20px;
}

.error-page p {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

/* Responsive */
@media (max-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    nav {
        display: none;
    }
    
    nav.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }
    
    nav.active a {
        margin: 10px 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .banner {
        width: 100%;
        max-width: 468px;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
    
    .game-title {
        font-size: 0.9rem;
    }
    
    .game-description-short {
        font-size: 0.75rem;
    }
    
    .search-wrapper {
        flex-direction: column;
    }
    
    .genre-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
    }
    
    .page-content {
        padding: 20px;
    }
    
    .game-page h1 {
        font-size: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .game-image {
        height: 120px;
    }
    
    .game-info {
        padding: 10px;
    }
    
    .game-title {
        font-size: 0.85rem;
    }
    
    .play-btn {
        padding: 8px;
        font-size: 12px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .ad-container {
        padding: 20px;
    }
    
    .timer-countdown {
        font-size: 36px;
    }
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 50px;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}