/* /assets/amazatoy.css */
:root{
  --bg:#0b1118;
  --bg2:#0f1722;
  --panel:rgba(18,26,38,.72);
  --line:rgba(230,238,247,.84);
  --soft:rgba(230,238,247,.56);
  --ball:#f6c177;
  --goal:#9dd9ff;
  --accent:#9fe3c2;
  --border:rgba(255,255,255,.10);
  --shadow:0 12px 36px rgba(0,0,0,.35);
  --gold1:#6f4d11;
  --gold2:#b9831e;
  --gold3:#e2b84f;
  --gold4:#ffd76b;
  --gold5:#fff0b2;
}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent;}
html,body{
  margin:0;
  padding:0;
  height:100%;
  background:radial-gradient(circle at 50% 20%, #13202d 0%, var(--bg) 55%, #070b10 100%);
  color:#eef5fb;
  font-family:system-ui,Segoe UI,Roboto,Arial,sans-serif;
  overflow:hidden;
}
body{touch-action:none;}

a{color:#d8efff;text-decoration:none;}
a:hover{text-decoration:underline;}

.app{
  position:relative;
  width:100vw;
  height:100vh;
  overflow:hidden;
}

/* SPLASH */
.splash{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  z-index:20;
  background:
    radial-gradient(circle at 50% 35%, rgba(157,217,255,.08), transparent 36%),
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0));
}
.splash::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:.55;
  background:
    radial-gradient(circle at 14% 28%, rgba(255,255,255,.10) 0 1px, transparent 2px),
    radial-gradient(circle at 82% 20%, rgba(255,255,255,.08) 0 1px, transparent 2px),
    radial-gradient(circle at 68% 72%, rgba(255,255,255,.10) 0 1px, transparent 2px),
    radial-gradient(circle at 26% 80%, rgba(255,255,255,.08) 0 1px, transparent 2px),
    radial-gradient(circle at 52% 14%, rgba(255,255,255,.06) 0 1px, transparent 2px);
  animation:ambientDrift 18s linear infinite;
}
.splash.isHidden{display:none;}

@keyframes ambientDrift{
  0%{transform:translate3d(0,0,0) scale(1);}
  50%{transform:translate3d(0,-8px,0) scale(1.015);}
  100%{transform:translate3d(0,0,0) scale(1);}
}

.brandWrap{
  position:relative;
  width:min(92vw, 480px);
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)),
    var(--panel);
  border:1px solid var(--border);
  border-radius:28px;
  box-shadow:
    0 18px 44px rgba(0,0,0,.38),
    inset 0 1px 0 rgba(255,255,255,.06);
  padding:28px 22px 20px;
  text-align:center;
  backdrop-filter:blur(12px);
}
.brandWrap::before{
  content:"";
  position:absolute;
  inset:1px;
  border-radius:27px;
  pointer-events:none;
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0));
  mask:linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask:linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  padding:1px;
  opacity:.35;
}

.brand{
  font-size:clamp(34px, 9vw, 52px);
  font-weight:900;
  letter-spacing:.12em;
  margin-bottom:10px;
}

.brandGold{
  position:relative;
  color:transparent;
  background:
    linear-gradient(100deg,
      var(--gold1) 0%,
      var(--gold2) 14%,
      var(--gold3) 28%,
      var(--gold4) 42%,
      var(--gold5) 50%,
      var(--gold4) 58%,
      var(--gold3) 72%,
      var(--gold2) 86%,
      var(--gold1) 100%);
  background-size:260% 100%;
  -webkit-background-clip:text;
  background-clip:text;
  filter:
    drop-shadow(0 0 8px rgba(255,215,107,.16))
    drop-shadow(0 0 18px rgba(255,215,107,.08));
  animation:amazatoyGoldSweep 5.4s linear infinite;
}

.brandGold::before{
  content:"";
  position:absolute;
  inset:-6px -12px;
  border-radius:999px;
  background:radial-gradient(circle, rgba(255,215,107,.10), rgba(255,215,107,0) 70%);
  filter:blur(12px);
  z-index:-1;
  animation:goldAuraPulse 4.8s ease-in-out infinite;
}

.brandGold::after{
  content:"";
  position:absolute;
  top:0;
  left:-28%;
  width:24%;
  height:100%;
  background:linear-gradient(90deg, rgba(255,255,255,0), rgba(255,248,210,.65), rgba(255,255,255,0));
  transform:skewX(-18deg);
  animation:amazatoyShine 3.6s ease-in-out infinite;
  pointer-events:none;
  mix-blend-mode:screen;
}

@keyframes amazatoyGoldSweep{
  0%{background-position:0% 50%;}
  100%{background-position:260% 50%;}
}

@keyframes amazatoyShine{
  0%{left:-32%; opacity:0;}
  8%{opacity:.10;}
  30%{opacity:.35;}
  48%{opacity:1;}
  66%{opacity:.28;}
  100%{left:124%; opacity:0;}
}

