/* ===== Kaiju Legends — Under Construction =====
   Theme: "Toxic Blue". Change --accent / --accent2 to retheme. */

:root {
  --accent:  #4ad9ff;   /* primary neon  */
  --accent2: #b07bff;   /* secondary     */
  --glow-br: #2f9fe0;   /* bottom-right background glow (plush blue) */
  --orange:  #f26a21;   /* traffic-cone orange (Discord button)      */
  --ink:     #07140c;   /* near-black outline                        */
  --bg:      #0a0d0b;
  --text:    #eafff0;
  --muted:   #b9d6c6;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
}

body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  color: var(--text);
}

/* ---------- root / background ---------- */
.kl-root {
  position: relative;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 32px;
  background:
    radial-gradient(900px 700px at 12% 6%,  color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
    radial-gradient(820px 680px at 90% 96%, color-mix(in srgb, var(--glow-br) 22%, transparent), transparent 60%),
    var(--bg);
}

.kl-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  overflow: hidden;
}

.kl-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .5;
  background-image:
    linear-gradient(color-mix(in srgb, var(--accent) 8%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 8%, transparent) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 45%, #000 30%, transparent 80%);
          mask-image: radial-gradient(ellipse 85% 75% at 50% 45%, #000 30%, transparent 80%);
}

/* ---------- floating sparks ---------- */
.kl-spark {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.kl-spark.s1 {
  left: -4%; top: 30px; width: 60px; height: 60px;
  filter: blur(2px);
  background: color-mix(in srgb, var(--accent) 70%, transparent);
  animation: klFloat 5.5s ease-in 0s infinite;
}
.kl-spark.s2 {
  left: 18%; bottom: 8%; width: 10px; height: 10px;
  background: var(--accent2);
  box-shadow: 0 0 14px var(--accent2);
  animation: klFloat 6.2s ease-in 1.2s infinite;
}
.kl-spark.s3 {
  right: 12%; bottom: 6%; width: 8px; height: 8px;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
  animation: klFloat 5s ease-in .6s infinite;
}

/* ---------- hazard tape ---------- */
.kl-tape {
  position: absolute;
  left: 0; right: 0;
  height: 26px;
  z-index: 3;
  background-size: 64px 64px;
}
.kl-tape.top {
  top: 0;
  border-bottom: 3px solid var(--ink);
  background-image: repeating-linear-gradient(45deg, #ffd23f 0 22px, #15110a 22px 44px);
  box-shadow: 0 2px 14px rgba(0,0,0,.4);
  animation: klTape 1.4s linear infinite;
}
.kl-tape.bottom {
  bottom: 0;
  border-top: 3px solid var(--ink);
  background-image: repeating-linear-gradient(-45deg, #ffd23f 0 22px, #15110a 22px 44px);
  box-shadow: 0 -2px 14px rgba(0,0,0,.4);
  animation: klTape 1.4s linear infinite reverse;
}

/* ---------- hero layout ---------- */
.kl-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 5vw, 80px);
  width: 100%;
  max-width: 1120px;
  z-index: 4;
}

.kl-stage {
  order: 1;
  flex: 0 1 600px;
  min-width: 320px;
  position: relative;
  height: clamp(460px, 54vw, 600px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.kl-copy {
  order: 2;
  flex: 1 1 380px;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* ---------- critter ---------- */
.kl-floor {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 220px;
  height: 36px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0,0,0,.6), transparent 78%);
  animation: klShadow 2.6s ease-in-out infinite;
}

.kl-critter {
  position: relative;
  width: min(580px, 100%);
  aspect-ratio: 1 / 1;
  cursor: pointer;
  transform-origin: 50% 92%;
  animation: klBob 2.6s ease-in-out infinite;
  z-index: 6;
}
.kl-critter img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 14px 22px rgba(0,0,0,.45));
}

/* ---------- speech bubble ---------- */
.kl-bubble {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  z-index: 20;
}
.kl-bubble-box {
  position: relative;
  font-family: 'Bungee', cursive;
  font-size: 26px;
  color: var(--ink);
  background: #fff;
  border: 4px solid var(--ink);
  border-radius: 16px;
  padding: 8px 18px 9px;
  white-space: nowrap;
  box-shadow: 6px 6px 0 color-mix(in srgb, var(--orange) 90%, #000);
}
.kl-bubble-box::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -16px;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 16px solid var(--ink);
}

/* ---------- copy ---------- */
.kl-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px;
  border: 2px solid color-mix(in srgb, var(--accent) 60%, transparent);
  border-radius: 999px;
  background: rgba(10,18,12,.6);
  backdrop-filter: blur(4px);
  font-size: 13px;
  letter-spacing: .22em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  animation: klFlick 4s linear infinite;
}

