:root {
  --bg-dark: #0a0930;
  --bg-mid: #15155f;
  --bg-light: #2524a0;
  --primary: #19d1d3;
  --primary-strong: #00b4b8;
  --text-main: #ffffff;
  --text-soft: #d7d8ff;
  --header-height: 72px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Chakra Petch", sans-serif;
  color: var(--text-main);
  background:
    repeating-linear-gradient(
      35deg,
      rgba(46, 103, 215, 0.08) 0 2px,
      transparent 2px 56px
    ),
    repeating-linear-gradient(
      145deg,
      rgba(46, 103, 215, 0.06) 0 2px,
      transparent 2px 62px
    ),
    radial-gradient(circle at 18% 14%, rgba(255, 136, 34, 0.26) 0%, rgba(255, 136, 34, 0) 34%),
    radial-gradient(circle at 78% 0%, rgba(255, 90, 20, 0.2) 0%, rgba(255, 90, 20, 0) 32%),
    linear-gradient(135deg, #050403 0%, #0a0705 40%, #1a0f07 68%, #080605 100%);
  background-size: auto, auto, auto, auto, auto;
  padding-top: var(--header-height);
}

.container {
  width: min(1450px, 92%);
  margin: 0 auto;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(10, 6, 4, 0.86);
  border-bottom: 1px solid rgba(255, 158, 84, 0.2);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.header-inner {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  color: var(--text-main);
  text-decoration: none;
}

.logo-image {
  height: 52px;
  width: auto;
  display: block;
}

.header-actions {
  display: flex;
  gap: 10px;
}

.btn {
  font-family: "Audiowide", sans-serif;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  color: #031436;
  background: linear-gradient(90deg, var(--primary), #58f0da);
}

.btn-outline {
  color: #ffe9d2;
  border: 1px solid rgba(255, 176, 112, 0.5);
  background: rgba(255, 125, 50, 0.08);
}

.hero {
  padding: 72px 0 48px;
  background: transparent;
}

.hero-grid {
  display: grid;
  gap: 34px;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.hero-art {
  border-radius: 18px;
  overflow: hidden;
}

.hero-art-image {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  display: block;
}

.hero-kicker {
  font-family: "Audiowide", sans-serif;
  margin: 0;
  color: #ffb067;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

h1 {
  font-family: "Audiowide", sans-serif;
  font-size: clamp(2rem, 3.8vw, 3.25rem);
  margin: 12px 0 12px;
  line-height: 1.1;
  text-transform: uppercase;
  color: #fff2e3;
}

.hero-copy p {
  max-width: 520px;
  color: #e4d3c1;
  line-height: 1.6;
}

.btn-big {
  margin-top: 16px;
  padding: 12px 22px;
}

.hero-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.game-card,
.tile {
  border-radius: 16px;
  min-height: 120px;
  background: #2332a6;
  border: none;
  box-shadow: none;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #ffffff;
}

.game-card-large {
  grid-column: span 2;
  min-height: 180px;
  background: radial-gradient(circle at 70% 20%, #2f74ff 0, #0f176e 68%);
}

.featured-card {
  position: relative;
  overflow: hidden;
  align-items: stretch;
  padding: 0;
}

.featured-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.95;
}

.featured-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  background: linear-gradient(
    to top,
    rgba(3, 7, 35, 0.88) 0%,
    rgba(5, 10, 48, 0.35) 45%,
    rgba(5, 10, 48, 0) 100%
  );
}

.featured-card-title {
  font-weight: 800;
  letter-spacing: 0.4px;
  align-self: flex-start;
}

.featured-card-button {
  align-self: flex-start;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.featured-card:hover .featured-card-button {
  opacity: 1;
  transform: translateY(0);
}

.games {
  padding: 20px 0 110px;
  scroll-margin-top: calc(var(--header-height) + 12px);
}

.about-us {
  padding: 14px 0 22px;
}

.intro-slider {
  padding: 10px 0 12px;
}

.intro-slider-shell {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 179, 124, 0.22);
  background: rgba(9, 12, 24, 0.45);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

.intro-slider-track {
  display: flex;
  width: 300%;
  animation: intro-slider 16s ease-in-out infinite;
}

.intro-slider-track img {
  width: 33.3333%;
  height: 290px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

@keyframes intro-slider {
  0%,
  22% {
    transform: translateX(0);
  }
  33%,
  55% {
    transform: translateX(-33.3333%);
  }
  66%,
  88% {
    transform: translateX(-66.6666%);
  }
  100% {
    transform: translateX(0);
  }
}

.about-card {
  border-radius: 16px;
  border: 1px solid rgba(255, 180, 126, 0.26);
  background: linear-gradient(140deg, rgba(255, 123, 42, 0.16), rgba(255, 123, 42, 0.03));
  padding: 22px;
}

.about-card h2 {
  margin-top: 8px;
}

.about-card p {
  margin: 10px 0 0;
  color: #f0dcc7;
  line-height: 1.6;
}

h2 {
  font-family: "Audiowide", sans-serif;
  margin: 12px 0 18px;
  font-size: 1.6rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #ffe4c4;
}

.games-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.provider-section {
  padding: 8px 0 22px;
}

.provider-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.provider-item {
  border-radius: 14px;
  border: 1px solid rgba(138, 176, 255, 0.28);
  background: rgba(6, 11, 26, 0.5);
  padding: 16px;
}

.provider-item h3 {
  margin: 0 0 8px;
  font-family: "Audiowide", sans-serif;
  font-size: 1rem;
  color: #f2f7ff;
}

.provider-item p {
  margin: 0;
  color: #cad6ed;
  line-height: 1.45;
}

.faq-section {
  padding: 18px 0 30px;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  border: 1px solid rgba(110, 192, 255, 0.68);
  border-radius: 10px;
  background: rgba(2, 6, 16, 0.8);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 15px 18px;
  color: #79b9ff;
  font-family: "Audiowide", sans-serif;
  font-size: 0.98rem;
  letter-spacing: 0.2px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item p {
  margin: 0;
  padding: 0 18px 16px;
  color: #cddcf4;
  line-height: 1.55;
}

.deck-slider-section {
  padding: 6px 0 34px;
}

.deck-slider {
  min-height: 360px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  padding: 8px 4px;
}

.deck-slider.is-ready {
  position: relative;
  display: block;
  perspective: 1000px;
  overflow: hidden;
  padding: 0;
}

.deck-card {
  position: relative;
  flex: 0 0 auto;
  width: 210px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(141, 186, 255, 0.4);
  background: #0b1230;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.38);
  pointer-events: none;
  user-select: none;
}

.deck-slider:not(.is-ready) .deck-card:nth-child(n + 6) {
  display: none;
}

.deck-slider.is-ready .deck-card {
  display: block;
}

.deck-slider.is-ready .deck-card {
  position: absolute;
  top: 10px;
  left: 50%;
  transition: transform 0.55s ease, opacity 0.55s ease, filter 0.55s ease;
}

.deck-card img {
  width: 100%;
  height: 255px;
  object-fit: cover;
  display: block;
}

.deck-card p {
  margin: 0;
  padding: 10px 12px 12px;
  text-align: center;
  color: #e7efff;
  font-family: "Audiowide", sans-serif;
  font-size: 0.85rem;
  line-height: 1.2;
}

.games-showcase {
  padding: 8px 0 42px;
}

.showcase-marquee {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.showcase-track {
  width: max-content;
  display: flex;
  gap: 10px;
  animation: showcase-scroll 38s linear infinite;
  padding: 6px 0;
  pointer-events: none;
  user-select: none;
}

.showcase-track img {
  width: 180px;
  height: 235px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(156, 189, 255, 0.24);
}

@keyframes showcase-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.tile {
  min-height: 145px;
  transition: none;
}

.game-tile {
  position: relative;
  overflow: hidden;
  padding: 0;
  min-height: 310px;
  isolation: isolate;
}

.game-tile::before {
  content: none;
}

.game-tile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: none;
  filter: none;
  transition: none;
}

.game-tile-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 14px;
  background: none;
  z-index: 2;
}

.game-tile-title {
  font-weight: 700;
  letter-spacing: 0.35px;
}

.game-tile-button {
  align-self: center;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.game-tile-featured:hover .game-tile-button {
  opacity: 1;
  transform: translateY(0);
}

.game-tile-featured::after {
  content: none;
}

.game-tile-featured:hover .game-tile-image {
  transform: none;
  filter: none;
}

.game-tile-placeholder {
  padding: 14px;
  align-items: stretch;
  justify-content: stretch;
  background: #2332a6;
}

.game-placeholder-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 0;
  position: relative;
  z-index: 2;
}

.game-tile-placeholder span {
  font-weight: 700;
  opacity: 0.92;
}

.game-tile-button-visible {
  align-self: center;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.game-tile-placeholder:hover .game-tile-button-visible {
  opacity: 1;
  transform: translateY(0);
}

.game-tile-locked {
  cursor: not-allowed;
}

.game-tile-locked-hint {
  align-self: center;
  text-align: center;
  max-width: 220px;
  padding: 8px 10px;
  border-radius: 10px;
  font-weight: 600;
  line-height: 1.3;
  background: rgba(0, 0, 0, 0.62);
  color: #ffdcb9;
}

/* From 6th card onward keep games locked by message */
.games-grid > .game-tile:nth-child(n + 6) {
  cursor: not-allowed;
}

.games-grid > .game-tile:nth-child(n + 6) .game-tile-button-visible {
  display: none;
}

.games-grid > .game-tile:nth-child(n + 6) .game-placeholder-content::after {
  content: "To play this game, you need to register.";
  max-width: 220px;
  padding: 8px 10px;
  border-radius: 10px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  background: rgba(0, 0, 0, 0.62);
  color: #ffdcb9;
}

.game-page-main {
  padding: 28px 0 56px;
}

.game-page-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.game-page-top h1 {
  margin: 0;
}

.game-frame-shell {
  width: min(1100px, 100%);
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(145, 180, 255, 0.35);
  box-shadow:
    inset 0 0 28px rgba(76, 118, 255, 0.28),
    0 24px 48px rgba(0, 0, 0, 0.45);
  background: radial-gradient(circle at 50% 0%, rgba(42, 90, 255, 0.26), #050812 58%);
}

.game-frame {
  width: 100%;
  border: 0;
  display: block;
  aspect-ratio: 16 / 9;
  min-height: 460px;
  background: #02030b;
}

.promo-modal {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 80;
  width: min(920px, calc(100% - 24px));
  border-radius: 14px;
  background: linear-gradient(90deg, #4539c7, #352f9d);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 20px 36px rgba(8, 10, 46, 0.5);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.promo-title {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.35px;
}

.promo-text {
  margin: 2px 0 0;
  color: #e2e4ff;
}

.close-modal {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.promo-modal.is-hidden {
  opacity: 0;
  transform: translate(-50%, 22px);
  pointer-events: none;
}

.site-footer {
  background:
    radial-gradient(circle at 14% 0%, rgba(46, 121, 255, 0.2), rgba(46, 121, 255, 0) 34%),
    radial-gradient(circle at 88% 100%, rgba(95, 176, 255, 0.14), rgba(95, 176, 255, 0) 36%),
    #030407;
  border-top: 1px solid rgba(124, 173, 255, 0.26);
  padding: 34px 0 18px;
}

.footer-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: 1.6fr 1fr;
  align-items: center;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-logo {
  width: 240px;
  max-width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 6px 18px rgba(81, 161, 255, 0.28));
}

.footer-disclaimer {
  margin: 0;
  color: #d0d7e7;
  line-height: 1.5;
  max-width: 820px;
  font-size: 0.98rem;
}

.footer-owner {
  margin: -6px 0 0;
  color: #b7c2d7;
  line-height: 1.45;
  max-width: 820px;
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.footer-links a {
  color: #ecf3ff;
  text-decoration: none;
  border: 1px solid rgba(157, 194, 255, 0.36);
  border-radius: 999px;
  padding: 7px 14px;
  background: rgba(16, 28, 52, 0.66);
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.footer-links a:hover {
  border-color: rgba(122, 197, 255, 0.82);
  background: rgba(22, 40, 72, 0.95);
  transform: translateY(-1px);
}

.footer-bottom {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.footer-bottom p {
  margin: 0;
  color: #b8c2d8;
  font-size: 0.95rem;
}

.legal-page-main {
  padding: 30px 0 50px;
}

.legal-page-main h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 3.4vw, 2.9rem);
}

.legal-content {
  background: rgba(9, 12, 24, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 22px 20px;
  color: #ebeff8;
  line-height: 1.6;
}

.legal-content h2 {
  margin-top: 24px;
  margin-bottom: 10px;
  font-size: 1.2rem;
  color: #ffffff;
}

.legal-content p {
  margin: 0 0 12px;
}

.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 4, 10, 0.74);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 120;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.auth-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.auth-modal {
  width: min(520px, calc(100% - 24px));
  border-radius: 18px;
  border: 1px solid rgba(135, 186, 255, 0.36);
  background:
    radial-gradient(circle at 18% 0%, rgba(43, 110, 255, 0.28), rgba(43, 110, 255, 0) 40%),
    linear-gradient(180deg, #0b1225 0%, #090e1d 100%);
  box-shadow:
    0 30px 60px rgba(1, 4, 12, 0.6),
    inset 0 0 28px rgba(59, 125, 255, 0.14);
  padding: 20px;
  transform: translateY(70px) scale(0.98);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.auth-modal-overlay.open .auth-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.auth-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.auth-modal-title {
  margin: 0;
  color: #f4f8ff;
  font-size: 1.45rem;
}

.auth-modal-subtitle {
  margin: 6px 0 0;
  color: #b8c7e2;
}

.auth-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(149, 181, 239, 0.38);
  background: rgba(17, 30, 56, 0.82);
  color: #dce8ff;
  cursor: pointer;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: #c8d6f0;
  font-weight: 600;
}

.auth-form input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(145, 182, 248, 0.3);
  background: rgba(7, 14, 29, 0.92);
  color: #f5f9ff;
  padding: 10px 12px;
  outline: none;
}

.auth-form input:focus {
  border-color: rgba(120, 184, 255, 0.85);
  box-shadow: 0 0 0 2px rgba(95, 162, 255, 0.22);
}

.auth-actions {
  margin-top: 6px;
  display: flex;
  gap: 10px;
}

.auth-note {
  margin: 10px 0 0;
  color: #aebddb;
  font-size: 0.88rem;
  line-height: 1.4;
}

.auth-status {
  margin-top: 10px;
  color: #7de3ba;
  font-weight: 600;
  min-height: 20px;
}

.is-hidden-auth-trigger {
  display: none !important;
}

.auth-user-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(157, 194, 255, 0.42);
  background: rgba(16, 28, 52, 0.62);
  color: #eef5ff;
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
}

body.modal-open {
  overflow: hidden;
}

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

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

  .provider-grid {
    grid-template-columns: 1fr;
  }

  .deck-slider {
    min-height: 330px;
  }

  .deck-card {
    width: 180px;
  }

  .deck-card img {
    height: 220px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  :root {
    --header-height: 64px;
  }

  .header-inner {
    height: 64px;
  }

  .logo-image {
    height: 42px;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .game-frame {
    min-height: 320px;
  }

  .game-page-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .promo-modal {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 18px;
  }
}
