:root {
  color-scheme: dark;
  font-family: "Cinzel", Georgia, "Velderis Serif", "Times New Roman", serif;
  background: #050814;
  color: #f7f2e7;

  --cg-gold: #f0c674;
  --cg-panel: rgba(7, 10, 18, 0.91);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: #050814;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(2, 4, 9, 0.26), rgba(2, 4, 9, 0.72)),
    radial-gradient(circle at 50% 12%, rgba(240, 198, 116, 0.14), transparent 34%),
    url("../assets/background.webp") center / cover no-repeat;
}

body::after {
  z-index: 0;
  background:
    radial-gradient(circle at 50% 48%, transparent 30%, rgba(0, 0, 0, 0.52) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.22), transparent 22%, transparent 78%, rgba(0, 0, 0, 0.22));
}

button,
input {
  font: inherit;
}

.cg-gateway {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.cg-card {
  position: relative;
  isolation: isolate;
  width: min(1160px, 100%);
  overflow: hidden;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(240, 198, 116, 0.34);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% -15%, rgba(240, 198, 116, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(11, 15, 25, 0.95), var(--cg-panel));
  box-shadow:
    0 34px 100px rgba(0, 0, 0, 0.68),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 42px rgba(240, 198, 116, 0.07);
}

.cg-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(240, 198, 116, 0.08), transparent) top / 100% 1px no-repeat,
    radial-gradient(circle at 50% 0, rgba(255, 232, 180, 0.06), transparent 42%);
}

.cg-hero-header {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.y8-gateway-logo {
  display: block;
  width: 63px;
  height: auto;
  margin: 0 auto 12px;
  image-rendering: auto;
}


.cg-kicker {
  margin: 0 0 7px;
  color: var(--cg-gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-shadow: 0 0 20px rgba(240, 198, 116, 0.24);
}

.cg-card h1 {
  margin: 0;
  color: #fff8e9;
  font-family: "Cinzel", Georgia, "Velderis Serif", "Times New Roman", serif;
  font-size: clamp(30px, 5vw, 50px);
  line-height: 1.05;
  letter-spacing: 0.035em;
  text-shadow:
    0 5px 20px rgba(0, 0, 0, 0.7),
    0 0 26px rgba(240, 198, 116, 0.12);
}

.cg-status {
  line-height: 1.5;
  color: rgba(238, 238, 238, 0.72);
}

.cg-selection {
  margin-top: 20px;
}

.cg-classes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.7vw, 20px);
}

.cg-class {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 330px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 14%, rgba(240, 198, 116, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(19, 24, 37, 0.86), rgba(5, 8, 14, 0.97));
  color: inherit;
  cursor: pointer;
  text-align: left;
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.cg-class::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow 0.18s ease;
}

.cg-class:hover,
.cg-class:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(240, 198, 116, 0.52);
  outline: none;
  box-shadow:
    0 22px 42px rgba(0, 0, 0, 0.42),
    0 0 26px rgba(240, 198, 116, 0.08);
}

.cg-class.is-selected {
  transform: translateY(-4px);
  border-color: rgba(240, 198, 116, 0.92);
  background:
    radial-gradient(circle at 50% 14%, rgba(240, 198, 116, 0.2), transparent 46%),
    linear-gradient(180deg, rgba(38, 30, 18, 0.88), rgba(8, 9, 13, 0.98));
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.48),
    0 0 0 3px rgba(240, 198, 116, 0.09),
    0 0 30px rgba(240, 198, 116, 0.11);
}

.cg-class.is-selected::after {
  box-shadow: inset 0 0 0 1px rgba(255, 231, 174, 0.18);
}

.cg-class:disabled {
  cursor: progress;
  opacity: 0.58;
  transform: none;
}

.cg-class-art {
  position: relative;
  display: grid;
  place-items: end center;
  min-height: 220px;
  padding: 10px 12px 0;
  overflow: hidden;
}

.cg-class-art::after {
  content: "";
  position: absolute;
  right: 8%;
  bottom: -13px;
  left: 8%;
  height: 42px;
  border-radius: 50%;
  background: rgba(240, 198, 116, 0.18);
  filter: blur(16px);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.cg-class.is-selected .cg-class-art::after {
  opacity: 1;
}

.cg-class-art img {
  position: relative;
  z-index: 1;
  width: min(230px, 92%);
  height: 230px;
  object-fit: contain;
  filter: drop-shadow(0 18px 20px rgba(0, 0, 0, 0.48));
  transition:
    transform 0.18s ease,
    filter 0.18s ease;
}

.cg-class:hover .cg-class-art img,
.cg-class:focus-visible .cg-class-art img,
.cg-class.is-selected .cg-class-art img {
  transform: scale(1.035);
  filter:
    drop-shadow(0 18px 20px rgba(0, 0, 0, 0.5))
    drop-shadow(0 0 12px rgba(240, 198, 116, 0.1));
}

.cg-class-copy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 7px;
  min-height: 104px;
  padding: 15px 18px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(7, 10, 17, 0.7), rgba(5, 7, 12, 0.96));
}

.cg-class-copy strong {
  display: block;
  color: #f6ead2;
  font-family: "Cinzel", Georgia, "Velderis Serif", "Times New Roman", serif;
  font-size: 21px;
  letter-spacing: 0.035em;
  text-align: center;
}

.cg-class.is-selected .cg-class-copy strong {
  color: var(--cg-gold);
}

.cg-class-copy span {
  display: block;
  color: rgba(235, 235, 235, 0.7);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.45;
}

