/* === Catalog & Game Pages ===
   Uses ONLY variables from common.css — no new design tokens */

body {
  background: radial-gradient(1200px 700px at 50% 30%, rgba(108,150,255,0.08), transparent 70%), var(--bg);
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 16, 32, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  transition: opacity 0.2s;
}
.header-logo:hover { opacity: 0.85; }
.header-logo__icon {
  font-size: 28px;
  filter: drop-shadow(0 0 8px rgba(108,150,255,0.4));
}
.header-logo__text {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.header-nav {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Nav buttons */
.nav-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.nav-btn:hover {
  border-color: var(--border-light);
  background: var(--surface-hover);
}
.nav-btn-primary {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
  border: none;
  color: #fff;
  box-shadow: 0 4px 12px rgba(79,118,223,0.25);
}
.nav-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(79,118,223,0.35);
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
}

/* ── Hero ── */
.hero {
  padding: 80px 24px 60px;
  text-align: center;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  top: -64px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(108,150,255,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}
.hero-title {
  font-size: 48px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
  background: linear-gradient(180deg, #ffffff 20%, var(--text) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 560px;
  margin: 0 auto;
}

/* ── Catalog Section ── */
.catalog {
  padding: 0 24px 80px;
}
.catalog-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.catalog-header {
  margin-bottom: 32px;
}
.catalog-header h2 {
  margin-bottom: 6px;
}

/* ── Games Grid ── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

/* ── Game Card — VERTICAL poster (3:4) ── */
.game-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 24px var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.game-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(3,7,18,0.5), 0 0 40px rgba(108,150,255,0.08);
  border-color: var(--border-light);
}
.game-card--soon {
  cursor: default;
  opacity: 0.6;
}
.game-card--soon:hover {
  transform: none;
  box-shadow: 0 10px 24px var(--shadow);
  border-color: var(--border);
}

/* Poster — vertical 3:4 */
.game-card__poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--surface-soft);
}
.game-card__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* TODO: заменить banner.jpg на вертикальный постер через админку каталога */
  object-position: center 55%;
  transition: transform 0.5s ease;
}
.game-card:hover .game-card__poster img {
  transform: scale(1.06);
}
.game-card--soon:hover .game-card__poster img {
  transform: none;
}

/* Tags */
.game-card__tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  z-index: 2;
}
.tag-category {
  background: rgba(108,150,255,0.18);
  color: var(--accent);
  border: 1px solid rgba(108,150,255,0.35);
}
.tag-soon {
  background: rgba(255,176,32,0.18);
  color: var(--warn);
  border: 1px solid rgba(255,176,32,0.35);
}

/* Coming soon overlay */
.game-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11,16,32,0.55);
  font-size: 22px;
  font-weight: 800;
  color: var(--warn);
  letter-spacing: 3px;
  text-transform: uppercase;
  z-index: 1;
}

/* Card body */
.game-card__body {
  padding: 20px;
}
.game-card__title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}
.game-card__desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ── Game Detail Page ── */
.game-page {
  max-width: 880px;
  margin: 0 auto;
  padding: 24px 24px 80px;
}
.game-page__back {
  margin-bottom: 24px;
}
.game-page__back a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.game-page__back a:hover {
  color: var(--accent);
}

/* Hero banner — vertical 3:4 */
.game-page__hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 40px;
  aspect-ratio: 3 / 4;
  max-height: 560px;
  box-shadow: 0 16px 40px var(--shadow);
}
.game-page__poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
}
.game-page__hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
  background: linear-gradient(to top, rgba(11,16,32,0.92) 0%, rgba(11,16,32,0.4) 45%, transparent 100%);
}
.game-page__hero-overlay h1 {
  font-size: 36px;
  margin-top: 12px;
}
.game-page__hero-overlay p {
  font-size: 16px;
  color: var(--text-muted);
  margin-top: 8px;
  max-width: 500px;
}

/* Sections */
.game-section {
  margin-bottom: 40px;
  animation: fadeIn 0.5s ease-out both;
}
.game-section:nth-child(2) { animation-delay: 0.05s; }
.game-section:nth-child(3) { animation-delay: 0.1s; }
.game-section:nth-child(4) { animation-delay: 0.15s; }
.game-section:nth-child(5) { animation-delay: 0.2s; }
.game-section:nth-child(6) { animation-delay: 0.25s; }

.game-section h2 {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.game-description {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.75;
}

/* Video container — HORIZONTAL 16:9 */
.video-container {
  aspect-ratio: 16 / 9;
  width: 100%;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-soft);
  border: 1px solid var(--border);
}
.video-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}
.video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
}
.video-placeholder span {
  font-size: 56px;
  opacity: 0.5;
}
.video-placeholder p {
  font-size: 15px;
}

/* Features grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s;
}
.feature-item:hover {
  border-color: var(--border-light);
}
.feature-icon {
  font-size: 22px;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(108,150,255,0.1);
  border-radius: var(--radius-sm);
}
.feature-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  padding-top: 4px;
}

/* Price block */
.price-block {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.65;
  text-align: center;
}

/* CTA section */
.cta-section {
  text-align: center;
}
.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  color: #fff;
  transition: all 0.25s ease;
  min-width: 200px;
  justify-content: center;
}
.cta-btn:hover {
  transform: translateY(-2px);
}
.cta-btn--whatsapp {
  background: linear-gradient(180deg, #25d366 0%, #1da851 100%);
  box-shadow: 0 4px 16px rgba(37,211,102,0.3);
}
.cta-btn--whatsapp:hover {
  box-shadow: 0 8px 28px rgba(37,211,102,0.4);
}
.cta-btn--telegram {
  background: linear-gradient(180deg, #2aabee 0%, #229ed9 100%);
  box-shadow: 0 4px 16px rgba(42,171,238,0.3);
}
.cta-btn--telegram:hover {
  box-shadow: 0 8px 28px rgba(42,171,238,0.4);
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.footer-inner a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-inner a:hover {
  color: var(--accent-dark);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero { padding: 56px 20px 40px; }
  .hero-title { font-size: 32px; }
  .hero-subtitle { font-size: 15px; }
  .games-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .game-page__hero-overlay h1 { font-size: 26px; }
  .game-page__hero-overlay p { font-size: 14px; }
  .game-page__hero { max-height: none; }
  .features-grid { grid-template-columns: 1fr; }
  .cta-btn { width: 100%; min-width: unset; }
  .cta-buttons { flex-direction: column; align-items: stretch; }
}
@media (max-width: 480px) {
  .header-inner { padding: 0 16px; height: 56px; }
  .header-logo__text { font-size: 16px; }
  .nav-btn { padding: 6px 14px; font-size: 13px; }
  .hero { padding: 40px 16px 32px; }
  .hero-title { font-size: 26px; }
  .catalog { padding: 0 16px 60px; }
  .games-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .game-page { padding: 16px 16px 60px; }
  .game-page__hero-overlay { padding: 20px; }
  .game-page__hero-overlay h1 { font-size: 22px; }
}
