/* gamezone.css — GAME ZONE: first-person arcade room (games.php only) */

html, body {
  height: auto !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

body {
  background:
    radial-gradient(900px 500px at 50% 0%, rgba(60, 0, 120, 0.35), transparent 65%),
    radial-gradient(700px 400px at 15% 40%, rgba(0, 60, 140, 0.25), transparent 60%),
    radial-gradient(700px 400px at 85% 40%, rgba(140, 0, 90, 0.22), transparent 60%),
    #04020c;
  min-height: 100vh;
  padding-bottom: 140px; /* room for music player */
  perspective: 900px;
}

body::before { display: none !important; }

/* Neon floor grid, receding into the room */
.arcade-floor {
  position: fixed;
  left: -20vw;
  right: -20vw;
  bottom: 0;
  height: 52vh;
  background:
    repeating-linear-gradient(to right, rgba(0, 230, 255, 0.16) 0 2px, transparent 2px 90px),
    repeating-linear-gradient(to bottom, rgba(0, 230, 255, 0.16) 0 2px, transparent 2px 70px),
    linear-gradient(to bottom, rgba(10, 4, 28, 0.9), rgba(2, 0, 10, 1));
  transform: perspective(650px) rotateX(58deg);
  transform-origin: 50% 100%;
  z-index: 0;
  pointer-events: none;
  mask-image: linear-gradient(to top, black 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, black 55%, transparent 100%);
}

/* Side walls glow */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(to right, rgba(80, 0, 160, 0.25), transparent 18%),
    linear-gradient(to left, rgba(0, 90, 160, 0.25), transparent 18%);
}

/* ---------- ARCADE ROOM ---------- */
.arcade-room {
  position: relative;
  z-index: 2;
}

/* Neon sign + subtitle fade DOWN in after the cabinets land */
.neon-sign, .neon-sub {
  opacity: 0;
  transform: translateY(-34px);
  transition: opacity 1.1s ease, transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}
.arcade-room.titles-in .neon-sign,
.arcade-room.titles-in .neon-sub { opacity: 1; transform: translateY(0); }

/* CTA ("talk to us") starts low, rises up at the end */
.gz-cta {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 1s ease, transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.arcade-room.titles-in ~ .gz-cta,
body.arcade-ready .gz-cta { opacity: 1; transform: translateY(0); }

/* ---------- NEON SIGN ---------- */
.neon-sign {
  text-align: center;
  padding-top: 72px;
  font-size: clamp(34px, 6.5vw, 64px);
  letter-spacing: 10px;
  color: #fff;
  text-shadow:
    0 0 8px #ff2bd6,
    0 0 24px #ff2bd6,
    0 0 60px rgba(255, 43, 214, 0.7),
    0 0 110px rgba(255, 43, 214, 0.4);
  animation: signFlicker 6s infinite;
}

@keyframes signFlicker {
  0%, 100% { opacity: 1; }
  3% { opacity: 0.6; }
  4% { opacity: 1; }
  38% { opacity: 1; }
  39% { opacity: 0.75; }
  40% { opacity: 1; }
  71% { opacity: 1; }
  72% { opacity: 0.55; }
  74% { opacity: 1; }
}

.neon-sub {
  text-align: center;
  margin-top: 12px;
  font-size: clamp(10px, 1.8vw, 14px);
  letter-spacing: 6px;
  color: #7dfcff;
  text-shadow: 0 0 14px rgba(0, 255, 255, 0.8);
  animation: coinBlink 1.6s steps(2, start) infinite;
}

@keyframes coinBlink {
  0%, 60% { opacity: 1; }
  61%, 100% { opacity: 0.35; }
}

/* ---------- CABINET ROW ---------- */
.cab-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 38px;
  max-width: 1240px;
  margin: 60px auto 0;
  padding: 0 26px;
  align-items: end;
}

/* ---------- ARCADE CABINET ---------- */
.cabinet {
  --accent: #00e5ff;
  display: block;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), filter 0.45s ease;
  filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.65));
}

.cabinet:hover {
  transform: translateY(-10px) scale(1.025);
  filter: drop-shadow(0 34px 40px rgba(0, 0, 0, 0.7))
          drop-shadow(0 0 26px var(--accent));
}

