/* ============================================================
   DITTAH GAMES — the dojo
   ============================================================ */

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, sans-serif;
  color: #f4ecd8;
  background:
    radial-gradient(ellipse at 50% 110%, #6a2010 0%, transparent 60%),
    radial-gradient(ellipse at 50% -10%, #1a0830 0%, transparent 50%),
    linear-gradient(180deg, #1a0a28 0%, #3a1018 35%, #6a2818 65%, #c05818 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

body::before {
  /* faint vignette */
  content: '';
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,.55) 100%);
  pointer-events: none;
  z-index: 1;
}

/* ---------- bamboo silhouettes on the sides ---------- */
.bamboo {
  position: fixed;
  top: 0;
  width: 110px;
  height: 100vh;
  opacity: 0.55;
  filter: blur(0.4px);
  pointer-events: none;
  z-index: 2;
}
.bamboo-left  { left: 0; }
.bamboo-right { right: 0; transform: scaleX(-1); }

@media (max-width: 720px) {
  .bamboo { width: 60px; opacity: 0.4; }
}

/* ---------- floating dust motes ---------- */
.motes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}
.motes span {
  position: absolute;
  width: 3px; height: 3px;
  background: rgba(255, 220, 160, 0.7);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(255, 220, 160, 0.8);
  animation: drift 14s linear infinite;
}
.motes span:nth-child(1) { left:  8%; top: 60%; animation-delay: 0s;  animation-duration: 16s; }
.motes span:nth-child(2) { left: 18%; top: 30%; animation-delay: 2s;  animation-duration: 22s; }
.motes span:nth-child(3) { left: 28%; top: 70%; animation-delay: 5s;  animation-duration: 18s; }
.motes span:nth-child(4) { left: 42%; top: 20%; animation-delay: 1s;  animation-duration: 26s; }
.motes span:nth-child(5) { left: 56%; top: 50%; animation-delay: 7s;  animation-duration: 20s; }
.motes span:nth-child(6) { left: 64%; top: 80%; animation-delay: 3s;  animation-duration: 24s; }
.motes span:nth-child(7) { left: 74%; top: 40%; animation-delay: 9s;  animation-duration: 18s; }
.motes span:nth-child(8) { left: 82%; top: 25%; animation-delay: 4s;  animation-duration: 22s; }
.motes span:nth-child(9) { left: 90%; top: 65%; animation-delay: 6s;  animation-duration: 16s; }
.motes span:nth-child(10){ left: 95%; top: 50%; animation-delay: 8s;  animation-duration: 28s; }
@keyframes drift {
  0%   { transform: translate(0, 0)    scale(1);   opacity: 0; }
  10%  {                                            opacity: 1; }
  90%  {                                            opacity: 1; }
  100% { transform: translate(-30px, -120px) scale(.6); opacity: 0; }
}

/* ============================================================
   TOP BAR + LANTERN
   ============================================================ */
.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 36px;
  max-width: 1200px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

/* paper lantern */
.lantern {
  position: relative;
  width: 44px;
  height: 56px;
  flex-shrink: 0;
}
.lantern-glow {
  position: absolute;
  inset: 4px 0;
  background:
    radial-gradient(ellipse at 50% 40%, #ffe9a8 0%, #ff7020 60%, #a02000 100%);
  border-radius: 50% / 60%;
  box-shadow:
    0 0 18px rgba(255, 160, 60, .9),
    0 0 38px rgba(255, 100, 40, .55),
    0 0 70px rgba(255, 60, 20, .35);
  animation: lanternFlicker 4s ease-in-out infinite;
}
.lantern-band {
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 4px;
  margin-top: -2px;
  background: #1a0a08;
  border-radius: 2px;
  z-index: 2;
}
.lantern-rope {
  position: absolute;
  left: 50%; top: -10px;
  width: 1.5px;
  height: 12px;
  background: #4a2a18;
  margin-left: -0.75px;
}
@keyframes lanternFlicker {
  0%, 100% { transform: translateY(0)    scale(1);    filter: brightness(1);   }
  20%      { transform: translateY(-1px) scale(1.02); filter: brightness(1.08);}
  50%      { transform: translateY(0)    scale(0.99); filter: brightness(0.94);}
  75%      { transform: translateY(-1px) scale(1.01); filter: brightness(1.05);}
}

.brand-text h1 {
  margin: 0;
  font-family: 'Noto Serif JP', serif;
  font-weight: 900;
  font-size: 26px;
  letter-spacing: 4px;
  color: #fff080;
  text-shadow: 0 2px 0 #2a0808, 0 0 18px rgba(255, 224, 128, .35);
}
.brand-sub {
  margin: 2px 0 0;
  font-family: 'Noto Serif JP', serif;
  font-size: 12px;
  letter-spacing: 6px;
  color: rgba(255, 220, 160, 0.65);
  text-transform: lowercase;
}

.ambient-toggle {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 220, 160, .35);
  background: rgba(20, 8, 12, .55);
  color: #f4e0b8;
  font-size: 18px;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: border-color .2s, background .2s, transform .15s;
}
.ambient-toggle:hover {
  border-color: #fff080;
  background: rgba(60, 20, 8, .6);
}
.ambient-toggle.on {
  color: #fff080;
  border-color: #fff080;
  box-shadow: 0 0 14px rgba(255, 240, 128, .35);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  z-index: 5;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 36px 60px;
  text-align: center;
}

