/* ===============================
   GAMIFY MODE — VISUAL IDENTITY
================================ */

html.gamify * {
  animation-play-state: paused;
}
html.gamify .game-overlay *,
html.gamify .game-btn,
html.gamify .game-chip {
  animation-play-state: running;
}
html.gamify .parallax,
html.gamify .reveal {
  transform: none !important;
  opacity: 1 !important;
}




/* 1. WORLD BACKGROUND (obvious change) */
html.gamify body {
  background:
    radial-gradient(900px 500px at 30% -10%, rgba(255,255,255,0.04), transparent 65%),
    radial-gradient(800px 600px at 70% 0%, rgba(255,255,255,0.03), transparent 70%),
    linear-gradient(180deg, #000000 0%, #020202 100%);
  background-attachment: fixed;
}



/* 2. GLOBAL COLOR SHIFT */
html.gamify {
  --accent: #ffffff;
  --accent-strong: #ffffff;
}

/* 3. HEADINGS = GAME HUD FEEL */
html.gamify h1,
html.gamify h2 {
  color: #ffffff !important;
 text-shadow:
    0 10px 40px rgba(0,0,0,0.9),   /* deep base */
    0 0 18px rgba(125,211,252, 0.35), /* visible white halo */
    0 0 4px rgba(235, 25, 25, 0.6);   /* crisp edge */
}



/* 4. SECTIONS FEEL LIKE PANELS */
html.gamify section {
  position: relative;
}

html.gamify section::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.05),
    rgba(255,255,255,0.0)
  );
  pointer-events: none;
}

/* 5. CARDS / GRIDS LOOK INTERACTIVE */
html.gamify .grid-tile,
html.gamify .service-card {
  background:
    linear-gradient(180deg,
      rgba(255,255,255,0.06),
      rgba(255,255,255,0.02)
    );
  border: 1px solid rgba(125,211,252,0.25);
  box-shadow:
    0 0 0 1px rgba(167,139,250,0.12),
    0 20px 40px rgba(0,0,0,0.45);
}

/* Hover = game UI feedback */
html.gamify .grid-tile:hover,
html.gamify .service-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 0 0 1px rgba(125,211,252,0.5),
    0 30px 70px rgba(0,0,0,0.6);
}

/* 6. LINKS = NEON */
html.gamify a {
  color: #ffffff;
}

html.gamify a:hover {
  text-shadow: 0 0 6px rgba(255,255,255,0.35);
}


/* 7. HERO IMAGE FEELS “GAME BANNER” */
html.gamify .hero-image {
  filter:
    saturate(1.15)
    contrast(1.08)
    drop-shadow(0 30px 60px rgba(0,0,0,0.7));
}



/* ===============================
   GAMIFY — FORCE OVERRIDE LAYER
================================ */

/* Kill classic dark skins */
html.gamify .stacked-dark,
html.gamify .grid-dark,
html.gamify .hero-dark,
html.gamify .band-dark {
  background: transparent !important;
}

/* Game world panels */
html.gamify section {
  background:
    linear-gradient(
      180deg,
      rgba(0,0,0,0.75),
      rgba(0,0,0,0.9)
    ) !important;

  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(0,0,0,0.8);
}



/* Strong HUD text contrast */
html.gamify h1,
html.gamify h2,
html.gamify h3 {
  color: #e5f3ff !important;
}

/* Paragraphs become readable */
html.gamify p,
html.gamify li {
  color: rgba(226,232,240,0.85) !important;
}

/* ===============================
   GLASS NAVBAR (UNITY STYLE)
================================ */

html.gamify .apple-nav {
  position: fixed;
  top: 0;
  z-index: 9000;

  /* Glass background */
  background: linear-gradient(
    180deg,
    rgba(52, 52, 53, 0.75),
    rgba(59, 59, 59, 0.55)
  ) !important;

  /* Glass effect */
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);

  /* Depth */
  box-shadow:
    0 10px 40px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.04);
}
html.gamify .apple-nav a {
  color: rgba(226,232,240,0.9);
}

