/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette - Modern Gaming Theme */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    /* Neutral Colors */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #475569;
    --border-light: #64748b;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-secondary: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    --gradient-dark: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    word-wrap: break-word;
    hyphens: auto;
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
    word-wrap: break-word;
    hyphens: auto;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.logo {
    max-width: 40px;
    height: auto;
}

.footer-logo {
    max-width: 40px;
    height: auto;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: var(--font-size-sm);
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
    gap: var(--spacing-sm);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-light);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
}

.btn-link {
    background: transparent;
    color: var(--primary-color);
    padding: var(--spacing-xs) var(--spacing-sm);
}

.btn-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.btn-large {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-lg);
}

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--font-size-xs);
}

/* Header */
.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) 0;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.logo {
    width: 40px;
    height: 40px;
}

.brand-name {
    font-size: var(--font-size-xl);
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: var(--spacing-lg);
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.nav-actions {
    display: flex;
    gap: var(--spacing-sm);
}

/* Hero Section */
.hero {
    padding: var(--spacing-3xl) 0;
    min-height: 80vh;
}

.hero-layout {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--spacing-3xl);
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    font-size: var(--font-size-5xl);
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-2xl);
}

.hero-actions {
    display: flex;
    gap: var(--spacing-md);
}

.hero-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-placeholder {
    width: 100%;
    height: 400px;
    background: var(--gradient-dark);
    border-radius: var(--radius-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-2xl);
    color: var(--text-muted);
    border: 2px dashed var(--border-color);
}

/* Sections */
.section-title {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
    font-size: var(--font-size-3xl);
}

.section-footer {
    text-align: center;
    margin-top: var(--spacing-2xl);
}

/* Featured Games */
.featured-games {
    padding: var(--spacing-3xl) 0;
    background: var(--bg-secondary);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
}