.canvas-wrap {
  position: relative;
  margin: 0 auto;
  max-width: 900px;
}
#dojoCanvas {
  display: block;
  width: 100%;
  height: auto;
  max-width: 900px;
  margin: 0 auto;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .55));
}
.canvas-floor {
  position: absolute;
  left: 6%; right: 6%;
  bottom: -2px;
  height: 30px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, .55) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

/* ---------- hero card (wooden plaque) ---------- */
.hero-card {
  position: relative;
  margin: -10px auto 0;
  max-width: 620px;
  padding: 4px;
  background:
    repeating-linear-gradient(91deg, rgba(60, 30, 10, .35) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, #b6783a 0%, #8a4a18 50%, #5a2a0a 100%);
  border: 3px solid #2a1408;
  border-radius: 18px;
  box-shadow:
    inset 0 2px 4px rgba(255, 220, 170, .35),
    inset 0 -3px 6px rgba(0, 0, 0, .45),
    0 12px 30px rgba(0, 0, 0, .6);
}
.hero-card-inner {
  background: linear-gradient(180deg, rgba(20, 8, 12, .85) 0%, rgba(40, 12, 8, .9) 100%);
  border: 2px solid rgba(255, 200, 120, .35);
  border-radius: 14px;
  padding: 26px 32px 28px;
}
.hero-meta {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.meta-pill {
  font-family: 'Noto Serif JP', serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 2px;
  padding: 4px 10px;
  background: rgba(255, 220, 160, .08);
  border: 1px solid rgba(255, 220, 160, .35);
  border-radius: 999px;
  color: rgba(255, 240, 200, .85);
}
.hero-card h2 {
  margin: 0 0 8px;
  font-family: 'Noto Serif JP', serif;
  font-weight: 900;
  font-size: 42px;
  letter-spacing: 2px;
  color: #fff080;
  text-shadow: 0 3px 0 #1a0408, 0 0 24px rgba(255, 100, 60, .45);
}
.hero-card h2 .amp {
  color: #ff5030;
  font-size: 0.6em;
  font-style: italic;
  margin: 0 4px;
}
.pitch {
  margin: 0 0 22px;
  font-family: 'Noto Serif JP', serif;
  font-size: 14px;
  letter-spacing: 4px;
  color: rgba(255, 220, 160, .85);
}

/* ---------- the FIGHT button ---------- */
.fight-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 44px;
  font-family: 'Noto Serif JP', serif;
  font-weight: 900;
  font-size: 26px;
  letter-spacing: 6px;
  text-decoration: none;
  color: #fff5d0;
  background:
    repeating-linear-gradient(91deg, rgba(60, 0, 0, .45) 0 2px, transparent 2px 8px),
    linear-gradient(180deg, #d02020 0%, #a01010 50%, #5a0808 100%);
  border: 3px solid #2a0000;
  border-radius: 12px;
  cursor: pointer;
  text-shadow: 0 2px 0 #2a0000, 0 0 12px rgba(255, 80, 40, .65);
  box-shadow:
    inset 0 2px 4px rgba(255, 200, 160, .55),
    inset 0 -3px 6px rgba(0, 0, 0, .55),
    0 8px 18px rgba(0, 0, 0, .55),
    0 0 0 rgba(255, 60, 20, 0);
  transition: transform .12s ease, box-shadow .25s ease, filter .15s;
}
.fight-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow:
    inset 0 2px 4px rgba(255, 200, 160, .65),
    inset 0 -3px 6px rgba(0, 0, 0, .55),
    0 14px 26px rgba(0, 0, 0, .6),
    0 0 32px rgba(255, 60, 20, .55);
}
.fight-btn:active {
  transform: translateY(1px);
}
.fight-btn-icon {
  font-size: 18px;
  opacity: .9;
}

.hero-tip {
  margin: 18px 0 0;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: rgba(255, 220, 160, .55);
  text-transform: lowercase;
}

/* ============================================================
   COMING SOON
   ============================================================ */
.upcoming {
  margin: 56px auto 0;
  max-width: 720px;
}
.upcoming-divider {
  position: relative;
  margin-bottom: 22px;
  text-align: center;
}
.upcoming-divider::before,
.upcoming-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 32%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 220, 160, .35), transparent);
}
.upcoming-divider::before { left:  4%; }
.upcoming-divider::after  { right: 4%; }
.upcoming-divider span {
  font-family: 'Noto Serif JP', serif;
  font-size: 12px;
  letter-spacing: 6px;
  color: rgba(255, 220, 160, .55);
  text-transform: lowercase;
}