html.gamify .apple-nav a:hover {
  color: #ffffff;
  text-shadow: 
    0 0 6px rgba(255,255,255,0.45),
    0 0 12px rgba(255,255,255,0.25);
}


/* Add animated scanline (visible change) */
html.gamify::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,0.02),
      rgba(255,255,255,0.02) 1px,
      transparent 1px,
      transparent 3px
    );
  pointer-events: none;
  opacity: 0.15;
  z-index: 0;
}


/* ===============================
   HERO GAME ENTRY
================================ */

html.gamify .game-anchor {
  margin-top: 32px;
}

html.gamify .game-btn {
background: linear-gradient(
  135deg,
  rgba(0,0,0,0.6),
  rgba(0,0,0,0.4)
);

border: 1px solid rgba(255,255,255,0.12);
color: #ffffff;


  padding: 14px 26px;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 600;

  cursor: pointer;

  box-shadow:
    0 0 0 1px rgba(167,139,250,0.35),
    0 18px 40px rgba(0,0,0,0.6);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    filter 0.25s ease;
}

html.gamify .game-btn:hover {
  transform: translateY(-2px) scale(1.05);
  filter: brightness(1.1);
  box-shadow:
    0 0 0 1px rgba(125,211,252,0.9),
    0 28px 70px rgba(0,0,0,0.85);
}

/* ===============================
   SERVICES GAME INDICATOR
================================ */

html.gamify .game-mode-indicator {
  text-align: center;
  margin: 24px 0 36px;

  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;

  color: rgba(226,232,240,0.75);

  text-shadow: 0 0 10px rgba(125,211,252,0.25);
}


html.gamify .hero-game-hint {
  margin-top: 14px;
  font-size: 0.9rem;
  color: rgba(226,232,240,0.7);
}

html.gamify .hero-game-hint span {
  color: var(--accent);
  cursor: pointer;
  text-shadow: 0 0 8px rgba(125,211,252,0.6);
}

html.gamify .game-strip {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 28px 0 40px;
  flex-wrap: wrap;
}

html.gamify .game-chip {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(125,211,252,0.4);
  color: #e5f0ff;

  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.9rem;

  cursor: pointer;

  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

html.gamify .game-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 12px rgba(125,211,252,0.5);
}


html.gamify .easter-game {
  margin-top: 24px;
  font-size: 0.85rem;
  opacity: 0.6;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

html.gamify .easter-game:hover {
  opacity: 1;
  text-shadow: 0 0 10px rgba(167,139,250,0.6);
}


html.gamify .tech-game-toggle {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin: 24px 0 48px;

  font-size: 0.9rem;
  color: rgba(226,232,240,0.7);
}

html.gamify .tech-game-toggle span {
  cursor: pointer;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

html.gamify .tech-game-toggle span:hover {
  color: var(--accent);
  text-shadow: 0 0 10px rgba(125,211,252,0.6);
}

html.gamify .footer-game-entry {
  text-align: center;
  margin-bottom: 20px;
  font-size: 0.9rem;
  opacity: 0.7;
  cursor: pointer;
}

html.gamify .footer-game-entry:hover {
  opacity: 1;
  text-shadow: 0 0 10px rgba(167,139,250,0.5);
}


/* ===============================
   GAME OVERLAY
================================ */
.game-overlay {
  position: fixed;
  inset: 0;

  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);

  z-index: 10000;

  display: flex;
  align-items: center;
  justify-content: center;
}



.game-overlay.hidden {
  display: none;
}

.game-frame {
  position: relative;

  width: min(94vw, 700px);
  height: min(90vh, 720px);
  padding : 13px;


  background: linear-gradient(
    180deg,
    rgba(12,12,12,0.98),
    rgba(4,4,4,0.99)
  );

  border-radius: 22px;

  box-shadow:
    0 0 0 1px rgba(255,255,255,0.2),
    0 0 40px rgba(255,255,255,0.08),
    0 50px 140px rgba(0,0,0,0.95);

  display: flex;
  flex-direction: column;
  overflow: visible; /* IMPORTANT */
}



.game-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

.game-hud {
  flex-shrink: 0;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 14px 18px;

  background: linear-gradient(
    180deg,
    rgba(20,20,20,0.95),
    rgba(10,10,10,0.85)
  );

  border-bottom: 1px solid rgba(255,255,255,0.14);
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.08);
}



