/* =======================
   Game Page Styles
======================= */
.game-page {
  --cr-accent: #ff9b33;
  --cr-accent-soft: #ffd188;
  --cr-accent-rgb: 255, 155, 51;
}

.game-page .gm-section {
  overflow: clip;
}

/* Hero */
.game-hero {
  background-image:
    radial-gradient(
      118% 102% at 82% 50%,
      rgba(10, 15, 24, 0) 33%,
      rgba(10, 15, 24, 0.22) 56%,
      rgba(10, 15, 24, 0.62) 82%,
      rgba(10, 15, 24, 0.92) 100%
    ),
    linear-gradient(
      114deg,
      rgba(7, 12, 20, 0.88) 0%,
      rgba(8, 13, 22, 0.62) 44%,
      rgba(8, 13, 22, 0.36) 66%,
      rgba(8, 13, 22, 0.68) 85%,
      rgba(8, 13, 22, 0.92) 100%
    ),
    var(--game-hero-banner, url("../../images/games/clash-royale/banner_bg.webp")),
    var(--gradient-hero);
  background-size: 100% 100%, 100% 100%, cover, cover;
  background-position: center, center, 72% center, center;
  min-height: clamp(580px, 74vh, 780px);
}

.game-hero::before {
  background:
    linear-gradient(
      92deg,
      rgba(5, 10, 18, 0.96) 0%,
      rgba(7, 12, 20, 0.9) 28%,
      rgba(8, 13, 22, 0.64) 46%,
      rgba(9, 14, 23, 0.3) 64%,
      rgba(10, 15, 24, 0.04) 80%,
      rgba(10, 15, 24, 0) 100%
    ),
    repeating-linear-gradient(
      135deg,
      rgba(230, 238, 252, 0.045) 0,
      rgba(230, 238, 252, 0.045) 1px,
      transparent 1px,
      transparent 18px
    );
}

.game-hero::after {
  background:
    radial-gradient(128% 96% at 52% 54%, transparent 39%, rgba(2, 6, 12, 0.84) 100%),
    radial-gradient(38% 44% at 76% 24%, rgba(var(--cr-accent-rgb), 0.22), transparent 72%),
    radial-gradient(34% 44% at 64% 66%, rgba(46, 242, 255, 0.14), transparent 72%);
}

.game-hero .hero__inner {
  position: relative;
}

.game-hero .hero__panel {
  position: relative;
  z-index: 2;
}

.game-hero .hero__title-accent {
  background: linear-gradient(102deg, #ffd48f, #ffa147 48%, #2ef2ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.game-hero .hero__description {
  max-width: 56ch;
  margin-top: clamp(14px, 2vw, 20px);
}

.game-hero .hero__energy-line {
  background: linear-gradient(
    90deg,
    rgba(var(--cr-accent-rgb), 0) 0%,
    rgba(var(--cr-accent-rgb), 0.9) 36%,
    rgba(46, 242, 255, 0.82) 66%,
    rgba(46, 242, 255, 0) 100%
  );
}

.game-online-mini {
  margin-top: clamp(14px, 1.8vw, 20px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(var(--cr-accent-rgb), 0.48);
  background:
    linear-gradient(145deg, rgba(var(--cr-accent-rgb), 0.22), rgba(var(--cr-accent-rgb), 0.1)),
    rgba(14, 20, 32, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 10px 20px rgba(0, 0, 0, 0.25);
  color: #ffe7c4;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
}

.game-online-mini strong {
  color: #fff5e2;
  margin-right: 4px;
  font-size: 0.95rem;
}

.game-online-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #70f3a5;
  box-shadow: 0 0 0 6px rgba(112, 243, 165, 0.16);
  animation: gameLivePulse 2.2s ease-in-out infinite;
}

@keyframes gameLivePulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(112, 243, 165, 0.28);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(112, 243, 165, 0.04);
  }
}

/* Boost slider */
.game-boosts-section {
  padding-top: clamp(30px, 4vw, 46px);
  background:
    linear-gradient(180deg, rgba(10, 15, 24, 0.28), rgba(10, 15, 24, 0.54)),
    radial-gradient(85% 120% at 92% -20%, rgba(var(--cr-accent-rgb), 0.1), transparent 52%);
}

.game-section-head {
  max-width: 72ch;
}

.game-boost-swiper {
  border-radius: 22px;
  border: 1px solid rgba(194, 205, 223, 0.24);
  background:
    radial-gradient(120% 140% at 10% 0%, rgba(var(--cr-accent-rgb), 0.1), transparent 56%),
    rgba(13, 20, 31, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 16px 28px rgba(0, 0, 0, 0.28);
  padding: clamp(14px, 2.2vw, 18px);
}

.game-boost-swiper .swiper-slide {
  height: auto;
}

.game-service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 196px;
  border-radius: 16px;
  border: 1px solid rgba(var(--service-rgb, var(--cr-accent-rgb)), 0.46);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    radial-gradient(130% 120% at 14% 0%, rgba(var(--service-rgb, var(--cr-accent-rgb)), 0.14), transparent 58%),
    rgba(12, 18, 29, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 12px 20px rgba(0, 0, 0, 0.24);
  color: inherit;
  overflow: hidden;
}

.game-service-card:hover,
.game-service-card:focus-within {
  border-color: rgba(var(--service-rgb, var(--cr-accent-rgb)), 0.86);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 16px 28px rgba(var(--service-rgb, var(--cr-accent-rgb)), 0.18);
}

.game-service-card .gm-service-thumb {
  height: 98px;
  margin-bottom: 11px;
  border-color: rgba(var(--service-rgb, var(--cr-accent-rgb)), 0.34);
  background:
    radial-gradient(circle at 14% 12%, rgba(var(--service-rgb, var(--cr-accent-rgb)), 0.26), rgba(255, 255, 255, 0.03)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.34));
}