.cab-rdr { --accent: #00e5ff; }
.cab-mn  { --accent: #ff2bd6; }
.cab-ffg { --accent: #ffb02b; }
.cab-sna { --accent: #52ff9d; }

/* Marquee */
.cab-marquee {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 55%),
    color-mix(in srgb, var(--accent) 32%, #0a0618);
  border: 2px solid color-mix(in srgb, var(--accent) 75%, #fff 0%);
  border-bottom: none;
  border-radius: 14px 14px 0 0;
  clip-path: polygon(6% 0, 94% 0, 100% 100%, 0 100%);
  padding: 16px 10px 12px;
  text-align: center;
  color: #fff;
  font-size: clamp(11px, 1.4vw, 14px);
  letter-spacing: 1.5px;
  line-height: 1.35;
  text-shadow: 0 0 10px var(--accent), 0 0 26px var(--accent);
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Cabinet body around the screen */
.cab-body {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 18%, #0b0620), #140a2e 18% 82%, color-mix(in srgb, var(--accent) 18%, #0b0620));
  border-left: 2px solid rgba(255, 255, 255, 0.12);
  border-right: 2px solid rgba(255, 255, 255, 0.12);
  padding: 16px 18px 12px;
}

.cab-screen {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  border: 3px solid #05030f;
  overflow: hidden;
  box-shadow:
    inset 0 0 26px rgba(0, 0, 0, 0.8),
    0 0 18px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* CRT scanlines + glass shine */
.cab-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.22) 0 1px,
    transparent 1px 4px
  );
  z-index: 3;
  pointer-events: none;
}

.cab-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 25% 10%, rgba(255, 255, 255, 0.14), transparent 45%);
  z-index: 4;
  pointer-events: none;
}

.scr-initials {
  font-size: clamp(30px, 4.4vw, 52px);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 4px;
  text-shadow: 0 0 22px var(--accent), 0 0 60px var(--accent);
  z-index: 1;
}

/* Screen art per game (swap for cover images 630x500 anytime) */
.scr-rdr {
  background:
    radial-gradient(circle at 30% 30%, rgba(0, 255, 255, 0.4), transparent 55%),
    linear-gradient(140deg, #021a33, #063a5e 55%, #021a33);
}
.scr-mn {
  background:
    radial-gradient(circle at 70% 25%, rgba(255, 0, 170, 0.45), transparent 55%),
    linear-gradient(140deg, #1a0433, #3d0a5e 55%, #12042b);
}
.scr-ffg {
  background:
    radial-gradient(circle at 35% 70%, rgba(255, 170, 0, 0.4), transparent 55%),
    linear-gradient(140deg, #330a04, #5e1e0a 55%, #2b0a04);
}
.scr-sna {
  background:
    radial-gradient(circle at 60% 40%, rgba(140, 255, 100, 0.22), transparent 55%),
    linear-gradient(140deg, #04110a, #0e2b16 55%, #030d08);
}

.cab-screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* PLAY overlay on hover */
.scr-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 6, 16, 0.6);
  color: #fff;
  font-size: 17px;
  letter-spacing: 4px;
  text-shadow: 0 0 18px var(--accent);
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 5;
}

@media (hover: hover) {
  .cabinet.playable:hover .scr-play { opacity: 1; }
}

@media (hover: none) and (pointer: coarse) {
  .cabinet.playable .scr-play { opacity: 1; }
}

/* Coming soon attract mode — initials fade back so the text reads */
.cabinet.coming-soon .scr-initials { opacity: 0.12; }

.scr-soon {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(0, 4, 12, 0.55);
  z-index: 5;
  color: #ffd95e;
  font-size: 13px;
  letter-spacing: 3px;
  text-shadow: 0 0 14px rgba(255, 210, 90, 0.8);
  animation: coinBlink 1.4s steps(2, start) infinite;
}

.scr-soon small {
  font-size: 9px;
  letter-spacing: 2px;
  color: #ffeeb0;
}

/* Control panel */
.cab-panel {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 26%, #0d0722), #0a0518);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top: none;
  clip-path: polygon(0 0, 100% 0, 92% 100%, 8% 100%);
  padding: 14px 30px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.joystick {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff6a6a, #a80f0f);
  box-shadow: 0 0 12px rgba(255, 80, 80, 0.8);
  position: relative;
}

.joystick::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 14px;
  width: 4px;
  height: 12px;
  background: linear-gradient(#666, #222);
  border-radius: 2px;
}

.cab-buttons {
  display: flex;
  gap: 8px;
}

.cab-buttons i {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
}

.cab-buttons i:nth-child(1) { background: #ffd23b; color: #ffd23b; }
.cab-buttons i:nth-child(2) { background: #3bff6a; color: #3bff6a; }
.cab-buttons i:nth-child(3) { background: #3b9dff; color: #3b9dff; }

/* Base / coin door */
.cab-base {
  background: linear-gradient(180deg, #0c0720, #05030f);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 12px 10px 14px;
  text-align: center;
  color: color-mix(in srgb, var(--accent) 80%, #fff);
  font-size: 10px;
  letter-spacing: 3px;
  text-shadow: 0 0 12px var(--accent);
}

/* Neon underglow on the floor */
.cabinet::after {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -16px;
  height: 26px;
  background: radial-gradient(50% 100% at 50% 0%, var(--accent), transparent 75%);
  opacity: 0.35;
  filter: blur(8px);
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.cabinet:hover::after { opacity: 0.75; }

/* ---------- CTA ---------- */
.gz-cta {
  position: relative;
  z-index: 2;
  text-align: center;
  margin: 70px auto 20px;
  padding: 0 24px;
  max-width: 720px;
}

.gz-cta p {
  color: #bfefff;
  font-size: clamp(13px, 2.4vw, 16px);
  letter-spacing: 1.2px;
  line-height: 1.7;
}

.gz-cta a {
  color: #00ccff;
  text-decoration: none;
  font-weight: 900;
  text-shadow: 0 0 18px rgba(0, 204, 255, 0.8);
  transition: all 0.3s ease;
}

.gz-cta a:hover {
  color: #fff;
  text-shadow: 0 0 26px #fff;
}

/* ---------- DROP-IN SEQUENCE ----------
   Each cabinet falls from above with gravity + bounce, one by one L→R */
.cabinet {
  opacity: 0;
  transform: translateY(-135vh);
}
.cabinet.drop {
  animation: cabinetDrop 1.15s cubic-bezier(0.35, 0, 0.65, 1) forwards;
}

/* after landing — hover lift works again */
.cabinet.landed { opacity: 1; transform: translateY(0); }

@keyframes cabinetDrop {
  0%   { transform: translateY(-135vh) rotate(-3deg); opacity: 0; }
  6%   { opacity: 1; }
  52%  { transform: translateY(0) rotate(0.6deg); }      /* first impact */
  64%  { transform: translateY(-11%) rotate(-1.2deg); }  /* bounce up */
  76%  { transform: translateY(0) rotate(0.5deg); }      /* land */
  86%  { transform: translateY(-4%); }                   /* small bounce */
  94%  { transform: translateY(0); }
  100% { transform: translateY(0) rotate(0); opacity: 1; }
}

/* dust puff kicked up on landing */
.cabinet.drop::before {
  content: '';
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: -6px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(180,220,255,0.35), transparent 70%);
  opacity: 0;
  animation: cabinetDust 1.15s ease-out forwards;
  pointer-events: none;
}

@keyframes cabinetDust {
  0%, 50% { opacity: 0; transform: scaleX(0.4); }
  58% { opacity: 0.8; transform: scaleX(1.1); }
  100% { opacity: 0; transform: scaleX(1.6); }
}

/* ---------- PLAYABLE GAME MODAL ---------- */
.game-modal {
  position: fixed;
  inset: 0;
  z-index: 100010;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 2, 8, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 18px;
}
.game-modal.open { display: flex; }
.game-modal-card {
  width: min(1100px, 98vw);
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  background: rgba(3, 9, 22, 0.98);
  border: 1px solid rgba(0, 255, 255, 0.5);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85), 0 0 60px rgba(0, 200, 255, 0.2);
}
.game-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(90deg, rgba(0, 90, 140, 0.5), rgba(60, 0, 140, 0.35));
  border-bottom: 1px solid rgba(0, 255, 255, 0.3);
}
.game-modal-title {
  font-size: 14px;
  letter-spacing: 3px;
  color: #7dfcff;
  text-shadow: 0 0 12px rgba(0, 255, 255, 0.7);
}
.game-modal-tools { display: flex; align-items: center; gap: 8px; }
.game-modal-tools button,
.game-modal-tools a {
  border: 1px solid rgba(0, 255, 255, 0.5);
  background: rgba(0, 70, 120, 0.6);
  color: #baf3ff;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11px;
  letter-spacing: 1px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
}
.game-modal-tools button:hover,
.game-modal-tools a:hover { box-shadow: 0 0 16px rgba(0, 255, 255, 0.5); color: #fff; }
.game-modal-close {
  border-color: rgba(255, 90, 110, 0.6) !important;
  background: rgba(90, 10, 25, 0.6) !important;
  color: #ffb3c0 !important;
  font-size: 16px !important;
  padding: 6px 12px !important;
}
.game-frame-wrap { flex: 1; min-height: 340px; background: #05060f; display: flex; }
.game-frame-wrap iframe { width: 100%; height: 66vh; border: 0; display: block; }
.game-frame-wrap:fullscreen { background: #000; }
.game-frame-wrap:fullscreen iframe { height: 100%; }

/* ---------- MOBILE ---------- */
@media (max-width: 768px) {
  .neon-sign { padding-top: 90px; }
  .cab-row { gap: 30px; margin-top: 44px; }
  body { padding-bottom: 170px; }
  .game-modal-head { flex-wrap: wrap; }
  .game-frame-wrap iframe { height: 60vh; }
}

/* Short landscape phones */
@media (max-height: 500px) {
  .neon-sign { padding-top: 60px; font-size: clamp(26px, 5vw, 40px); }
  .cab-row { margin-top: 30px; }
}

@media (hover: none) and (pointer: coarse) {
  .cabinet:hover { transform: none; }
}