.upcoming-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 620px;
  margin: 0 auto;
}
.tile {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Noto Serif JP', serif;
  font-weight: 900;
  font-size: 56px;
  color: rgba(255, 220, 160, .35);
  background: rgba(20, 8, 12, .5);
  border: 1.5px dashed rgba(255, 220, 160, .25);
  border-radius: 14px;
  cursor: default;
  position: relative;
  transition: border-color .25s, background .25s, color .25s, transform .15s;
  overflow: hidden;
}
.tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 130%, rgba(255, 100, 40, .15), transparent 70%);
  opacity: 0;
  transition: opacity .3s;
}
.tile:hover {
  border-color: rgba(255, 220, 160, .55);
  color: #fff080;
  transform: translateY(-3px);
}
.tile:hover::before { opacity: 1; }
.tile::after {
  content: attr(data-soon);
  position: absolute;
  bottom: 10px; left: 0; right: 0;
  font-family: system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: rgba(255, 220, 160, .6);
  text-transform: uppercase;
  opacity: 0;
  transition: opacity .25s;
}
.tile:hover::after { opacity: 1; }

/* ============================================================
   STATS BAR + SIGN-IN PITCH
   ============================================================ */
.stats-bar {
  margin: 64px auto 0;
  max-width: 620px;
  text-align: center;
  border-top: 1px solid rgba(255, 220, 160, .15);
  padding-top: 28px;
}
.stats {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}
.stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.stat-num {
  font-family: 'Noto Serif JP', serif;
  font-weight: 900;
  font-size: 28px;
  color: #fff080;
  text-shadow: 0 2px 0 #2a0408;
}
.stat-label {
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(255, 220, 160, .65);
  text-transform: uppercase;
}
.stat-divider {
  color: rgba(255, 220, 160, .35);
  font-size: 22px;
}

.signin-pitch {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  letter-spacing: 1.5px;
  color: rgba(255, 220, 160, .55);
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 220, 160, .35);
  padding-bottom: 1px;
  transition: color .2s, border-color .2s;
}
.signin-pitch:hover {
  color: #fff080;
  border-bottom-color: #fff080;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  left: 50%; bottom: 38px;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 22px;
  font-family: 'Noto Serif JP', serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 2px;
  color: #fff080;
  background: rgba(20, 8, 12, .92);
  border: 2px solid rgba(255, 220, 160, .55);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .6);
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s, transform .25s;
  z-index: 100;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- fight transition flash ---------- */
.flash-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, #fff6d0 0%, #ff7a28 35%, #1a0a28 100%);
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  transition: opacity .5s ease-in;
}
.flash-overlay.on { opacity: 1; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 720px) {
  .topbar { padding: 16px 18px; }
  .brand-text h1 { font-size: 20px; letter-spacing: 3px; }
  .brand-sub { font-size: 10px; letter-spacing: 4px; }
  .hero { padding: 0 18px 40px; }
  .hero-card h2 { font-size: 30px; }
  .fight-btn { font-size: 22px; padding: 14px 32px; letter-spacing: 4px; }
  .upcoming-tiles { gap: 10px; }
  .tile { font-size: 40px; }
  .upcoming { margin-top: 38px; }
  .stats-bar { margin-top: 38px; }
}
