/* SECTION: CSS Variables and Root Styles */
:root {
  /* Чистые цвета без градиентов */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --accent: #007aff;
  --accent-2: #4c96d9;
  --text: #333333;
  --text-light: #666666;
  --muted: #888888;
  --primary: #007aff;
  --secondary: #4c96d9;
  --success: #43ad5e;
  --warning: #ffa800;
  --error: #ff3d00;
  --white: #ffffff;
  --black: #000000;
  --dark: #1a1a1a;
  --light: #f5f5f5;
  --border: #e0e0e0;
  --shadow: rgba(0, 0, 0, 0.1);
}

/* SECTION: Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

/* SECTION: Typography */
h1 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text);
}

h2 {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.8rem;
  color: var(--text);
}

h3 {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.6rem;
  color: var(--text);
}

p {
  margin-bottom: 1rem;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-2);
}

/* SECTION: Layout Components */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 60px 0;
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* SECTION: Header Styles */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px var(--shadow);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px var(--shadow);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav a {
  color: var(--text);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.nav a:hover,
.nav a.active {
  background: rgba(0, 122, 255, 0.1);
  color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* SECTION: Mobile Menu */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text);
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.3s ease;
}

.mobile-menu-toggle:hover {
  color: var(--accent);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 20px var(--shadow);
  z-index: 1000;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}

.mobile-nav.active {
  display: block;
}

.mobile-nav ul {
  list-style: none;
  padding: 1rem 0;
}

.mobile-nav ul li {
  border-bottom: 1px solid var(--border);
}

.mobile-nav ul li:last-child {
  border-bottom: none;
}

.mobile-nav ul li a {
  display: block;
  padding: 1rem 2rem;
  color: var(--text);
  font-weight: 500;
  transition: all 0.3s ease;
}

.mobile-nav ul li a:hover,
.mobile-nav ul li a.active {
  background: rgba(0, 122, 255, 0.1);
  color: var(--accent);
}

.mobile-register-btn {
  display: none;
}

/* SECTION: Button Styles */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
  font-size: 16px;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
}

.btn-primary:hover {
  background: var(--accent-2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
}

.btn-success {
  background: var(--success);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(67, 173, 94, 0.3);
}

.btn-success:hover {
  background: #5cbf73;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(67, 173, 94, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: var(--white);
}

/* SECTION: Mobile CTA Button */
.mobile-cta {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  background: var(--success);
  color: var(--white);
  padding: 16px;
  border-radius: 40px;
  text-align: center;
  font-weight: 700;
  font-size: 18px;
  box-shadow: 0 8px 25px rgba(67, 173, 94, 0.4);
  z-index: 999;
  display: none;
  transition: all 0.3s ease;
}

.mobile-cta:hover {
  background: #5cbf73;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(67, 173, 94, 0.5);
}

@media (max-width: 768px) {
  .mobile-cta {
    display: block;
  }
  
  body {
    padding-bottom: 80px;
  }
}

/* SECTION: Hero Banner */
.hero-banner {
  background: url('bg.jpg') center center/cover no-repeat;
  min-height: 580px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 3rem;
  padding: 4rem 0;
}

.hero-banner .hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.hero-banner .hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.hero-banner .hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  color: white;
}

.hero-banner h1 {
  color: white;
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero-banner p {
  color: white;
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* SECTION: Hero Section */
.hero {
  background: url('bg.jpg') center center/cover no-repeat;
  padding: 120px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 580px;
  display: flex;
  align-items: center;
}

.hero-content {
  margin-top: 40px;
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* SECTION: Card Styles */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 12px var(--shadow);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  border-color: var(--primary);
}

.card h3 {
  color: var(--accent);
  margin-bottom: 1rem;
}

.card p {
  color: var(--text-light);
}

/* SECTION: Game Grid - ВСЕ ИГРЫ ОДИНАКОВОГО РАЗМЕРА */
.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .game-grid {
    grid-template-columns: 1fr;
  }
}

.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 2px 8px var(--shadow);
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: var(--accent);
}

.game-image {
  width: 100%;
  height: 200px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 600;
  font-size: 1.1rem;
}
.game-image img {
  width: 100%;
  height: 100%; /* Чтобы занять всю высоту блока */
  object-fit: cover; /* Сохранить пропорции и заполнить блок, обрезая лишнее */
  display: block;

}

.game-info {
  padding: 1.5rem;
}

.logo img {
    max-height: 50px; /* или другой размер */
    width: auto;
    display: block;
}

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

.game-info p {
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* SECTION: FAQ Styles */
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.faq-question {
  padding: 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--text);
  transition: all 0.3s ease;
}

.faq-question:hover {
  background: var(--surface-alt);
}

.faq-answer {
  padding: 0 1.5rem 1.5rem;
  color: var(--text-light);
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

.faq-icon {
  transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

/* SECTION: Footer Styles */
.footer {
  background: var(--surface);
  padding: 3rem 0 1rem;
  border-top: 1px solid var(--border);
}

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

.footer-section h4 {
  color: var(--accent);
  margin-bottom: 1rem;
  font-size: 18px;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: var(--text-light);
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  text-align: center;
  color: var(--text-light);
  font-size: 14px;
}

/* SECTION: Responsive Design */
@media (max-width: 1024px) {
  .nav {
    display: none !important;
  }
  
  .mobile-menu-toggle {
    display: block !important;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
  }
  
  .mobile-menu-toggle:hover {
    color: var(--accent);
  }
  
  .mobile-register-btn {
    display: block !important;
  }
  
  .header-actions .btn {
    display: none !important;
  }
  
  .header-content {
    justify-content: space-between;
    align-items: center;
    position: relative;
  }
  
  .logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
  
  .mobile-nav {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 20px var(--shadow);
    z-index: 1000;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }
  
  .mobile-nav.active {
    display: block;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 100px 0 60px;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .section {
    padding: 40px 0;
  }
  
  .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }
  
  .hero h1 {
    font-size: 24px;
  }
  
  .hero p {
    font-size: 16px;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  .game-grid {
    grid-template-columns: 1fr;
  }
}

/* SECTION: Utility Classes */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.hidden {
  display: none;
}

.visible {
  display: block;
}

/* SECTION: Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* SECTION: Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* SECTION: Print Styles */
@media print {
  .header,
  .mobile-cta,
  .footer {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .card {
    border: 1px solid #ccc;
    background: white;
  }
}