.game-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    position: relative;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.game-thumbnail {
    position: relative;
    height: 200px;
    background: var(--gradient-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.game-placeholder {
    font-size: 4rem;
    opacity: 0.7;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.game-card:hover .game-overlay {
    opacity: 1;
}

.game-info {
    padding: var(--spacing-lg);
}

.game-title {
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.game-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-sm);
}

.game-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.game-rating {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.stars {
    color: var(--warning-color);
    font-size: var(--font-size-sm);
}

.rating-text {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

.game-plays {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

.game-tags {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.tag {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 500;
}

/* Recent Reviews */
.recent-reviews {
    padding: var(--spacing-3xl) 0;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-xl);
}

.review-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.review-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.reviewer-avatar {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-lg);
}

.reviewer-details h4 {
    margin: 0;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
}

.review-date {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.review-rating {
    color: var(--warning-color);
    font-size: var(--font-size-sm);
}

.review-content h5 {
    margin: 0 0 var(--spacing-sm) 0;
    font-size: var(--font-size-sm);
    color: var(--primary-color);
}

.review-text {
    margin: 0 0 var(--spacing-md) 0;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.5;
}

.review-actions {
    display: flex;
    gap: var(--spacing-sm);
}

/* Page Header */
.page-header {
    padding: var(--spacing-3xl) 0;
    background: var(--gradient-dark);
    text-align: center;
}

.page-title {
    font-size: var(--font-size-4xl);
    margin-bottom: var(--spacing-md);
}

.page-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Games Filter */
.games-filter {
    padding: var(--spacing-xl) 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.filter-tabs {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.filter-tab {
    padding: var(--spacing-sm) var(--spacing-lg);
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: var(--font-size-sm);
}

.filter-tab:hover,
.filter-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Reviews Filter */
.reviews-filter {
    padding: var(--spacing-xl) 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.filter-controls {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.filter-group label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

.filter-select {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    min-width: 150px;
}

/* Games Section */
.games-section {
    padding: var(--spacing-3xl) 0;
}

/* Write Review Section */
.write-review-section {
    margin-top: var(--spacing-3xl);
    padding: var(--spacing-2xl);
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
}

.write-review-section h3 {
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

.review-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
    color: var(--text-primary);
}

.form-select,
.form-textarea {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    transition: border-color var(--transition-fast);
}

.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.rating-input {
    display: flex;
    gap: var(--spacing-xs);
    align-items: center;
    flex-direction: row-reverse; /* Обратный порядок для правильного отображения */
}

.rating-input input[type="radio"] {
    display: none;
}

.rating-input label {
    font-size: var(--font-size-2xl);
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-fast);
    margin: 0;
    order: 1; /* Все лейблы в правильном порядке */
}

.rating-input input[type="radio"]:checked,
.rating-input input[type="radio"]:checked ~ label,
.rating-input label:hover {
    color: var(--warning-color);
}



/* Подсветка всех звезд до выбранной */
.rating-input input[type="radio"]:checked ~ label {
    color: var(--warning-color);
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-3xl) 0 var(--spacing-xl) 0;
    margin-top: var(--spacing-3xl);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--spacing-3xl);
    margin-bottom: var(--spacing-2xl);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.footer-logo {
    width: 40px;
    height: 40px;
}

.footer-description {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl);
}

.footer-column h4 {
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    font-size: var(--font-size-lg);
}

.footer-column a {
    display: block;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-sm);
    transition: color var(--transition-fast);
}

.footer-column a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

/* Popups */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.popup-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    max-width: 500px;
    width: 90%;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
}

.popup-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.popup-header h2 {
    margin: 0;
    color: var(--text-primary);
}

.popup-body {
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

.popup-body p {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

.popup-footer {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-lg);
    z-index: 999;
    box-shadow: var(--shadow-lg);
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-lg);
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-text h3 {
    margin: 0 0 var(--spacing-sm) 0;
    color: var(--text-primary);
    font-size: var(--font-size-lg);
}

.cookie-text p {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.cookie-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-shrink: 0;
}

/* Game Modal */
.game-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    backdrop-filter: blur(10px);
}

.game-modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.game-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.game-modal-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: var(--font-size-2xl);
    cursor: pointer;
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.close-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.game-modal-body {
    padding: var(--spacing-lg);
    height: 70vh;
    overflow: auto;
}

#gameContainer {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

/* Legal Pages */
.legal-page {
    padding: var(--spacing-3xl) 0;
    min-height: 80vh;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h1 {
    text-align: center;
    margin-bottom: var(--spacing-sm);
}

.last-updated {
    text-align: center;
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-2xl);
}

.legal-section {
    margin-bottom: var(--spacing-2xl);
}

.legal-section h2 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.legal-section h3 {
    color: var(--text-primary);
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.legal-section ul {
    margin-left: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.legal-section li {
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
}

.company-info,
.management-info,
.contact-info {
    background: var(--bg-secondary);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    margin: var(--spacing-md) 0;
}

.address {
    margin: var(--spacing-sm) 0;
    font-style: italic;
}

/* Mobile Navigation */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: var(--font-size-xl);
    cursor: pointer;
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.mobile-menu-toggle:hover {
    background: var(--bg-tertiary);
}

.mobile-menu-toggle .hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: all var(--transition-fast);
    border-radius: 2px;
}

.mobile-menu-toggle.active .hamburger:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.game-play-btn {
    margin-top: 20px;
}

.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    z-index: 99;
}

.mobile-nav.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    padding: var(--spacing-md);
    gap: var(--spacing-sm);
}

.mobile-nav-link {
    display: block;
    padding: var(--spacing-md);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-weight: 500;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: var(--font-size-5xl);
    }
    
    .section-title {
        font-size: var(--font-size-4xl);
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
    
    .reviews-grid {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
}

@media (max-width: 1024px) {
    .container {
        padding: 0 var(--spacing-lg);
    }
    
    .hero-layout {
        gap: var(--spacing-2xl);
    }
    
    .hero-title {
        font-size: var(--font-size-4xl);
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: var(--spacing-lg);
    }
    
    .reviews-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: var(--spacing-lg);
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    
    .players-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media (max-width: 900px) and (orientation: portrait) {
    .hero-layout {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-xl);
    }
    
    .hero-title {
        font-size: var(--font-size-4xl);
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .reviews-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-md);
    }
    
    /* Mobile Navigation */
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-links {
        display: none;
    }
    
    .navbar {
        position: relative;
    }
    
    /* Typography adjustments */
    .hero-title {
        font-size: var(--font-size-3xl);
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: var(--font-size-lg);
    }
    
    .section-title {
        font-size: var(--font-size-2xl);
    }
    
    .page-title {
        font-size: var(--font-size-3xl);
    }
    
    .page-subtitle {
        font-size: var(--font-size-base);
    }
    
    /* Layout adjustments */
    .hero-layout {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-xl);
    }
    
    .hero-actions {
        justify-content: center;
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }
    
    .hero-actions .btn {
        flex: 1;
        min-width: 140px;
    }
    
    /* Grid adjustments */
    .games-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .reviews-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    .players-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    /* Card adjustments */
    .game-card,
    .review-card,
    .feature-card,
    .stat-card,
    .player-card {
        margin: 0;
    }
    
    .game-thumbnail {
        height: 180px;
    }
    
    .game-placeholder {
        font-size: 3rem;
    }
    
    /* Button adjustments */
    .btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: var(--font-size-sm);
    }
    
    .btn-large {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: var(--font-size-base);
    }
    
    /* Form adjustments */
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-md);
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-select {
        width: 100%;
        min-width: auto;
    }
    
    .filter-tabs {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-sm);
    }
    
    .filter-tab {
        text-align: center;
        padding: var(--spacing-md);
    }
    
    /* Footer adjustments */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
        text-align: center;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    /* Popup adjustments */
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .cookie-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .popup-footer {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .popup-footer .btn {
        width: 100%;
    }
    
    /* Modal adjustments */
    .game-modal-content {
        width: 95%;
        margin: var(--spacing-md);
        max-height: 95vh;
    }
    
    .game-modal-header {
        padding: var(--spacing-md);
    }
    
    .game-modal-body {
        padding: var(--spacing-md);
        height: 60vh;
    }
    
    /* Activity feed adjustments */
    .activity-item {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }
    
    .activity-avatar {
        align-self: center;
    }
    
    .activity-header {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    .activity-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    /* Review form adjustments */
    .review-form {
        padding: 0 var(--spacing-sm);
    }
    
    .rating-input {
        justify-content: center;
        flex-direction: row-reverse; /* Сохраняем правильный порядок на мобильных */
    }
    
    .rating-input label {
        font-size: var(--font-size-xl);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* Typography for small screens */
    .hero {
        padding: var(--spacing-xl) 0;
    }
    
    .hero-title {
        font-size: var(--font-size-2xl);
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: var(--font-size-base);
    }
    
    .section-title {
        font-size: var(--font-size-xl);
    }
    
    .page-title {
        font-size: var(--font-size-2xl);
    }
    
    .page-subtitle {
        font-size: var(--font-size-sm);
    }
    
    /* Layout adjustments */
    .hero-actions {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .hero-actions .btn {
        width: 100%;
        min-width: auto;
    }
    
    /* Grid adjustments */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .stat-card {
        padding: var(--spacing-md);
    }
    
    .stat-number {
        font-size: var(--font-size-3xl);
    }
    
    /* Card adjustments */
    .game-card,
    .review-card,
    .feature-card,
    .stat-card,
    .player-card {
        margin: 0;
        border-radius: var(--radius-md);
    }
    
    .game-thumbnail {
        height: 160px;
    }
    
    .game-placeholder {
        font-size: 2.5rem;
    }
    
    .game-info {
        padding: var(--spacing-md);
    }
    
    .review-card {
        padding: var(--spacing-md);
    }
    
    .feature-card {
        padding: var(--spacing-lg);
    }
    
    /* Button adjustments */
    .btn {
        padding: var(--spacing-sm) var(--spacing-sm);
        font-size: var(--font-size-xs);
        min-height: 44px; /* Touch target size */
    }
    
    .btn-large {
        padding: var(--spacing-md) var(--spacing-md);
        font-size: var(--font-size-sm);
        min-height: 48px;
    }
    
    .btn-sm {
        padding: var(--spacing-xs) var(--spacing-xs);
        font-size: var(--font-size-xs);
        min-height: 36px;
    }
    
    /* Form adjustments */
    .filter-tab {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: var(--font-size-sm);
    }
    
    .filter-select {
        padding: var(--spacing-sm) var(--spacing-sm);
        font-size: var(--font-size-sm);
    }
    
    .form-select,
    .form-textarea {
        padding: var(--spacing-sm) var(--spacing-sm);
        font-size: var(--font-size-sm);
        min-height: 44px; /* Touch target size */
    }
    
    .form-textarea {
        min-height: 100px;
    }
    
    /* Popup adjustments */
    .popup-content {
        margin: var(--spacing-sm);
        padding: var(--spacing-md);
        width: calc(100% - var(--spacing-md));
    }
    
    .popup-header h2 {
        font-size: var(--font-size-lg);
    }
    
    .popup-body p {
        font-size: var(--font-size-sm);
    }
    
    /* Modal adjustments */
    .game-modal-content {
        width: 98%;
        margin: var(--spacing-sm);
        max-height: 98vh;
    }
    
    .game-modal-header {
        padding: var(--spacing-sm);
    }
    
    .game-modal-header h3 {
        font-size: var(--font-size-lg);
    }
    
    .game-modal-body {
        padding: var(--spacing-sm);
        height: 70vh;
    }
    
    /* Cookie banner adjustments */
    .cookie-banner {
        padding: var(--spacing-md);
    }
    
    .cookie-text h3 {
        font-size: var(--font-size-base);
    }
    
    .cookie-text p {
        font-size: var(--font-size-xs);
    }
    
    .cookie-actions {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    .cookie-actions .btn {
        width: 100%;
        min-height: 44px;
    }
    
    /* Activity adjustments */
    .activity-item {
        padding: var(--spacing-md);
    }
    
    .activity-avatar {
        width: 40px;
        height: 40px;
        font-size: var(--font-size-lg);
    }
    
    .activity-user {
        font-size: var(--font-size-sm);
    }
    
    .activity-time {
        font-size: var(--font-size-xs);
    }
    
    .activity-text {
        font-size: var(--font-size-sm);
    }
    
    /* Player card adjustments */
    .player-card {
        padding: var(--spacing-md);
    }
    
    .player-avatar {
        width: 40px;
        height: 40px;
        font-size: var(--font-size-lg);
    }
    
    .player-name {
        font-size: var(--font-size-base);
    }
    
    .player-score {
        font-size: var(--font-size-xs);
    }
    
    /* Rating adjustments */
    .rating-input {
        flex-direction: row-reverse; /* Сохраняем правильный порядок на маленьких экранах */
    }
    
    .rating-input label {
        font-size: var(--font-size-lg);
    }
    
    /* Footer adjustments */
    .footer {
        padding: var(--spacing-xl) 0 var(--spacing-lg) 0;
    }
    
    .footer-brand {
        text-align: center;
    }
    
    .footer-column h4 {
        font-size: var(--font-size-base);
    }
    
    .footer-column a {
        font-size: var(--font-size-xs);
    }
    
    .footer-bottom {
        font-size: var(--font-size-xs);
    }
    
    /* Legal page adjustments */
    .legal-content {
        padding: 0 var(--spacing-sm);
    }
    
    .legal-content h1 {
        font-size: var(--font-size-2xl);
    }
    
    .legal-section h2 {
        font-size: var(--font-size-lg);
    }
    
    .legal-section h3 {
        font-size: var(--font-size-base);
    }
    
    .legal-section p,
    .legal-section li {
        font-size: var(--font-size-sm);
    }
    
    .company-info,
    .management-info,
    .contact-info {
        padding: var(--spacing-md);
    }
}

@media (max-width: 360px) {
    .container {
        padding: 0 var(--spacing-xs);
    }
    
    .hero-title {
        font-size: var(--font-size-xl);
    }
    
    .section-title {
        font-size: var(--font-size-lg);
    }
    
    .page-title {
        font-size: var(--font-size-xl);
    }
    
    .btn {
        padding: var(--spacing-xs) var(--spacing-xs);
        font-size: var(--font-size-xs);
        min-height: 40px;
    }
    
    .btn-large {
        padding: var(--spacing-sm) var(--spacing-sm);
        font-size: var(--font-size-xs);
        min-height: 44px;
    }
    
    .game-thumbnail {
        height: 140px;
    }
    
    .game-placeholder {
        font-size: 2rem;
    }
    
    .popup-content {
        margin: var(--spacing-xs);
        padding: var(--spacing-sm);
        width: calc(100% - var(--spacing-sm));
    }
    
    .game-modal-content {
        width: 99%;
        margin: var(--spacing-xs);
    }
    
    .cookie-banner {
        padding: var(--spacing-sm);
    }
    
    .footer {
        padding: var(--spacing-lg) 0 var(--spacing-md) 0;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

.pulse {
    animation: pulse 2s infinite;
}

/* Accessibility and Touch Improvements */
@media (hover: none) and (pointer: coarse) {
    /* Touch device optimizations */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .mobile-nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .filter-tab {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .game-card:hover {
        transform: none;
    }
    
    .review-card:hover {
        transform: none;
    }
    
    .feature-card:hover {
        transform: none;
    }
}

/* Focus improvements for keyboard navigation */
.btn:focus,
.nav-link:focus,
.mobile-nav-link:focus,
.filter-tab:focus,
.form-select:focus,
.form-textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #ffffff;
        --text-secondary: #ffffff;
        --text-muted: #cccccc;
    }
    
    .btn-outline {
        border-width: 2px;
    }
    
    .game-card,
    .review-card,
    .feature-card {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .fade-in,
    .slide-in,
    .pulse {
        animation: none;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }

.hidden { display: none; }
.visible { display: block; }

.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-100 { opacity: 1; }

/* Community Styles */
.community-stats {
    padding: var(--spacing-3xl) 0;
    background: var(--bg-secondary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-xl);
}

.stat-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.stat-number {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.stat-label {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.community-features {
    padding: var(--spacing-3xl) 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
}

.feature-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-lg);
}

.feature-card h3 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.feature-card p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

.recent-activity {
    padding: var(--spacing-3xl) 0;
    background: var(--bg-secondary);
}

.activity-feed {
    max-width: 800px;
    margin: 0 auto;
}

.activity-item {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.activity-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.activity-avatar {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xl);
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.activity-user {
    font-weight: 600;
    color: var(--text-primary);
}

.activity-time {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

.activity-text {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.5;
}

.activity-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.top-players {
    padding: var(--spacing-3xl) 0;
}

.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.player-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.player-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.player-rank {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--primary-color);
    min-width: 30px;
}

.player-avatar {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xl);
}

.player-info {
    flex: 1;
}

.player-name {
    color: var(--text-primary);
    margin: 0 0 var(--spacing-xs) 0;
    font-size: var(--font-size-lg);
}

.player-score {
    color: var(--text-secondary);
    margin: 0;
    font-size: var(--font-size-sm);
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}