.game-service-card .gm-service-title {
  margin-bottom: 4px;
  line-height: 1.28;
}

.game-service-card .gm-service-excerpt {
  margin-top: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.game-offer-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  min-width: 84px;
  padding: 6px 10px 7px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background:
    linear-gradient(145deg, #ff4f6f 0%, #ff874d 58%, #ffbf68 100%);
  color: #fff7ea;
  display: grid;
  justify-items: start;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 12px 20px rgba(255, 79, 111, 0.36);
}

.game-offer-badge strong {
  font-size: 0.67rem;
  letter-spacing: 0.06em;
  font-weight: 800;
}

.game-offer-badge small {
  margin-top: 3px;
  font-size: 0.57rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.96;
}

.game-swiper-controls {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.game-swiper-nav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.game-swiper-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(194, 205, 223, 0.34);
  background: rgba(13, 20, 31, 0.82);
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.game-swiper-btn:hover,
.game-swiper-btn:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(var(--cr-accent-rgb), 0.84);
  box-shadow: 0 0 0 3px rgba(var(--cr-accent-rgb), 0.18);
}

.game-boost-pagination {
  display: none !important;
}

.game-boost-pagination .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  margin: 0 !important;
  background: rgba(194, 205, 223, 0.26);
  opacity: 1;
}

.game-boost-pagination .swiper-pagination-bullet-active {
  background: var(--cr-accent);
  box-shadow: 0 0 0 4px rgba(var(--cr-accent-rgb), 0.2);
}

/* Boosters section */
.game-boosters-section {
  background:
    radial-gradient(95% 120% at 10% 0%, rgba(46, 242, 255, 0.1), transparent 54%),
    linear-gradient(180deg, rgba(10, 15, 24, 0.16), rgba(10, 15, 24, 0.44));
}

.game-boosters-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.game-booster-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 16px;
  border: 1px solid rgba(194, 205, 223, 0.22);
  background:
    radial-gradient(120% 120% at 10% 10%, rgba(var(--cr-accent-rgb), 0.09), transparent 56%),
    rgba(14, 21, 33, 0.9);
  padding: 12px;
  min-height: 88px;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.game-booster-card:hover,
.game-booster-card:focus-within {
  transform: translateY(-3px);
  border-color: rgba(var(--cr-accent-rgb), 0.65);
  box-shadow: 0 14px 20px rgba(0, 0, 0, 0.34);
}

.game-booster-avatar-wrap {
  width: 56px;
  min-width: 56px;
  height: 56px;
  position: relative;
}

.game-booster-avatar {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(194, 205, 223, 0.34);
}

.game-booster-logo {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  position: absolute;
  right: -4px;
  bottom: -4px;
  border: 1px solid rgba(194, 205, 223, 0.56);
  background: #101725;
}

.game-booster-meta {
  min-width: 0;
}

.game-booster-meta h3 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-booster-stars {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.72rem;
  color: #ffcc66;
}

.game-booster-score {
  margin-left: 6px;
  color: var(--color-muted);
  font-weight: 600;
}

.game-booster-comments {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 58px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(46, 242, 255, 0.26);
  background: rgba(46, 242, 255, 0.13);
  color: rgba(46, 242, 255, 0.95);
  font-size: 0.76rem;
  font-weight: 600;
}

/* FAQ */
.game-faq-section {
  background:
    radial-gradient(80% 120% at 92% 8%, rgba(var(--cr-accent-rgb), 0.12), transparent 58%),
    linear-gradient(180deg, rgba(10, 15, 24, 0.38), rgba(10, 15, 24, 0.72));
}

.game-faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.game-faq-card {
  border-radius: 16px;
  border: 1px solid rgba(194, 205, 223, 0.22);
  background: rgba(13, 19, 30, 0.9);
  overflow: hidden;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.game-faq-card.is-open {
  border-color: rgba(var(--cr-accent-rgb), 0.56);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.3);
}

.game-faq-question {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
  font-size: 0.96rem;
  font-weight: 600;
}

.game-faq-question > .game-faq-chevron {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(var(--cr-accent-rgb), 0.42);
  background: rgba(var(--cr-accent-rgb), 0.14);
  color: #ffd9a6;
  font-size: 0.78rem;
  line-height: 1;
  transform: translateY(0);
  transition:
    transform 220ms ease,
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
}

.game-faq-card.is-open .game-faq-question > .game-faq-chevron {
  border-color: rgba(var(--cr-accent-rgb), 0.7);
  background: rgba(var(--cr-accent-rgb), 0.24);
  color: #fff0d7;
  transform: rotate(180deg);
}

.game-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 260ms ease;
}

.game-faq-answer p {
  margin: 0;
  padding: 0 18px 18px;
  color: var(--color-muted);
  line-height: 1.7;
}

/* Responsive */
@media (max-width: 1199.98px) {
  .game-boosters-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .game-hero {
    background-position: center, center, 62% center, center;
  }

  .game-boosters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-faq-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .game-hero {
    background-position: center, center, 66% center, center;
  }

  .game-online-mini {
    font-size: 0.8rem;
    padding: 8px 12px;
  }

  .game-swiper-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .game-swiper-nav {
    justify-content: center;
  }

  .game-boost-pagination {
    justify-content: center;
  }

  .game-boosters-grid {
    grid-template-columns: 1fr;
  }

  .game-booster-card {
    min-height: 82px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .game-online-dot,
  .game-swiper-btn,
  .game-booster-card,
  .game-faq-answer,
  .game-faq-question > .game-faq-chevron {
    animation: none !important;
    transition: none !important;
  }
}