@keyframes goldAuraPulse{
  0%,100%{opacity:.55; transform:scale(1);}
  50%{opacity:.9; transform:scale(1.03);}
}

.tag{
  font-size:15px;
  color:var(--soft);
  margin-bottom:18px;
}

.modePicker,
.personalityPicker{
  display:flex;
  gap:10px;
  justify-content:center;
  margin-bottom:14px;
  flex-wrap:wrap;
}

.modeBtn,
.personalityBtn,
.startBtn,
.hudBtn,
.splashLink,
.modalClose{
  appearance:none;
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
  color:#eef5fb;
  border-radius:999px;
  padding:12px 18px;
  font-size:15px;
  font-weight:700;
  cursor:pointer;
  transition:
    transform .14s ease,
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    opacity .18s ease;
}

.modeBtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}

.modeEmoji{
  font-size:18px;
  line-height:1;
}

.modeBtn:hover,
.personalityBtn:hover,
.startBtn:hover,
.hudBtn:hover,
.modalClose:hover{
  border-color:rgba(255,255,255,.18);
  background:rgba(255,255,255,.09);
}

.modeBtn:active,
.personalityBtn:active,
.startBtn:active,
.hudBtn:active,
.modalClose:active,
.splashLink:active{
  transform:translateY(1px) scale(.985);
}

.modeBtn.isActive,
.personalityBtn.isActive{
  background:rgba(159,227,194,.16);
  border-color:rgba(159,227,194,.34);
  color:#f2fff8;
  box-shadow:0 0 0 1px rgba(159,227,194,.08) inset;
}

.startBtn{
  width:100%;
  padding:15px 18px;
  font-size:18px;
  background:
    linear-gradient(180deg, rgba(157,217,255,.20), rgba(157,217,255,.08));
  border-color:rgba(157,217,255,.26);
  box-shadow:
    0 8px 22px rgba(0,0,0,.18),
    inset 0 1px 0 rgba(255,255,255,.10);
  margin-bottom:12px;
}
.startBtn:hover{
  box-shadow:
    0 10px 26px rgba(0,0,0,.24),
    inset 0 1px 0 rgba(255,255,255,.12);
}

.tinyNote{
  font-size:12px;
  line-height:1.45;
  color:rgba(230,238,247,.52);
  margin-bottom:12px;
}

.splashLinks{
  display:flex;
  justify-content:center;
  gap:14px;
  flex-wrap:wrap;
  margin-top:6px;
}

.splashLink{
  background:transparent;
  border:none;
  padding:2px 4px;
  border-radius:0;
  color:rgba(230,238,247,.72);
  font-size:12px;
  font-weight:700;
  letter-spacing:.04em;
}
.splashLink:hover{
  color:rgba(255,255,255,.92);
  text-decoration:underline;
}

/* HUD */
.hud{
  position:absolute;
  top:0;
  left:0;
  right:0;
  z-index:10;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:calc(env(safe-area-inset-top, 0px) + 10px) 10px 10px;
  pointer-events:none;
}
.hudLeft,.hudCenter,.hudRight{
  display:flex;
  align-items:center;
  gap:8px;
}
.hudCenter{
  min-width:120px;
  justify-content:center;
  padding:10px 14px;
  background:rgba(16,24,35,.55);
  border:1px solid var(--border);
  border-radius:999px;
  color:var(--soft);
  font-size:13px;
  pointer-events:none;
  backdrop-filter:blur(10px);
}

.hudBtn{
  padding:10px 14px;
  font-size:13px;
  pointer-events:auto;
  background:rgba(16,24,35,.72);
  backdrop-filter:blur(10px);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
}

.iconBtn{
  width:42px;
  min-width:42px;
  height:42px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.iconGlyph{
  font-size:20px;
  line-height:1;
}

.modeHudBtn{
  display:inline-flex;
  align-items:center;
  gap:8px;
}

.hudLabel{
  font-size:13px;
  font-weight:700;
}

.soundBtn{
  font-size:0;
}

/* CANVAS */
.canvasWrap{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:
    calc(env(safe-area-inset-top, 0px) + 56px)
    10px
    calc(env(safe-area-inset-bottom, 0px) + 10px)
    10px;
}

#gameCanvas{
  display:block;
  width:min(97vw, 1200px);
  height:min(82vh, 900px);
  border-radius:22px;
  background:
    radial-gradient(circle at 50% 40%, rgba(255,255,255,.025), transparent 50%),
    linear-gradient(180deg, var(--bg2), #0a1119);
  box-shadow:
    0 12px 50px rgba(0,0,0,.45),
    inset 0 0 0 1px rgba(255,255,255,.05),
    inset 0 12px 20px rgba(255,255,255,.015);
}

/* MODALS */
.modal{
  position:absolute;
  inset:0;
  z-index:40;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(4,8,13,.72);
  backdrop-filter:blur(8px);
}
.modal.hidden{
  display:none;
}
.modalCard{
  position:relative;
  width:min(92vw, 560px);
  max-height:80vh;
  overflow:auto;
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)),
    rgba(17,25,36,.95);
  border:1px solid rgba(255,255,255,.10);
  border-radius:22px;
  box-shadow:
    0 18px 44px rgba(0,0,0,.45),
    inset 0 1px 0 rgba(255,255,255,.06);
  padding:22px 18px 18px;
}
.modalTitle{
  font-size:20px;
  font-weight:900;
  letter-spacing:.08em;
  margin-bottom:14px;
}
.modalBody{
  color:rgba(230,238,247,.82);
  font-size:14px;
  line-height:1.6;
}
.modalBody p:first-child{
  margin-top:0;
}
.modalBody p:last-child{
  margin-bottom:0;
}
.modalClose{
  position:absolute;
  top:10px;
  right:10px;
  width:38px;
  height:38px;
  padding:0;
  font-size:20px;
  line-height:36px;
  border-radius:999px;
}

