/* =====================================================================
   FERMAH JUMP  –  style.css
   Dark, Web3 / blockchain-inspired aesthetics
   ===================================================================== */

/* ── Reset & Base ─────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-deep:      #050a1a;
  --bg-mid:       #0c1630;
  --accent:       #4af0c4;   /* Fermah teal/mint */
  --accent2:      #7b5cff;   /* purple */
  --accent3:      #00d4ff;   /* cyan */
  --text-hi:      #e8eeff;
  --text-lo:      #6e7fa3;
  --card-bg:      rgba(12, 22, 52, 0.82);
  --card-border:  rgba(74, 240, 196, 0.18);
  --glow:         0 0 32px rgba(74, 240, 196, 0.35);
  --fnt:          'Outfit', sans-serif;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-deep);
  font-family: var(--fnt);
  color: var(--text-hi);
}

/* ── Canvas ───────────────────────────────────────────────────────── */
#gameCanvas {
  display: block;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* ── Overlay wrapper ──────────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;

  /* Background image (menu-bg.png) with a dark tinted overlay on top.
     If the file is missing the browser silently falls back to the
     gradient layer below.  Replace 'menu-bg.png' with your own file. */
  background:
    /* dark tint so text stays readable */
    linear-gradient(rgba(5,10,26,0.62), rgba(5,10,26,0.72)),
    /* your custom background image – cover the whole screen */
    url('menu-bg.png') center / cover no-repeat,
    /* colour accents / fallback gradient */
    radial-gradient(ellipse 80% 60% at 50% 0%,  rgba(123,92,255,.30) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 80% 100%, rgba(74,240,196,.22) 0%, transparent 70%),
    linear-gradient(180deg, #050a1a 0%, #070f1f 100%);
}

.overlay.hidden { display: none; }

/* ── Card ─────────────────────────────────────────────────────────── */
.overlay-card {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  padding: 2.8rem 3rem 2.6rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  backdrop-filter: blur(20px);
  box-shadow: var(--glow), 0 8px 48px rgba(0,0,0,.6);
  max-width: 420px;
  width: 90vw;
  text-align: center;
}

/* ── Animated title logo ──────────────────────────────────────────── */
.logo-bounce {
  animation: logoBounce 1.2s ease-in-out infinite alternate;
}
@keyframes logoBounce {
  from { transform: translateY(0);   }
  to   { transform: translateY(-14px); }
}

.title-logo {
  width: 100px;
  height: auto;
  filter: drop-shadow(0 0 16px rgba(74,240,196,.7));
  border-radius: 16px;
}

/* ── Typography ───────────────────────────────────────────────────── */
.game-title {
  font-size: clamp(2.4rem, 7vw, 3.4rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.05;
  color: var(--text-hi);
  text-shadow: 0 0 24px rgba(74,240,196,.6);
}

.title-accent {
  color: var(--accent);
  text-shadow: 0 0 32px var(--accent);
}

.subtitle {
  font-size: .95rem;
  font-weight: 300;
  color: var(--text-lo);
  max-width: 280px;
  line-height: 1.5;
}

/* ── Controls hint ────────────────────────────────────────────────── */
.controls-hint {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: rgba(74,240,196,.07);
  border: 1px solid rgba(74,240,196,.15);
  border-radius: 8px;
  padding: .45rem 1rem;
  font-size: .85rem;
  color: var(--accent);
  letter-spacing: .05em;
}
.controls-hint .divider { color: var(--text-lo); }
.controls-hint .hint-label { color: var(--text-lo); font-size: .78rem; }

/* ── CTA Button ───────────────────────────────────────────────────── */
.cta-btn {
  margin-top: .4rem;
  padding: .85rem 2.4rem;
  font-family: var(--fnt);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent3) 100%);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 0 22px rgba(74,240,196,.5), 0 4px 16px rgba(0,0,0,.4);
  transition: transform .15s ease, box-shadow .15s ease;
}
.cta-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 36px rgba(74,240,196,.75), 0 6px 24px rgba(0,0,0,.5);
}
.cta-btn:active  { transform: scale(.97); }

/* Secondary / ghost variant */
.cta-secondary {
  background: transparent;
  color: var(--accent);
  box-shadow: 0 0 14px rgba(74,240,196,.2), inset 0 0 0 1.5px rgba(74,240,196,.4);
}
.cta-secondary:hover {
  background: rgba(74,240,196,.1);
  box-shadow: 0 0 22px rgba(74,240,196,.4), inset 0 0 0 1.5px rgba(74,240,196,.7);
}

/* ── Mute toggle button ───────────────────────────────────────────── */
.mute-btn {
  background: rgba(5,10,26,.45);
  border: 1px solid rgba(74,240,196,.2);
  border-radius: 50px;
  padding: 6px 18px;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--accent);
  transition: opacity .15s, border-color .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.mute-btn:hover  { background: rgba(74,240,196,.12); border-color: rgba(74,240,196,.5); }
.mute-btn:active { transform: scale(.93); }
.mute-btn.muted  { opacity: .45; filter: grayscale(.6); }



/* ── Game Over ────────────────────────────────────────────────────── */
.gameover-title {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 900;
  letter-spacing: .1em;
  color: #ff5c8a;
  text-shadow: 0 0 24px rgba(255,92,138,.6);
}
.gameover-sub {
  font-size: .85rem;
  color: var(--text-lo);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.final-score {
  font-size: clamp(3rem, 12vw, 5.5rem);
  font-weight: 900;
  color: var(--accent);
  text-shadow: 0 0 32px rgba(74,240,196,.7);
  line-height: 1;
}

/* ── Brand link (top-right, always on top) ────────────────────────── */
#brand-link {
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 20;        /* above everything including overlays */
  font-family: var(--fnt);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-decoration: none;
  text-shadow: 0 0 14px rgba(74,240,196,.7);
  padding: 6px 14px;
  border: 1px solid rgba(74,240,196,.25);
  border-radius: 20px;
  background: rgba(5,10,26,.6);
  backdrop-filter: blur(8px);
  transition: color .15s, text-shadow .15s, border-color .15s, background .15s;
}
#brand-link:hover {
  color: #fff;
  text-shadow: 0 0 22px rgba(74,240,196,1);
  border-color: rgba(74,240,196,.6);
  background: rgba(74,240,196,.12);
}

/* ── Floating decorative nodes ────────────────────────────────────── */
.node {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  animation: nodeDrift 10s ease-in-out infinite alternate;
}
.n1 {
  width: 340px; height: 340px;
  background: rgba(123,92,255,.18);
  top: -80px; left: -80px;
  animation-delay: 0s;
}
.n2 {
  width: 240px; height: 240px;
  background: rgba(74,240,196,.14);
  bottom: 30px; right: -60px;
  animation-delay: -4s;
}
.n3 {
  width: 200px; height: 200px;
  background: rgba(0,212,255,.15);
  bottom: 40px; left: 20%;
  animation-delay: -7s;
}
.n4 {
  width: 160px; height: 160px;
  background: rgba(123,92,255,.12);
  top: 30%; right: 10%;
  animation-delay: -2s;
}

@keyframes nodeDrift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(30px, 20px) scale(1.12); }
}