.game-hud span {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #ffffff;

  text-shadow:
    0 0 6px rgba(255,255,255,0.35),
    0 6px 18px rgba(0,0,0,0.9);
}


.game-hud-actions {
  display: flex;
  gap: 8px;
}

.game-hud-btn {
  background: rgba(255,255,255,0.06);
  color: #ffffff;

  border: 1px solid rgba(255,255,255,0.18);
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 8px;

  font-size: 0.8rem;

  backdrop-filter: blur(6px);

  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.game-hud-btn:hover {
  background: rgba(255,255,255,0.14);
  box-shadow: 0 0 10px rgba(255,255,255,0.25);
}


.game-hud-btn:hover {
  background: rgba(255,255,255,0.2);
}

.hidden {
  display: none;
}

#gameMount {
  flex: 1;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 36px 36px 30px;

  overflow: visible;

  background: radial-gradient(
    circle at center,
    rgba(255,255,255,0.025),
    rgba(0,0,0,0.92)
  );
}
#gameMount canvas {
  width: min(520px, 90%);
  height: auto;

  aspect-ratio: 1 / 1;

  background: #050505;
  border-radius: 16px;

  box-shadow:
    0 0 0 1px rgba(255,255,255,0.18),
    0 25px 80px rgba(0,0,0,0.9);

  image-rendering: pixelated;
}



.breakout-hint,
.snake-hint {
  margin-top: 14px;
  font-size: 0.85rem;
  color: rgba(226,232,240,0.65);
  text-align: center;
}

/* ===============================
   GAMIFY BUTTON — GLASS ANIMATION
================================ */

.gamify-btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 5px 16px;
  border-radius: 12px;

  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;

  color: #343435;
  cursor: pointer;

  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.25),
      rgba(255, 255, 255, 0.25)
    );

  border: 1px solid rgba(125,211,252,0.05);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  box-shadow:
    0 0 0 1px rgba(167,139,250,0.25),
    0 1px 1px rgba(0,0,0,0.45);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

/* 🔁 SOFT BREATHING GLOW */
.gamify-btn::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;

  background: linear-gradient(
    120deg,
    rgba(125,211,252,0.6),
    rgba(167,139,250,0.6),
    rgba(125,211,252,0.6)
  );

  opacity: 0.35;
  filter: blur(12px);
  z-index: -1;

  animation: gamifyPulse 3.5s ease-in-out infinite;
}

/* ✨ LIGHT SWEEP (Unity-style) */
.gamify-btn::after {
  content: "";
  position: absolute;
  inset: 0;

  background: linear-gradient(
    120deg,
    transparent 20%,
    rgba(241, 103, 103, 0.35),
    transparent 80%
  );

  opacity: 0;
  transform: translateX(-120%);
  transition: transform 2.5s ease, opacity 0.3s ease;
  pointer-events: none;
}

/* HOVER */
.gamify-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(125,211,252,0.9);

  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.9),
    0 20px 50px rgba(0,0,0,0.6);
}

.gamify-btn:hover::after {
  opacity: 1;
  transform: translateX(120%);
}

/* ACTIVE / CLICK */
.gamify-btn:active {
  transform: translateY(0) scale(0.98);
}

/* 🔁 KEYFRAMES */
@keyframes gamifyPulse {
  0%, 100% {
    opacity: 0.25;
  }
  50% {
    opacity: 0.6;
  }
}

