/* Game pages — базовая вёрстка (nav, фон, footer, поиск). Самодостаточный файл. */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --accent: #ec4899;
  --success: #10b981;
  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --bg-dark: #0f172a;
  --bg-darker: #020617;
  --bg-card: rgba(15, 23, 42, 0.8);
  --border-color: rgba(255, 255, 255, 0.1);
  --nav-bg: rgba(15, 23, 42, 0.8);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --radius-md: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-darker);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

.animated-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  pointer-events: none;
}

.orb-1 {
  width: 520px;
  height: 520px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  top: -180px;
  left: -180px;
}

.orb-2 {
  width: 420px;
  height: 420px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  bottom: -120px;
  right: -120px;
}

.orb-3 {
  width: 360px;
  height: 360px;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  top: 55%;
  right: 8%;
  opacity: 0.25;
}

.grid-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.08) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.35;
}

.particles-container {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.logo a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 48px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
}

.nav-search-wrapper {
  position: relative;
  flex: 1;
  max-width: 400px;
  margin: 0 1rem;
}

.search-container {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
}

.search-results {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  max-height: 400px;
  overflow-y: auto;
  display: none;
  box-shadow: var(--shadow-lg);
  z-index: 1001;
}

.search-results.active {
  display: block;
}

.search-result-item {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.search-result-item:hover {
  background: rgba(99, 102, 241, 0.1);
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link-accent {
  color: var(--primary-light) !important;
  padding: 8px 16px;
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: var(--radius-md);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  border-radius: 3px;
}

.page-main {
  position: relative;
  z-index: 10;
}

/* Footer */
.footer {
  position: relative;
  z-index: 10;
  padding: 4rem 2rem 2rem;
  background: rgba(2, 6, 23, 0.8);
  border-top: 1px solid var(--border-color);
}

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

.footer-logo-img {
  height: 48px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.footer-description {
  color: var(--text-secondary);
  line-height: 1.7;
}

.footer-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.65rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--primary-light);
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-link {
  width: 40px;
  height: 40px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
  text-decoration: none;
}

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(99, 102, 241, 0.15);
  text-align: center;
  color: var(--text-muted);
}

.footer-copy {
  margin-bottom: 1rem;
  font-size: 0.88rem;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.footer-legal-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(15, 15, 30, 0.75);
  border: 1px solid rgba(99, 102, 241, 0.28);
  color: #cbd5e1;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.footer-legal-chip:hover {
  color: #fff;
  border-color: rgba(139, 92, 246, 0.55);
}

@media (max-width: 768px) {
  .nav-search-wrapper {
    order: -1;
    width: 100%;
    max-width: 100%;
    margin: 0.75rem 0 0;
  }

  .nav-container {
    flex-wrap: wrap;
  }

  .nav-links {
    width: 100%;
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-links.active {
    max-height: 320px;
    margin-top: 0.75rem;
  }

  .nav-link {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
  }

  .menu-toggle {
    display: flex;
  }
}
