/* Nera Games grid. Seven game cards for the Nera Games section on /competition-websites/.
   Self contained: every rule is scoped to .ngg, nothing here touches the theme. */

.ngg {
  --ngg-ground: #0B122F;
  --ngg-card: #101B47;
  --ngg-stage: #030E3C;
  --ngg-cyan: #35CDFF;
  --ngg-line: rgba(255, 255, 255, 0.09);
  --ngg-text: rgba(255, 255, 255, 0.72);
  font-family: "Lexend Deca", ui-sans-serif, system-ui, sans-serif;
  color: #fff;
  margin-top: 64px;
}
.ngg *, .ngg *::before, .ngg *::after { box-sizing: border-box; }

/* Sub heading, shown when the grid sits under the existing phone row */
.ngg__head { margin: 0 0 32px; }
.ngg__kicker {
  margin: 0 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ngg-cyan);
}
.ngg__kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
  flex: none;
}
.ngg__title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 100;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.9);
}
.ngg__title strong { font-weight: 800; color: #fff; }

/* What the package covers, read with the pills on the cards */
.ngg__offer {
  margin: 0 0 20px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid rgba(53, 205, 255, 0.4);
  background: rgba(53, 205, 255, 0.08);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ngg-text);
}
.ngg__offer strong { font-weight: 700; color: #fff; }

/* Grid: 2 wide, 3 across, 2 wide */
.ngg__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) {
  .ngg__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .ngg__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .ngg-card { grid-column: span 2; }
  .ngg-card--wide,
  .ngg--pairs .ngg-card { grid-column: span 3; }
}

.ngg-card {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
  overflow: hidden;
  border-radius: 24px;
  background: var(--ngg-card);
  border: 1px solid var(--ngg-line);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}
@media (hover: hover) {
  .ngg-card:hover {
    transform: translateY(-4px);
    border-color: rgba(53, 205, 255, 0.45);
    box-shadow: 0 18px 44px -18px rgba(53, 205, 255, 0.45);
  }
}

/* Media stage */
.ngg-card__media {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background:
    radial-gradient(60% 55% at 50% 46%, rgba(53, 205, 255, 0.22), rgba(53, 205, 255, 0) 70%),
    linear-gradient(180deg, #030E3C 0%, #041449 62%, #0B3A78 100%);
}
@media (min-width: 640px) {
  .ngg-card__media { aspect-ratio: auto; height: 300px; }
}
@media (min-width: 1024px) {
  .ngg-card__media { height: 320px; }
}
/* Scenes with game interface at the edges are never cropped */
.ngg-card__media.ngg-card__media--full { aspect-ratio: 16 / 9; height: auto; }
.ngg-card__media.ngg-card__media--full::after { height: 14px; }
.ngg-card__media::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 44px;
  z-index: 1;
  background: linear-gradient(180deg, rgba(16, 27, 71, 0), var(--ngg-card));
  pointer-events: none;
}
.ngg-card__video,
.ngg-card__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Game button on the stage */
.ngg-chip {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  margin: 0;
  padding: 10px 22px;
  border: 0;
  border-radius: 12px;
  background: var(--ngg-cyan);
  box-shadow: 0 4px 0 #0E8FC0, 0 12px 22px -6px rgba(0, 6, 40, 0.7);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #0B122F;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.2s ease;
}
.ngg-chip:active { transform: translateX(-50%) translateY(3px); box-shadow: 0 1px 0 #0E8FC0, 0 8px 16px -6px rgba(0, 6, 40, 0.7); }
.ngg-chip:hover { background: #6BDBFF; }
.ngg-chip:focus-visible,
.ngg-wheel:focus-visible { outline: 2px solid var(--ngg-cyan); outline-offset: 3px; }
/* Card copy */
.ngg-card__body { padding: 8px 28px 30px; }
@media (min-width: 1024px) { .ngg-card__body { padding: 8px 32px 34px; } }
.ngg-card__kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ngg-cyan);
}
.ngg-card__name {
  margin: 8px 0 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #fff;
}
.ngg-card__text {
  margin: 10px 0 0;
  max-width: 34rem;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ngg-text);
}

/* Spin the Wheel */
.ngg-wheel {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 41%;
  height: min(58%, 204px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  filter: drop-shadow(0 18px 28px rgba(0, 6, 40, 0.65)) drop-shadow(0 0 26px rgba(53, 205, 255, 0.35));
}
.ngg-wheel__disc {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(0deg);
  transition: transform 4.6s cubic-bezier(0.12, 0.72, 0.08, 1);
  will-change: transform;
}
.ngg-wheel__pointer {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: -7%;
  width: 13%;
  transform: translateX(-50%);
  filter: drop-shadow(0 3px 5px rgba(0, 6, 40, 0.6));
  transform-origin: 50% 20%;
}
.ngg-wheel.is-spinning .ngg-wheel__pointer { animation: ngg-tick 0.16s linear infinite; }
.ngg-wheel.is-settling .ngg-wheel__pointer { animation: ngg-tick 0.5s ease-out 3; }
@keyframes ngg-tick {
  0%, 100% { transform: translateX(-50%) rotate(0deg); }
  50% { transform: translateX(-50%) rotate(-14deg); }
}
.ngg-wheel.is-won { animation: ngg-won 0.9s ease-out 1; }
@keyframes ngg-won {
  0% { filter: drop-shadow(0 18px 28px rgba(0, 6, 40, 0.65)) drop-shadow(0 0 26px rgba(53, 205, 255, 0.35)); }
  35% { filter: drop-shadow(0 18px 28px rgba(0, 6, 40, 0.65)) drop-shadow(0 0 60px rgba(53, 205, 255, 0.95)); }
  100% { filter: drop-shadow(0 18px 28px rgba(0, 6, 40, 0.65)) drop-shadow(0 0 26px rgba(53, 205, 255, 0.35)); }
}

/* Package pill, top left of every stage */
.ngg-badge {
  position: absolute;
  z-index: 4;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px 6px 9px;
  border-radius: 9999px;
  border: 1px solid rgba(53, 205, 255, 0.55);
  background: rgba(11, 18, 47, 0.84);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fff;
  pointer-events: none;
}
.ngg-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ngg-cyan);
  box-shadow: 0 0 8px rgba(53, 205, 255, 0.9);
  flex: none;
}

