:root {
  --purple: #9846ff;
  --purple-deep: #6b1fd4;
  --purple-dark: #4a1299;
  --purple-soft: #b57aff;
  --cream: #f6f1ea;
  --cream-2: #efe8de;
  --ink: #1a1228;
  --ink-soft: #4a3f5c;
  --white: #ffffff;
  --line: rgba(255, 255, 255, 0.22);
  --shadow: 0 18px 50px rgba(74, 18, 153, 0.18);
  --radius: 22px;
  --max: 1120px;
  --font: "Sora", "Avenir Next", "Segoe UI", sans-serif;
  --display: "Syne", "Avenir Next", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(152, 70, 255, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(255, 180, 80, 0.08), transparent 50%),
    var(--cream);
  line-height: 1.65;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(120deg, var(--purple-deep), var(--purple) 55%, var(--purple-soft));
  color: var(--white);
  box-shadow: 0 8px 24px rgba(74, 18, 153, 0.25);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  min-height: 64px;
  padding: 0.7rem 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  letter-spacing: -0.02em;
  white-space: nowrap;
  z-index: 2;
  min-width: 0;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.logo-mark svg {
  width: 20px;
  height: 20px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.2rem 0.85rem;
  flex-wrap: nowrap;
  justify-content: flex-end;
  margin-left: auto;
}

.nav a {
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0.92;
  white-space: nowrap;
  padding: 0.35rem 0.15rem;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.nav a:hover,
.nav a:focus-visible {
  opacity: 1;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  position: relative;
  z-index: 2;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.55);
}

.nav-toggle-bar {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}

.nav-toggle-bar:nth-child(1) { top: 15px; }
.nav-toggle-bar:nth-child(2) { top: 21px; }
.nav-toggle-bar:nth-child(3) { top: 27px; }

.site-header.is-open .nav-toggle-bar:nth-child(1) {
  top: 21px;
  transform: rotate(45deg);
}

.site-header.is-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.site-header.is-open .nav-toggle-bar:nth-child(3) {
  top: 21px;
  transform: rotate(-45deg);
}

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(20, 8, 40, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.nav-backdrop.show {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

body.nav-open {
  overflow: hidden;
}

main {
  padding-bottom: 3rem;
}

.hero {
  margin-top: 1.25rem;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  min-height: min(72vh, 620px);
  display: grid;
  align-items: end;
  background: var(--purple-deep);
  box-shadow: var(--shadow);
  animation: rise 0.7s ease both;
}

.hero-panel picture,
.hero-panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(40, 8, 80, 0.88) 0%, rgba(74, 18, 153, 0.55) 48%, rgba(152, 70, 255, 0.25) 100%),
    linear-gradient(180deg, transparent 40%, rgba(26, 8, 50, 0.55) 100%);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding: clamp(1.5rem, 5vw, 3.5rem);
  max-width: 34rem;
  color: var(--white);
}

.hero-copy h1 {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.hero-copy p {
  margin: 0 0 1.4rem;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 28rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.35rem;
  border-radius: 12px;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--white);
  color: var(--purple-deep);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.btn-primary:hover {
  background: #fff8ef;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

.section {
  margin-top: 1.5rem;
}

.panel {
  background: linear-gradient(145deg, var(--purple), var(--purple-deep));
  color: var(--white);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 4vw, 2.4rem);
  box-shadow: var(--shadow);
  animation: rise 0.75s ease both;
}

.panel h2 {
  margin: 0 0 0.55rem;
  font-family: var(--display);
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
  font-weight: 800;
}

.panel > p {
  margin: 0;
  max-width: 46rem;
  color: rgba(255, 255, 255, 0.9);
}

.games-section .panel {
  margin-bottom: 1rem;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.game-card {
  display: block;
  border-radius: 18px;
  overflow: hidden;
  background: #1a1028;
  color: var(--white);
  box-shadow: 0 12px 30px rgba(40, 10, 80, 0.16);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: rise 0.8s ease both;
}

.game-card:nth-child(2) { animation-delay: 0.05s; }
.game-card:nth-child(3) { animation-delay: 0.1s; }
.game-card:nth-child(4) { animation-delay: 0.15s; }
.game-card:nth-child(5) { animation-delay: 0.2s; }
.game-card:nth-child(6) { animation-delay: 0.25s; }

.game-card:hover,
.game-card:focus-visible {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 18px 40px rgba(74, 18, 153, 0.28);
}

.game-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.game-card:hover img {
  transform: scale(1.04);
}

.game-card-body {
  padding: 0.9rem 1rem 1.1rem;
  background: linear-gradient(180deg, #241338, #140a22);
}

.game-card-body h3 {
  margin: 0 0 0.25rem;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 700;
}

.game-card-body span {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
}

.about-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: center;
}

.about-panel picture,
.about-panel img {
  border-radius: 16px;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.contact-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.contact-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.contact-list a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.form {
  display: grid;
  gap: 0.75rem;
}

.form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.form input,
.form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  padding: 0.8rem 0.95rem;
  outline: none;
}

.form input::placeholder,
.form textarea::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.form input:focus,
.form textarea:focus {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.16);
}

.form-msg {
  display: none;
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 600;
}

.form-msg.show {
  display: block;
  animation: fade 0.35s ease;
}

.site-footer {
  margin-top: 2rem;
  background: linear-gradient(120deg, var(--purple-dark), var(--purple-deep) 40%, var(--purple));
  color: var(--white);
}

.footer-inner {
  padding: 2rem 0 1.4rem;
  text-align: center;
}

.footer-brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.footer-address {
  margin: 0 0 0.85rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem 1.15rem;
  margin: 0 0 1rem;
}

.footer-links a {
  font-weight: 600;
  font-size: 0.92rem;
  opacity: 0.92;
}

.footer-links a:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
}

.age-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  height: 2.2rem;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.85rem;
}

