/* Site 11 — Playful cartoon + Gothic dark (toggle via html[data-theme]) */

@import url("https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;600;700&family=Fredoka:wght@500;600;700&family=Cinzel:wght@500;600;700&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,600;1,9..40,400&display=swap");

:root {
  --zmx-sun: #fbbf24;
  --zmx-pink: #f472b6;
  --zmx-sky: #38bdf8;
  --zmx-grass: #4ade80;
  --zmx-cream: #fffbeb;
}

/* ——— Cartoon (default) ——— */
html[data-theme="cartoon"],
html[data-theme="cartoon"] body {
  font-family: "Comfortaa", system-ui, sans-serif;
}

html[data-theme="cartoon"] body {
  min-height: 100vh;
  background: linear-gradient(180deg, #bae6fd 0%, #fef3c7 45%, #86efac 100%);
  color: #1e293b;
}

html[data-theme="cartoon"] .zmx-display {
  font-family: "Fredoka", system-ui, sans-serif;
}

/* ——— Gothic ——— */
html[data-theme="gothic"],
html[data-theme="gothic"] body {
  font-family: "DM Sans", system-ui, sans-serif;
}

html[data-theme="gothic"] body {
  min-height: 100vh;
  background: radial-gradient(ellipse 80% 50% at 50% -20%, #1a1520 0%, #0a0a0c 55%);
  color: #e7e5e4;
}

html[data-theme="gothic"] .zmx-display {
  font-family: "Cinzel", Georgia, serif;
}

html[data-theme="gothic"] .zmx-gold-glow {
  text-shadow: 0 0 24px rgba(201, 162, 39, 0.35);
}

/* Curtain reveal (gothic) */
.zmx-curtain-wrap {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  display: flex;
  transition: opacity 0.6s ease;
}

html[data-theme="gothic"] .zmx-curtain-wrap {
  pointer-events: none;
}

.zmx-curtain-wrap.zmx-done {
  opacity: 0;
  visibility: hidden;
}

.zmx-curtain {
  flex: 1;
  background: linear-gradient(180deg, #0c0a0d 0%, #1a0f14 50%, #0c0a0d 100%);
  box-shadow: inset 0 0 80px rgba(201, 162, 39, 0.08);
  transform: translateY(0);
  animation: zmxCurtain 1.1s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.zmx-curtain:nth-child(2) {
  animation-delay: 0.05s;
}

@keyframes zmxCurtain {
  to {
    transform: translateY(-100%);
  }
}

/* Floating gold particles (gothic) — canvas behind content */
#zmxParticles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
}

html[data-theme="cartoon"] #zmxParticles {
  display: none;
}

/* Dramatic moving shadow overlay (gothic hero) */
.zmx-gothic-shade {
  position: absolute;
  inset: -20%;
  background: radial-gradient(ellipse at 30% 20%, rgba(201, 162, 39, 0.12), transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(114, 47, 55, 0.15), transparent 45%);
  animation: zmxShade 8s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes zmxShade {
  0% {
    transform: translate(-3%, -2%) scale(1);
    opacity: 0.7;
  }
  100% {
    transform: translate(4%, 3%) scale(1.05);
    opacity: 1;
  }
}

/* Bounce buttons */
@keyframes zmxBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.zmx-btn-bounce {
  animation: zmxBounce 1.8s ease-in-out infinite;
}

.zmx-btn-bounce:hover {
  animation: none;
  transform: scale(1.05);
}

/* Wiggle */
@keyframes zmxWiggle {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-4deg);
  }
  75% {
    transform: rotate(4deg);
  }
}

.zmx-wiggle {
  animation: zmxWiggle 2.5s ease-in-out infinite;
}

.zmx-wiggle-slow:hover {
  animation: zmxWiggle 0.4s ease-in-out 2;
}

/* Scroll-driven sprites */
.zmx-scroll-sprite {
  transition: transform 0.15s linear;
  will-change: transform;
}

/* CTA pulse */
@keyframes zmxPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.55);
  }
  50% {
    box-shadow: 0 0 0 14px rgba(251, 191, 36, 0);
  }
}

html[data-theme="cartoon"] .zmx-cta-pulse {
  animation: zmxPulse 2s ease-out infinite;
}