/* Winner reveal on the wheel */
.ngg-win {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 58%;
  margin: 0;
  padding: 9px 18px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border-radius: 14px;
  border: 2px solid var(--ngg-cyan);
  background: rgba(11, 18, 47, 0.94);
  box-shadow: 0 0 0 5px rgba(53, 205, 255, 0.16), 0 18px 36px -10px rgba(0, 6, 40, 0.85), 0 0 44px rgba(53, 205, 255, 0.5);
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.ngg-win[hidden] { display: none; }
.ngg-win.is-on {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  transition: opacity 0.2s ease, transform 0.45s cubic-bezier(0.2, 1.5, 0.35, 1);
}
.ngg-win__label {
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ngg-cyan);
}
.ngg-win__prize {
  font-size: clamp(14px, 1.9vw, 19px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: #fff;
}
.ngg-confetti {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 41%;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  pointer-events: none;
  opacity: 0;
  animation: ngg-confetti 1.25s cubic-bezier(0.15, 0.7, 0.3, 1) forwards;
}
@keyframes ngg-confetti {
  0% { opacity: 1; transform: translate(-50%, -50%) rotate(0deg) scale(0.6); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)) scale(1); }
}

/* How results work: a compact panel under the grid */
.ngg__how {
  margin: 32px 0 0;
  padding: 20px 20px 22px;
  border-radius: 20px;
  background: var(--ngg-card);
  border: 1px solid var(--ngg-line);
}
@media (min-width: 1024px) {
  .ngg__how {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 2fr);
    gap: 36px;
    align-items: start;
    padding: 26px 30px 28px;
  }
}
.ngg__how .ngg__kicker { margin-bottom: 10px; font-size: 10px; }
.ngg__how-title {
  margin: 0;
  font-size: clamp(1.0625rem, 1.6vw, 1.375rem);
  font-weight: 100;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.9);
}
.ngg__how-title strong { font-weight: 800; color: #fff; }
.ngg__how-lede {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ngg-text);
}
.ngg__how-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 640px) { .ngg__how-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; } }
@media (min-width: 1024px) { .ngg__how-list { margin-top: 0; } }
.ngg__how-list li {
  margin: 0;
  padding-top: 11px;
  border-top: 1px solid rgba(53, 205, 255, 0.28);
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  column-gap: 8px;
}
.ngg__how-num {
  grid-row: 1 / span 2;
  padding-top: 3px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--ngg-cyan);
}
.ngg__how-list h4 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #fff;
}
.ngg__how-list p {
  margin: 4px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ngg-text);
}

/* Three points and the note, used when the grid replaces the phone row */
.ngg__checks {
  display: none;
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) { .ngg__checks { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; } }
.ngg__checks li { margin: 0; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; align-items: start; }
.ngg__tick {
  margin-top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #188B59;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ngg__tick svg { width: 10px; height: 10px; }
.ngg__checks strong { display: block; font-size: 16px; font-weight: 700; line-height: 1.3; color: #fff; }
.ngg__checks span span { display: block; margin-top: 6px; font-size: 16px; line-height: 1.5; color: var(--ngg-cyan); }

.ngg__note {
  margin: 20px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
}

/* Option B: the grid takes the place of the phone row */
.ngg--replace { margin-top: 0; }
.ngg--replace .ngg__head { display: none; }
.ngg--replace .ngg__checks { display: grid; }

@media (prefers-reduced-motion: reduce) {
  .ngg-card,
  .ngg-wheel__disc { transition: none; }
  .ngg-wheel.is-spinning .ngg-wheel__pointer,
  .ngg-wheel.is-settling .ngg-wheel__pointer,
  .ngg-wheel.is-won { animation: none; }
  .ngg-win, .ngg-win.is-on { transition: none; }
  .ngg-confetti { display: none; }
}

/* go. pages: the poster is a lazy image under the clip, and the clip fades in once it is playing */
.ngg-card__video { opacity: 0; transition: opacity 0.35s ease; }
.ngg-card__video.is-playing { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .ngg-card__video { display: none; } }
/* go. pages: no blur behind the pills and no standing layer for the wheel, so the section costs nothing to prepare
   while it is off screen */
.ngg-badge { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(11, 18, 47, 0.92); }
.ngg-wheel__disc { will-change: auto; }
.ngg-wheel.is-spinning .ngg-wheel__disc { will-change: transform; }