html.gamify h1,
html.gamify h2,
html.gamify h3,
html.gamify p,
html.gamify span,
html.gamify li {
  color: #ffffff !important;
}

/* ===============================
   GAMIFY — WORK TILES (BASE STATE)
================================ */

html.gamify .grid-tile,
html.gamify .service-card,
html.gamify .work-tile {
  background: linear-gradient(
    180deg,
    rgba(12,12,12,0.92),
    rgba(0,0,0,0.98)
  ) !important;

  color: #ffffff;

  border-radius: 22px;

  border: 1px solid rgba(255,255,255,0.12);

  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    0 30px 80px rgba(0,0,0,0.85);

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease,
    background 0.35s ease;
}

html.gamify .grid-tile:hover,
html.gamify .service-card:hover,
html.gamify .work-tile:hover {
  transform: translateY(-8px);

  border-color: rgba(255,255,255,0.35);

  box-shadow:
    0 0 0 1px rgba(255,255,255,0.25),
    0 0 40px rgba(255,255,255,0.12),
    0 50px 120px rgba(0,0,0,0.95);
}
html.gamify .grid-tile:hover,
html.gamify .service-card:hover,
html.gamify .work-tile:hover {
  transform: translateY(-8px);

  border-color: rgba(255,255,255,0.35);

  box-shadow:
    0 0 0 1px rgba(255,255,255,0.25),
    0 0 40px rgba(255,255,255,0.12),
    0 50px 120px rgba(0,0,0,0.95);
}


/* =========================================================
   GAMIFY MODE — HARD DARK OVERRIDES (FIX WHITE SECTIONS)
   MUST BE AT THE VERY END OF FILE
========================================================= */

/* -------------------------
   GENERIC CARD / TILE FIX
-------------------------- */
html.gamify .grid-tile,
html.gamify .service-card,
html.gamify .work-card,
html.gamify .project-card {
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.85),
    rgba(0,0,0,0.95)
  ) !important;

  color: #ffffff !important;

  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    0 20px 60px rgba(0,0,0,0.8);

  backdrop-filter: blur(6px);
}

/* Hover glow */
html.gamify .grid-tile:hover,
html.gamify .service-card:hover,
html.gamify .work-card:hover {
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.25),
    0 30px 90px rgba(0,0,0,0.95);
}

/* -------------------------
   "GET IN TOUCH" SECTION FIX
-------------------------- */
html.gamify .get-in-touch,
html.gamify .contact-box,
html.gamify .cta-box {
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.9),
    rgba(0,0,0,0.96)
  ) !important;

  color: #ffffff !important;

  box-shadow:
    0 0 0 1px rgba(255,255,255,0.12),
    0 40px 120px rgba(0,0,0,0.9);

  backdrop-filter: blur(8px);
}

/* Fix text inside */
html.gamify .get-in-touch *,
html.gamify .contact-box *,
html.gamify .cta-box * {
  color: #ffffff !important;
}

/* Button inside CTA */
html.gamify .get-in-touch button,
html.gamify .contact-box button {
  background: rgba(255,255,255,0.08);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.25);
}

/* -------------------------
   FOOTER — DARK MODE FIX
-------------------------- */
html.gamify footer,
html.gamify .site-footer {
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.95),
    rgba(0,0,0,1)
  ) !important;

  color: rgba(255,255,255,0.85) !important;
}

/* Footer text + links */
html.gamify footer *,
html.gamify .site-footer * {
  color: rgba(255,255,255,0.85) !important;
}

html.gamify footer a:hover {
  color: #ffffff !important;
  text-shadow: 0 0 8px rgba(255,255,255,0.4);
}

/* Footer separators */
html.gamify footer hr {
  border-color: rgba(255,255,255,0.12);
}

/* -------------------------
   SECTION BACKGROUND SAFETY
-------------------------- */
html.gamify section {
  background-color: transparent !important;
}