@keyframes zmxPulseGold {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(201, 162, 39, 0.45);
  }
  50% {
    box-shadow: 0 0 0 16px rgba(201, 162, 39, 0);
  }
}

html[data-theme="gothic"] .zmx-cta-pulse {
  animation: zmxPulseGold 2.2s ease-out infinite;
}

/* Cartoon cards */
html[data-theme="cartoon"] .zmx-play-card {
  border-radius: 28px;
  border: 3px solid rgba(255, 255, 255, 0.85);
  box-shadow: 8px 12px 0 rgba(15, 23, 42, 0.12), 0 16px 40px rgba(56, 189, 248, 0.15);
  background: linear-gradient(145deg, #fff 0%, #fef9c3 100%);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

html[data-theme="cartoon"] .zmx-play-card:hover {
  transform: translateY(-4px) rotate(-0.5deg);
  box-shadow: 10px 16px 0 rgba(15, 23, 42, 0.1), 0 20px 50px rgba(244, 114, 182, 0.2);
}

/* Gothic cards */
html[data-theme="gothic"] .zmx-gothic-card {
  border-radius: 4px;
  border: 1px solid rgba(201, 162, 39, 0.35);
  background: linear-gradient(160deg, rgba(26, 22, 28, 0.95), rgba(10, 10, 12, 0.98));
  box-shadow: 0 0 24px rgba(201, 162, 39, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html[data-theme="gothic"] .zmx-gothic-card:hover {
  box-shadow: 0 0 32px rgba(201, 162, 39, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Speech bubbles (cartoon) */
.zmx-bubble {
  position: relative;
  background: #fff;
  border: 3px solid #1e293b;
  border-radius: 20px;
  padding: 1rem 1.1rem;
  box-shadow: 4px 6px 0 rgba(15, 23, 42, 0.15);
}

.zmx-bubble::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 28px;
  border: 10px solid transparent;
  border-top-color: #1e293b;
}

.zmx-bubble-inner {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 14px;
}

/* Lobby overrides */
html[data-theme="cartoon"] .zmx_lobby_header {
  border-bottom-color: rgba(244, 114, 182, 0.35) !important;
}

html[data-theme="cartoon"] .zmx_card {
  border-radius: 22px !important;
  border: 3px solid rgba(255, 255, 255, 0.9) !important;
  box-shadow: 6px 10px 0 rgba(15, 23, 42, 0.1) !important;
}

html[data-theme="gothic"] .zmx_card {
  border-radius: 6px !important;
  border: 1px solid rgba(201, 162, 39, 0.4) !important;
  background: #121014 !important;
  box-shadow: 0 0 20px rgba(201, 162, 39, 0.12) !important;
}

html[data-theme="gothic"] .zmx_lobby_title {
  color: #f5e6b8 !important;
}

html[data-theme="gothic"] .zmx_lobby_count {
  color: #a89870 !important;
}

html[data-theme="gothic"] .zmx_card_name {
  color: #e7e5e4 !important;
}

html[data-theme="gothic"] .zmx_card_overlay {
  background: linear-gradient(to top, rgba(10, 10, 12, 0.95) 0%, rgba(10, 10, 12, 0.45) 40%, transparent 70%) !important;
}

/* Header / footer theming hooks */
html[data-theme="cartoon"] .zmx_hdr_playful {
  background: rgba(255, 255, 255, 0.92) !important;
  border-bottom: 3px solid #f472b6 !important;
}

html[data-theme="gothic"] .zmx_hdr_playful {
  background: rgba(10, 10, 12, 0.95) !important;
  border-bottom: 1px solid rgba(201, 162, 39, 0.25) !important;
}

html[data-theme="cartoon"] .zmx_ftr_playful {
  background: linear-gradient(180deg, #fef3c7, #fde68a) !important;
  color: #1e293b !important;
}

html[data-theme="gothic"] .zmx_ftr_playful {
  background: #0a0a0c !important;
  color: #a8a29e !important;
  border-top: 1px solid rgba(201, 162, 39, 0.2) !important;
}

/* Header nav (layout.php) */
.zmx_hdr_in {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  min-height: 56px;
}

.zmx_brand {
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.zmx_brand:hover {
  transform: scale(1.02);
}

.zmx_brand_dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

html[data-theme="cartoon"] .zmx_brand_dot {
  background: linear-gradient(135deg, #f472b6, #fbbf24);
  box-shadow: 0 0 0 2px #fff;
}

html[data-theme="gothic"] .zmx_brand_dot {
  background: radial-gradient(circle at 30% 30%, #e8d5a3, #8b6914);
  box-shadow: 0 0 12px rgba(201, 162, 39, 0.35);
}

html[data-theme="cartoon"] .zmx_brand {
  color: #be185d !important;
}

html[data-theme="gothic"] .zmx_brand {
  color: #d4af37 !important;
}

.zmx_nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.zmx_nav a {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  text-decoration: none;
  border-radius: 999px;
  transition: transform 0.15s ease, background 0.2s ease;
}

html[data-theme="cartoon"] .zmx_nav a {
  color: #0f172a !important;
  border: 2px solid rgba(30, 41, 59, 0.15);
  background: rgba(255, 255, 255, 0.65);
}

html[data-theme="cartoon"] .zmx_nav a:hover {
  background: #fff;
  transform: translateY(-2px);
  border-color: #f472b6;
}

html[data-theme="gothic"] .zmx_nav a {
  color: #d6d3d1 !important;
  border: 1px solid rgba(201, 162, 39, 0.25);
  background: rgba(20, 18, 22, 0.6);
}

html[data-theme="gothic"] .zmx_nav a:hover {
  border-color: rgba(201, 162, 39, 0.55);
  color: #fef3c7 !important;
}

.zmx_theme_btn {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  border: 2px solid currentColor;
  flex-shrink: 0;
}

html[data-theme="cartoon"] .zmx_theme_btn {
  color: #1e293b;
  background: linear-gradient(135deg, #fde68a, #fbcfe8);
}

html[data-theme="gothic"] .zmx_theme_btn {
  color: #c9a24a;
  background: #141218;
  border-color: rgba(201, 162, 39, 0.45);
}

.zmx_ham {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid rgba(30, 41, 59, 0.2);
  border-radius: 8px;
  cursor: pointer;
  padding: 0.45rem 0.55rem;
}

html[data-theme="gothic"] .zmx_ham {
  background: rgba(20, 18, 22, 0.8);
  border-color: rgba(201, 162, 39, 0.3);
}

.zmx_ham span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
}

html[data-theme="cartoon"] .zmx_ham span {
  background: #1e293b;
}

html[data-theme="gothic"] .zmx_ham span {
  background: #c9a24a;
}

@media (max-width: 640px) {
  .zmx_nav {
    display: none;
  }
  .zmx_ham {
    display: flex !important;
  }
}

.zmx_mobdrop {
  display: none;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.zmx_mobdrop.zmx_open {
  display: block;
}

.zmx_mobnav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.55rem 1.25rem 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.zmx_mobnav a {
  font-size: 0.78rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

html[data-theme="cartoon"] .zmx_mobnav a {
  color: #0f172a;
  border: 2px solid rgba(30, 41, 59, 0.12);
  background: rgba(255, 255, 255, 0.85);
}

html[data-theme="gothic"] .zmx_mobnav a {
  color: #e7e5e4;
  border: 1px solid rgba(201, 162, 39, 0.25);
  background: rgba(15, 14, 18, 0.95);
}

html[data-theme="cartoon"] .zmx_hdr_top {
  height: 4px !important;
  background: linear-gradient(90deg, #f472b6, #fbbf24, #38bdf8, #4ade80) !important;
}

html[data-theme="gothic"] .zmx_hdr_top {
  height: 2px !important;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.6), transparent) !important;
}

html[data-theme="cartoon"] .zmx_ftr_playful a {
  color: #57534e !important;
  border: 1px solid rgba(244, 114, 182, 0.35) !important;
  background: rgba(255, 255, 255, 0.6) !important;
}

html[data-theme="gothic"] .zmx_ftr_playful a {
  color: #d6d3d1 !important;
  border: 1px solid rgba(201, 162, 39, 0.25) !important;
  background: rgba(20, 18, 22, 0.5) !important;
}
