/* ==========================================================================
   Captain's Arcade — games.starhuntercrew.com. Shares the Star Hunter Crew
   app's design language: same palette, fonts, cards and dark-sky background.
   ========================================================================== */
@import url("../fonts/fonts.css");

:root {
  --navy-900: #050f20;
  --navy-800: #0a1729;
  --navy-700: #0c1d3c;
  --card: #10213f;
  --card-2: #142a4d;
  --border: rgba(143, 168, 204, 0.18);
  --border-strong: rgba(143, 168, 204, 0.32);
  --ink-100: #eaf3ff;
  --ink-200: #bcd2ee;
  --ink-300: #8fa8cc;
  --green: #8fe36b;
  --orange: #ff8a3c;
  --orange-deep: #f26419;
  --font-head: "Fredoka", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  font-family: var(--font-body);
  color: var(--ink-200);
  background:
    radial-gradient(900px 500px at 70% -8%, rgba(90, 200, 160, 0.14), transparent 60%),
    linear-gradient(180deg, var(--navy-800), var(--navy-900));
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

/* The "device" column — full width on phones, centred card on larger screens */
.device {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 480px;
  margin-inline: auto;
  position: relative;
  overflow: hidden;
}

#app {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: calc(env(safe-area-inset-top) + 14px) 18px calc(env(safe-area-inset-bottom) + 18px);
  display: flex;
  flex-direction: column;
}

h1, h2 { font-family: var(--font-head); color: var(--ink-100); margin: 0; font-weight: 600; }

/* --- Arcade home ----------------------------------------------------------- */
.arcade-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 6px 0 4px;
}
.arcade-top img { width: 56px; height: 56px; }
.arcade-top h1 { font-size: 1.6rem; }
.arcade-top small { display: block; color: var(--ink-300); font-size: 0.85rem; }

.arcade-sub { font-size: 0.85rem; color: var(--ink-300); margin: 10px 0 16px; }

.game-card {
  width: 100%; text-align: left; cursor: pointer; display: flex; align-items: center;
  gap: 12px; padding: 15px 14px; margin-bottom: 12px; border-radius: 15px;
  border: 1px solid rgba(180, 138, 255, 0.4);
  background: linear-gradient(135deg, rgba(180, 138, 255, 0.14), rgba(89, 211, 255, 0.08));
  color: var(--ink-100);
  font: inherit;
}
.game-card .gi {
  flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid;
  place-items: center; font-size: 1.4rem; background: rgba(180, 138, 255, 0.2);
}
.game-card div { flex: 1; }
.game-card strong { display: block; font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; }
.game-card small { color: var(--ink-300); font-size: 0.78rem; }
.game-card .best { color: #ffd666; font-weight: 700; }
.game-card .chev { color: var(--ink-300); font-size: 1.2rem; }
.game-card.soon { opacity: 0.55; cursor: default; border-color: var(--border); background: rgba(255, 255, 255, 0.02); }
.game-card.soon .gi { background: rgba(143, 168, 204, 0.12); }

.back-to-app {
  margin-top: auto;
  padding-top: 18px;
  text-align: center;
  font-size: 0.85rem;
}
.back-to-app a { color: var(--ink-300); text-decoration: none; }
.back-to-app a:hover { color: var(--ink-100); }

/* --- Game screen (same look as the app's arcade) --------------------------- */
.screen.game { display: flex; flex-direction: column; height: 100%; }
.game-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex: none; }
.game-title { font-family: var(--font-head); font-weight: 600; color: var(--ink-100); }
.btn-back {
  border: none; cursor: pointer; font: inherit; font-weight: 700;
  color: #0b2a12; background: var(--green); padding: 8px 14px; border-radius: 999px;
}
.game-stage {
  position: relative; flex: 1; min-height: 320px; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--border-strong);
  background: radial-gradient(600px 400px at 50% -10%, rgba(90, 120, 200, 0.18), transparent 60%), var(--navy-900);
}
.game-canvas { display: block; touch-action: none; }
.super-btn {
  position: absolute; left: 50%; bottom: 74px; transform: translateX(-50%);
  padding: 14px 22px; border: none; border-radius: 999px; cursor: pointer;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem; color: #2a1600;
  background: linear-gradient(180deg, #ffd666, var(--orange));
  box-shadow: 0 0 24px rgba(255, 214, 102, 0.7), 0 4px 14px rgba(0, 0, 0, 0.4);
  animation: super-pulse 0.8s ease-in-out infinite alternate;
}
@keyframes super-pulse {
  from { transform: translateX(-50%) scale(1); }
  to { transform: translateX(-50%) scale(1.08); box-shadow: 0 0 38px rgba(255, 214, 102, 0.95), 0 4px 14px rgba(0, 0, 0, 0.4); }
}
@media (prefers-reduced-motion: reduce) { .super-btn { animation: none; } }
