/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FF6B35;
    --secondary-color: #FFD700;
    --dark-bg: #0A0A0A;
    --darker-bg: #050505;
    --text-light: #FFFFFF;
    --text-gray: #CCCCCC;
    --accent-blue: #4A90E2;
    --accent-purple: #8B5CF6;
    --gradient-primary: linear-gradient(135deg, #FF6B35 0%, #FF8E53 100%);
    --gradient-dark: linear-gradient(135deg, #0A0A0A 0%, #1A1A1A 100%);
    --shadow-glow: 0 0 20px rgba(255, 107, 53, 0.3);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--text-light);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--secondary-color);
}

p {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 107, 53, 0.2);
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-light);
    font-weight: 700;
    font-size: 1.5rem;
}

.logo img {
    width: 40px;
    height: 40px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-gray);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: var(--gradient-dark);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.hero h1 {
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.cta-button {
    display: inline-block;
    background: var(--gradient-primary);
    color: var(--text-light);
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-glow);
    animation: fadeInUp 1s ease-out 0.4s both;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.4);
}

/* Games Section */
.games-section {
    padding: 5rem 0;
    background: var(--darker-bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.game-card {
    background: rgba(26, 26, 26, 0.8);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 107, 53, 0.2);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.game-card:hover::before {
    opacity: 0.1;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary-color);
}

.game-card * {
    position: relative;
    z-index: 2;
}

.game-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.game-card h3 {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.game-card p {
    margin-bottom: 1.5rem;
}

.game-link {
    display: inline-block;
    background: transparent;
    color: var(--primary-color);
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: auto;
}

.game-link:hover {
    background: var(--primary-color);
    color: var(--text-light);
}

/* Reviews Section */
.reviews-section {
    padding: 5rem 0;
    background: var(--dark-bg);
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.review-card {
    background: rgba(26, 26, 26, 0.8);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 107, 53, 0.2);
    transition: all 0.3s ease;
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-direction: column;
    margin-bottom: 1.5rem;
}

.review-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
}

.review-info h4 {
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.review-info .location {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.review-rating {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.star {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.review-text {
    font-style: italic;
    color: var(--text-gray);
}

/* Footer */
.footer {
    background: var(--darker-bg);
    padding: 3rem 0 1rem;
    border-top: 1px solid rgba(255, 107, 53, 0.2);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.footer-section a {
    color: var(--text-gray);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 107, 53, 0.2);
    color: var(--text-gray);
}

/* Age Verification Modal */
.age-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none; /* Скрыт по умолчанию */
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(10px);
}

.age-modal.show {
    display: flex; /* Показать только при наличии класса show */
}

.age-modal.hidden {
    display: none;
}

.age-modal-content {
    background: var(--dark-bg);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    margin: 2rem;
    border: 1px solid var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.age-modal h2 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.age-modal p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.age-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.age-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.age-btn.confirm {
    background: var(--gradient-primary);
    color: var(--text-light);
}

.age-btn.deny {
    background: transparent;
    color: var(--text-gray);
    border: 2px solid var(--text-gray);
}

.age-btn:hover {
    transform: translateY(-2px);
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--darker-bg);
    border-top: 1px solid var(--primary-color);
    padding: 1.5rem 2rem;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-text {
    flex: 1;
    color: var(--text-gray);
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
}

.cookie-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.cookie-btn.accept {
    background: var(--gradient-primary);
    color: var(--text-light);
}

.cookie-btn.decline {
    background: transparent;
    color: var(--text-gray);
    border: 1px solid var(--text-gray);
}

.cookie-btn:hover {
    transform: translateY(-2px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Filter Buttons */
.filter-btn {
    background: transparent;
    color: var(--text-gray);
    border: 2px solid rgba(255, 107, 53, 0.3);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: var(--gradient-primary);
    color: var(--text-light);
    border-color: var(--primary-color);
}

/* Review Date */
.review-date {
    color: var(--text-gray);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 107, 53, 0.2);
    padding: 1rem 0;
}

.mobile-menu.show {
    display: block;
}

.mobile-menu ul {
    list-style: none;
    padding: 0 2rem;
}

.mobile-menu li {
    margin-bottom: 1rem;
}

.mobile-menu a {
    color: var(--text-gray);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    display: block;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.mobile-menu a:hover {
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-container {
        padding: 0 1.5rem;
    }
    
    .container {
        padding: 0 1.5rem;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .reviews-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .hero {
        min-height: 80vh;
        padding: 2rem 0;
    }

    .pros-cons {
        grid-template-columns: 1fr !important;
    }
    
    .hero-content {
        padding: 0 1rem;
    }
    
    .hero h1 {
        font-size: clamp(2rem, 8vw, 3rem);
        margin-bottom: 1rem;
    }
    
    .hero p {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
    
    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .games-section,
    .reviews-section {
        padding: 3rem 0;
    }
    
    .section-title h2 {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }
    
    .games-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .game-card,
    .review-card {
        padding: 1.5rem;
    }
    
    .game-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .review-header {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .review-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .cookie-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .age-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .age-modal-content {
        margin: 1rem;
        padding: 2rem;
    }
    
    .age-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 0.5rem;
    }
    
    .container {
        padding: 0 0.5rem;
    }
    
    .header {
        padding: 0.5rem 0;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .logo img {
        width: 30px;
        height: 30px;
    }
    
    .hero {
        min-height: 70vh;
        padding: 1rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
        margin-bottom: 0.8rem;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 1.2rem;
    }
    
    .cta-button {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .games-section,
    .reviews-section {
        padding: 2rem 0;
    }
    
    .section-title {
        margin-bottom: 2rem;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .game-card,
    .review-card {
        padding: 1rem;
        border-radius: 15px;
    }
    
    .game-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .game-card h3 {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }
    
    .game-card p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .game-link {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    .review-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .review-info h4 {
        font-size: 1rem;
    }
    
    .review-info .location {
        font-size: 0.8rem;
    }
    
    .review-text {
        font-size: 0.9rem;
    }
    
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-section h3 {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }
    
    .footer-section a {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
    
    .cookie-banner {
        padding: 1rem 0.5rem;
    }
    
    .cookie-text p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .cookie-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    .age-modal-content {
        margin: 0.5rem;
        padding: 1.5rem;
    }
    
    .age-modal h2 {
        font-size: 1.5rem;
    }
    
    .age-modal p {
        font-size: 1rem;
    }
    
    .age-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 320px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    .cta-button {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    .game-card,
    .review-card {
        padding: 0.8rem;
    }
    
    .section-title h2 {
        font-size: 1.5rem;
    }
    
    .age-modal-content {
        padding: 1rem;
    }
}

/* Game Styles */
.game-container {
    background: rgba(26, 26, 26, 0.9);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 107, 53, 0.2);
    margin: 2rem 0;
    text-align: center;
}

.game-header {
    margin-bottom: 1.5rem;
}

.game-header h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.game-stats span {
    color: var(--text-gray);
    font-weight: 500;
}

.game-controls {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.game-btn {
    background: var(--gradient-primary);
    color: var(--text-light);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

.game-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.game-instructions {
    margin-top: 1rem;
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* Snake Game Styles */
#snakeCanvas {
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    background: var(--dark-bg);
    display: block;
    margin: 0 auto;
}

/* Memory Game Styles */
.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.memory-card {
    aspect-ratio: 1;
    background: var(--dark-bg);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.memory-card.flipped {
    transform: rotateY(180deg);
}

.memory-card.matched {
    border-color: var(--secondary-color);
    background: rgba(255, 215, 0, 0.1);
}

.card-back, .card-front {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border-radius: 8px;
    backface-visibility: hidden;
}

.card-back {
    background: var(--primary-color);
    color: var(--text-light);
}

.card-front {
    background: var(--darker-bg);
    color: var(--secondary-color);
    transform: rotateY(180deg);
}

/* Tic Tac Toe Styles */
.tic-tac-toe-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    max-width: 300px;
    margin: 0 auto;
}

.tic-tac-toe-cell {
    aspect-ratio: 1;
    background: var(--dark-bg);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-light);
}

.tic-tac-toe-cell:hover {
    background: rgba(255, 107, 53, 0.1);
}

.tic-tac-toe-cell.x {
    color: var(--primary-color);
}

.tic-tac-toe-cell.o {
    color: var(--secondary-color);
}

.current-player {
    margin: 1rem 0;
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 600;
}

/* Responsive Game Styles */
@media (max-width: 768px) {
    .game-container {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .game-stats {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .game-controls {
        gap: 0.5rem;
    }
    
    .game-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    #snakeCanvas {
        width: 100%;
        max-width: 350px;
        height: auto;
    }
    
    .memory-grid {
        max-width: 300px;
        gap: 0.5rem;
    }
    
    .memory-card {
        font-size: 1.5rem;
    }
    
    .tic-tac-toe-grid {
        max-width: 250px;
    }
    
    .tic-tac-toe-cell {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .game-container {
        padding: 1rem;
    }
    
    .game-header h3 {
        font-size: 1.2rem;
    }
    
    .game-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .game-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .game-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .memory-grid {
        max-width: 250px;
    }
    
    .tic-tac-toe-grid {
        max-width: 200px;
    }
}