/* RESPONSIVE */
@media (max-width: 720px){
  .brandWrap{padding:24px 18px 18px;}
  .hudCenter{display:none;}
  .modeHudBtn .hudLabel{display:none;}
  #gameCanvas{
    width:97vw;
    height:80vh;
    border-radius:18px;
  }
}

@media (orientation: portrait){
  #gameCanvas{
    width:min(97vw, 900px);
    height:min(76vh, 1200px);
  }
}

@media (orientation: landscape){
  #gameCanvas{
    width:min(97vw, 1400px);
    height:min(82vh, 900px);
  }
}

/* TOY CHEST BUTTON */
.toyChestBtn{
  position:absolute;
  left:14px;
  bottom:calc(env(safe-area-inset-bottom, 0px) + 14px);
  z-index:14;
  width:54px;
  height:54px;
  border:none;
  border-radius:999px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:
    linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.04)),
    rgba(18,28,42,.80);
  box-shadow:
    0 12px 28px rgba(0,0,0,.30),
    inset 0 1px 0 rgba(255,255,255,.08),
    0 0 18px rgba(255,215,107,.08);
  border:1px solid rgba(255,215,107,.16);
  backdrop-filter:blur(10px);
  transition:
    transform .14s ease,
    box-shadow .18s ease,
    border-color .18s ease,
    background .18s ease;
}

.toyChestBtn:hover{
  border-color:rgba(255,215,107,.34);
  box-shadow:
    0 14px 30px rgba(0,0,0,.34),
    inset 0 1px 0 rgba(255,255,255,.10),
    0 0 24px rgba(255,215,107,.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.05)),
    rgba(22,34,50,.88);
}

.toyChestBtn:active{
  transform:translateY(1px) scale(.985);
}

.toyChestGlyph{
  font-size:24px;
  line-height:1;
  filter:drop-shadow(0 0 8px rgba(255,215,107,.10));
}

/* TOY CHEST MODAL */
.toyChestModalCard{
  width:min(94vw, 720px);
}

.toyChestIntro{
  margin-bottom:14px;
  color:rgba(230,238,247,.68);
  font-size:13px;
}

.skinGrid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
  gap:12px;
}

.skinCard{
  border:1px solid rgba(255,255,255,.10);
  border-radius:18px;
  padding:12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02)),
    rgba(255,255,255,.02);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}

.skinCard.isLocked{
  opacity:.72;
}

.skinCard.isSelected{
  border-color:rgba(159,227,194,.34);
  box-shadow:
    0 0 0 1px rgba(159,227,194,.10) inset,
    0 0 16px rgba(159,227,194,.06);
}

.skinName{
  font-size:14px;
  font-weight:800;
  margin-bottom:8px;
  letter-spacing:.02em;
}

.skinSwatches{
  display:flex;
  gap:6px;
  margin-bottom:10px;
}

.skinSwatch{
  width:18px;
  height:18px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
}

.skinFlavor{
  font-size:12px;
  color:rgba(230,238,247,.70);
  margin-bottom:8px;
  min-height:30px;
}

.skinMeta{
  font-size:11px;
  color:rgba(230,238,247,.52);
  margin-bottom:10px;
  line-height:1.45;
}

.skinBtn{
  width:100%;
  appearance:none;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.06);
  color:#eef5fb;
  border-radius:999px;
  padding:10px 12px;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  transition:
    transform .14s ease,
    background .18s ease,
    border-color .18s ease;
}

.skinBtn:hover{
  background:rgba(255,255,255,.09);
  border-color:rgba(255,255,255,.18);
}

.skinBtn:active{
  transform:translateY(1px) scale(.985);
}

.skinBtn.isSelected{
  background:rgba(159,227,194,.16);
  border-color:rgba(159,227,194,.34);
  color:#f2fff8;
}

.skinBtn.isLocked{
  cursor:default;
  background:rgba(255,255,255,.03);
  color:rgba(230,238,247,.54);
}

/* small mobile adjustment */
@media (max-width: 720px){
  .toyChestBtn{
    width:50px;
    height:50px;
    left:12px;
    bottom:calc(env(safe-area-inset-bottom, 0px) + 12px);
  }

  .toyChestGlyph{
    font-size:22px;
  }
}