.kl-logo {
  width: min(330px, 76%);
  height: auto;
  margin: 22px 0 0;
  cursor: pointer;
  user-select: none;
  -webkit-user-drag: none;
}

.kl-lede {
  margin: 22px 0 0;
  max-width: 460px;
  font-size: clamp(15px, 2.4vw, 19px);
  line-height: 1.55;
  color: var(--muted);
}
.kl-lede strong { color: var(--text); }

/* ---------- buttons ---------- */
.kl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}
.kl-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  font-family: 'Bungee', cursive;
  font-size: 14px;
  letter-spacing: .04em;
  text-decoration: none;
  border: 3px solid var(--ink);
  border-radius: 14px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.kl-btn:active { transform: translate(4px,4px) !important; box-shadow: 0 0 0 var(--ink) !important; }

.kl-btn-x {
  color: var(--ink);
  background: var(--accent);
  box-shadow: 4px 4px 0 var(--ink);
}
.kl-btn-x:hover { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--ink); }
.kl-x { font-weight: 700; font-size: 17px; line-height: 1; }

.kl-btn-discord {
  color: var(--text);
  background: rgba(10,18,12,.7);
  border-color: var(--orange);
  box-shadow: 4px 4px 0 color-mix(in srgb, var(--orange) 80%, #000);
}
.kl-btn-discord:hover { transform: translate(2px,2px); box-shadow: 1px 1px 0 color-mix(in srgb, var(--orange) 80%, #000); }
.kl-discord-icon {
  width: 18px; height: 14px;
  background: var(--orange);
  border-radius: 8px 8px 8px 3px;
  display: inline-block;
}

/* ---------- roar meter ---------- */
.kl-meter {
  width: 100%;
  max-width: 380px;
  margin-top: 64px;
}
.kl-meter-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
}
.kl-meter-pct { font-family: 'Bungee', cursive; color: var(--text); font-size: 13px; }
.kl-meter-track {
  position: relative;
  height: 18px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: rgba(7,20,12,.8);
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.5);
}
.kl-meter-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0%;
  border-radius: 999px;
  background-image: repeating-linear-gradient(45deg, var(--accent) 0 10px, color-mix(in srgb, var(--accent) 70%, var(--ink)) 10px 20px);
  background-size: 40px 40px;
  box-shadow: 0 0 14px var(--accent);
  animation: klShimmer .7s linear infinite;
  transition: width .25s cubic-bezier(.34,1.56,.64,1);
}
.kl-meter-hint {
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: .08em;
  color: #5f8470;
}

/* ---------- footer ---------- */
.kl-footer {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  letter-spacing: .1em;
  color: #4a6555;
  white-space: nowrap;
  z-index: 4;
}

/* ---------- keyframes ---------- */
@keyframes klBob    { 0%,100% { transform: translateY(0) rotate(-1.2deg); } 50% { transform: translateY(-20px) rotate(1.2deg); } }
@keyframes klShadow { 0%,100% { transform: translateX(-50%) scale(1);   opacity:.45; } 50% { transform: translateX(-50%) scale(.78); opacity:.28; } }
@keyframes klFlick  { 0%,100% { opacity:1; } 48% { opacity:1; } 50% { opacity:.35; } 52% { opacity:1; } 70% { opacity:.6; } 72% { opacity:1; } }
@keyframes klTape   { from { background-position: 0 0; } to { background-position: 64px 0; } }
@keyframes klFloat  { 0% { transform: translateY(0) scale(1); opacity:0; } 15% { opacity:1; } 100% { transform: translateY(-130px) scale(.3); opacity:0; } }
@keyframes klShimmer{ from { background-position: 0 0; } to { background-position: 40px 0; } }

/* ---------- small screens ---------- */
@media (max-width: 560px) {
  .kl-root { padding: 56px 20px; }
  .kl-footer { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
}