.legal-page {
  margin-top: 1.25rem;
}

.legal-page .panel {
  background: var(--white);
  color: var(--ink);
  border: 1px solid rgba(152, 70, 255, 0.12);
}

.legal-page h1 {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  color: var(--purple-deep);
}

.legal-page h2 {
  margin: 1.6rem 0 0.5rem;
  font-family: var(--display);
  font-size: 1.2rem;
  color: var(--purple-deep);
}

.legal-page p,
.legal-page li {
  color: var(--ink-soft);
}

.legal-page ul {
  padding-left: 1.2rem;
}

.game-page {
  margin-top: 1.25rem;
}

.game-hero {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 1rem;
}

.game-hero img {
  width: 100%;
  border-radius: 16px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.game-hero h1 {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  letter-spacing: -0.02em;
}

.game-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

.iframe-shell {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #0d0718;
  aspect-ratio: 16 / 9;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.iframe-shell iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin: 1.25rem 0;
}

.spec {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 1rem;
}

.spec h3 {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-size: 1rem;
}

.spec p {
  margin: 0;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.88);
}

.game-copy h2 {
  margin: 1.4rem 0 0.5rem;
  font-family: var(--display);
  font-size: 1.25rem;
}

.game-copy p {
  margin: 0 0 0.85rem;
  color: rgba(255, 255, 255, 0.9);
}

.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
  max-width: 520px;
  margin-inline: auto;
  background: #1a1028;
  color: var(--white);
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  display: none;
  gap: 0.85rem;
  align-items: flex-start;
}

.cookie-banner.show {
  display: grid;
  animation: rise 0.4s ease;
}

.cookie-banner p {
  margin: 0;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.88);
}

.cookie-banner a {
  color: var(--purple-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.chat-toggle {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 55;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--purple), var(--purple-deep));
  color: var(--white);
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(74, 18, 153, 0.4);
  display: grid;
  place-items: center;
  transition: transform 0.2s ease;
}

.chat-toggle:hover {
  transform: scale(1.06);
}

.chat-toggle svg {
  width: 26px;
  height: 26px;
}

.chat-panel {
  position: fixed;
  right: 1.1rem;
  bottom: 5rem;
  z-index: 55;
  width: min(340px, calc(100vw - 2rem));
  background: var(--white);
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(40, 10, 80, 0.28);
  overflow: hidden;
  display: none;
  flex-direction: column;
  max-height: 420px;
}

.chat-panel.open {
  display: flex;
  animation: rise 0.3s ease;
}

.chat-head {
  background: linear-gradient(120deg, var(--purple-deep), var(--purple));
  color: var(--white);
  padding: 0.9rem 1rem;
  font-weight: 700;
  font-family: var(--display);
}

.chat-body {
  padding: 1rem;
  background: var(--cream);
  flex: 1;
  overflow: auto;
}

.chat-msg {
  background: var(--white);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid rgba(152, 70, 255, 0.12);
}

.chat-form input {
  border: 1px solid rgba(152, 70, 255, 0.2);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  outline: none;
}

.chat-form button {
  border: 0;
  border-radius: 10px;
  background: var(--purple);
  color: var(--white);
  padding: 0 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 1100px) {
  .nav {
    gap: 0.15rem 0.55rem;
  }

  .nav a {
    font-size: 0.8rem;
  }
}

@media (max-width: 980px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-panel,
  .contact-panel {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    margin: 0;
    padding: 0.55rem;
    border-radius: 16px;
    background: linear-gradient(160deg, #5a18b8, #3d0f7a 70%);
    box-shadow: 0 18px 40px rgba(40, 10, 80, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  }

  .nav.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav a {
    font-size: 0.95rem;
    padding: 0.85rem 0.95rem;
    border-radius: 12px;
    border-bottom: 0;
    opacity: 1;
  }

  .nav a:hover,
  .nav a:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    transform: none;
  }

  .header-inner {
    min-height: 60px;
  }
}

@media (max-width: 760px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .game-hero {
    grid-template-columns: 120px 1fr;
  }

  .iframe-shell {
    aspect-ratio: 9 / 14;
    max-height: 75vh;
  }
}

@media (max-width: 480px) {
  .header-inner {
    min-height: 56px;
    padding: 0.55rem 0;
  }

  .logo-mark {
    width: 32px;
    height: 32px;
  }

  .nav-toggle {
    width: 40px;
    height: 40px;
  }

  .nav {
    top: calc(100% + 0.25rem);
  }

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

  .hero-panel {
    min-height: 520px;
  }

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

  .game-hero img {
    max-width: 180px;
  }
}