.cg-legal {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: min(850px, 100%);
  margin: 19px auto 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.24);
  color: rgba(224, 228, 235, 0.68);
  font-family: inherit;
  font-size: 12px;
  line-height: 1.45;
}

.cg-legal input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  flex: 0 0 auto;
  accent-color: #c49c53;
}

.cg-legal a,
.cg-legal-link {
  color: #f1d19b;
}

.cg-legal-link {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.16em;
  cursor: pointer;
}

.cg-legal-link:hover,
.cg-legal-link:focus-visible {
  color: #fff0b3;
}

.cg-legal-link:focus-visible,
.crazygames-legal-modal__close:focus-visible {
  outline: 2px solid rgba(240, 198, 116, 0.9);
  outline-offset: 3px;
}

.cg-actions {
  display: flex;
  justify-content: center;
  margin-top: 15px;
}

.cg-play-button {
  min-width: min(300px, 100%);
  min-height: 50px;
  padding: 12px 28px;
  border: 1px solid rgba(255, 224, 158, 0.78);
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(202, 157, 78, 0.96), rgba(132, 92, 36, 0.98));
  color: #130d05;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 246, 218, 0.42);
  transition:
    transform 0.16s ease,
    filter 0.16s ease,
    box-shadow 0.16s ease;
}

.cg-play-button:hover,
.cg-play-button:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.08);
  outline: none;
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.46),
    0 0 24px rgba(240, 198, 116, 0.13),
    inset 0 1px 0 rgba(255, 246, 218, 0.5);
}

.cg-play-button:disabled {
  cursor: progress;
  opacity: 0.56;
  transform: none;
  filter: none;
}

.cg-status {
  min-height: 21px;
  margin: 12px 0 0;
  font-family: inherit;
  font-size: 13px;
  text-align: center;
}

.cg-status.is-error {
  color: #ffb3b3;
}

@media (max-width: 840px) {
  .cg-gateway {
    align-items: start;
    padding: 12px;
  }

  .cg-card {
    padding: 20px 16px;
  }

  .cg-classes {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin: 0 auto;
  }

  .cg-class {
    grid-template-columns: 150px minmax(0, 1fr);
    grid-template-rows: 1fr;
    min-height: 172px;
  }

  .cg-class-art {
    min-height: 172px;
    padding: 8px 4px 0;
  }

  .cg-class-art img {
    width: 145px;
    height: 168px;
  }

  .cg-class-copy {
    align-content: center;
    min-height: 100%;
    padding: 16px;
    border-top: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
  }
}

@media (max-width: 520px) {
  .cg-gateway {
    padding: 8px;
  }

  .cg-card {
    border-radius: 12px;
  }

  .cg-class {
    grid-template-columns: 118px minmax(0, 1fr);
    min-height: 150px;
  }

  .cg-class-art {
    min-height: 150px;
  }

  .cg-class-art img {
    width: 116px;
    height: 146px;
  }

  .cg-class-copy {
    padding: 13px;
  }

  .cg-class-copy strong {
    font-size: 18px;
  }

  .cg-class-copy span {
    font-size: 12px;
  }
}


body.crazygames-legal-open {
  overflow: hidden !important;
}

.crazygames-legal-modal {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 32px);
}

.crazygames-legal-modal.hidden {
  display: none !important;
}

.crazygames-legal-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 14, 0.86);
  backdrop-filter: blur(5px);
}

.crazygames-legal-modal__panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(86vh, 900px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(240, 198, 116, 0.54);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(240, 198, 116, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(16, 22, 34, 0.99), rgba(7, 11, 19, 0.995));
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.65),
    inset 0 1px rgba(255, 237, 191, 0.05);
  color: #e9e4d8;
}

.crazygames-legal-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid rgba(240, 198, 116, 0.22);
}

.crazygames-legal-modal__kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--cg-gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.crazygames-legal-modal__header h2 {
  margin: 0;
  color: #f2dfac;
  font-family: "Cinzel", Georgia, "Velderis Serif", "Times New Roman", serif;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.15;
}

.crazygames-legal-modal__close {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(240, 198, 116, 0.32);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.035);
  color: #f2dfac;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.crazygames-legal-modal__close:hover {
  background: rgba(240, 198, 116, 0.13);
}

.crazygames-legal-modal__content {
  overflow-y: auto;
  padding: 20px 24px 28px;
  scrollbar-color: rgba(240, 198, 116, 0.55) rgba(255, 255, 255, 0.04);
}

.crazygames-legal-modal__content section + section {
  margin-top: 24px;
}

.crazygames-legal-modal__content h3 {
  margin: 0 0 10px;
  color: #e8ca83;
  font-family: "Cinzel", Georgia, "Velderis Serif", "Times New Roman", serif;
  font-size: 1rem;
  line-height: 1.4;
}

.crazygames-legal-modal__content p {
  margin: 0 0 10px;
  color: #c8c3b8;
  font-size: 0.88rem;
  line-height: 1.65;
}

@media (max-width: 600px) {
  .crazygames-legal-modal {
    padding: 8px;
  }

  .crazygames-legal-modal__panel {
    max-height: 92vh;
    border-radius: 14px;
  }

  .crazygames-legal-modal__header {
    padding: 18px 16px 14px;
  }

  .crazygames-legal-modal__content {
    padding: 16px 16px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cg-class,
  .cg-class-art img,
  .cg-play-button {
    transition: none;
  }
}
