/* css/style.css — 2000s-era UI for the skatepark app */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; }
body {
  font-family: "Trebuchet MS", Verdana, Arial, sans-serif;
  background: #20242a;
  color: #eee;
  user-select: none;
}
#app { position: fixed; inset: 0; }
#app canvas { display: block; }

/* ---------- top bar ---------- */
#topbar {
  position: fixed; top: 0; left: 0; right: 0; height: 64px;
  display: flex; align-items: center; gap: 14px; padding: 0 14px;
  background: linear-gradient(#4a5563 0%, #333c48 48%, #262e38 52%, #2e3742 100%);
  border-bottom: 1px solid #11151b;
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
  z-index: 10;
}
#brand {
  font-size: 15px; font-weight: bold; letter-spacing: .5px;
  color: #dfe8f2; text-shadow: 0 -1px 0 #000;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#modes { display: flex; gap: 6px; margin-left: 8px; }
.mode-btn {
  font-family: inherit; font-size: 13px; font-weight: bold;
  padding: 6px 16px; cursor: pointer;
  color: #cfd8e2;
  background: linear-gradient(#5a6675, #39424e 49%, #2f3742 51%, #3a4450);
  border: 1px solid #1a2028; border-radius: 4px;
  text-shadow: 0 -1px 0 #000;
}
.mode-btn:hover { background: linear-gradient(#6a7889, #434e5c 49%, #38424f 51%, #45515f); }
.mode-btn.active {
  color: #eaffe9;
  background: linear-gradient(#59b259, #2e7d32 49%, #256b2a 51%, #33803a);
  border-color: #14351a;
}

/* ---------- iPod widget (docked bottom-right) ---------- */
#ipod { position: fixed; right: 14px; bottom: 14px; z-index: 11; }
.ipod-vol { display: flex; align-items: center; gap: 6px; margin: 0 2px 10px; }
.ipod-vol-slider {
  flex: 1; height: 4px; -webkit-appearance: none; appearance: none;
  background: #8b968c; border-radius: 2px; outline: none; cursor: pointer;
}
.ipod-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 12px; height: 12px; border-radius: 50%;
  background: #3d7a44; border: 1px solid #244d2a; cursor: pointer;
}
.ipod-vol-slider::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%;
  background: #3d7a44; border: 1px solid #244d2a; cursor: pointer;
}
.ipod-body {
  width: 172px; padding: 10px 10px 14px;
  background: linear-gradient(#f4f6f8, #c9ced4 60%, #aeb4bc);
  border: 1px solid #6d747d; border-radius: 10px;
  box-shadow: inset 0 1px 0 #fff, 0 3px 8px rgba(0,0,0,.45);
}
.ipod-screen {
  background: #dfe9e0;
  border: 2px solid #7a828c; border-radius: 3px;
  box-shadow: inset 0 0 4px rgba(0,0,0,.35);
  padding: 5px 7px; margin-bottom: 12px;
  font-family: "Courier New", monospace;
}
.ipod-title { font-size: 12px; font-weight: bold; color: #1c2820; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ipod-meta { font-size: 10px; color: #46544a; margin-bottom: 4px; white-space: nowrap; overflow: hidden; }
.ipod-barwrap { height: 6px; background: #b9c4ba; border: 1px solid #8b968c; border-radius: 3px; overflow: hidden; }
.ipod-bar { height: 100%; width: 0%; background: #3d7a44; }
.ipod-time { font-size: 10px; color: #46544a; margin-top: 3px; }
.ipod-wheel {
  position: relative; width: 118px; height: 118px; margin: 0 auto;
  background: radial-gradient(circle at 32% 28%, #ffffff, #d6dade 55%, #aab0b8);
  border: 1px solid #79808a; border-radius: 50%;
  box-shadow: inset 0 1px 1px #fff, 0 2px 5px rgba(0,0,0,.35);
}
.ipod-btn { position: absolute; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #333c46; }
.ipod-btn:hover { filter: brightness(.92); }
.ipod-btn:active { transform: scale(.96); }
.ipod-menu { top: 8px; left: 8px; width: 34px; height: 34px; font-size: 13px; font-weight: bold; border-radius: 50%; }
.ipod-menu::before { content: "\1F5C2"; }
.ipod-back { bottom: 8px; left: 10px; width: 34px; height: 34px; font-size: 11px; font-weight: bold; }
.ipod-back::before { content: "Back"; }
.ipod-prev { top: 50%; left: 4px; transform: translateY(-50%); width: 30px; height: 40px; font-size: 13px; }
.ipod-next { top: 50%; right: 4px; transform: translateY(-50%); width: 30px; height: 40px; font-size: 13px; }
.ipod-play { top: 50%; left: 50%; transform: translate(-50%, -50%); width: 42px; height: 42px; font-size: 16px; }
.ipod-prev:active, .ipod-next:active { transform: translateY(-50%) scale(.96); }
.ipod-play:active { transform: translate(-50%, -50%) scale(.96); }

/* ---------- build palette ---------- */
#palette {
  position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%);
  display: flex; gap: 5px; padding: 8px;
  background: linear-gradient(#3c4652, #2a323c);
  border: 1px solid #161b22; border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0,0,0,.5);
  z-index: 9;
}
body[data-mode="skate"] #palette { display: none; }
.pal-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-width: 58px; padding: 6px 6px; cursor: pointer;
  font-family: inherit; font-size: 11px; color: #cfd8e2;
  background: linear-gradient(#4c5866, #333d49);
  border: 1px solid #1c232c; border-radius: 5px;
  text-shadow: 0 -1px 0 #000;
}
.pal-btn:hover { background: linear-gradient(#5c6a7a, #3e4a58); }
.pal-btn.sel {
  background: linear-gradient(#59b259, #2e7d32 55%, #256b2a);
  border-color: #14351a; color: #eaffe9;
}
.pal-swatch { width: 100%; height: 14px; border-radius: 2px; border: 1px solid rgba(0,0,0,.5); }

/* ---------- skate HUD ---------- */
#skate-hud { display: none; }
body[data-mode="skate"] #skate-hud { display: block; }
#hud-box {
  position: fixed; top: 76px; left: 14px; z-index: 9;
  padding: 10px 14px; min-width: 150px;
  background: rgba(38, 46, 56, .85);
  border: 1px solid #161b22; border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0,0,0,.5);
}
#score { font-size: 22px; font-weight: bold; color: #ffd75e; text-shadow: 0 1px 2px #000; }
#combo { font-size: 14px; font-weight: bold; color: #7ec8ff; min-height: 16px; }
#speed { font-size: 12px; color: #aab4c0; }
#help {
  position: fixed; left: 14px; bottom: 12px; z-index: 9;
  padding: 8px 12px; font-size: 11px; line-height: 1.7; color: #b8c2ce;
  background: rgba(30, 36, 44, .8);
  border: 1px solid #161b22; border-radius: 8px;
  text-align: left;
}
#help .help-h { font-weight: bold; font-size: 10px; letter-spacing: 1px; color: #7ec8ff; margin-bottom: 2px; }
#build-hint {
  position: fixed; left: 14px; bottom: 12px; z-index: 9;
  padding: 6px 12px; font-size: 11px; color: #b8c2ce;
  background: rgba(30, 36, 44, .8);
  border: 1px solid #161b22; border-radius: 8px;
}
body[data-mode="skate"] #build-hint { display: none; }
.k { font-size: 9px; opacity: .7; margin-left: 3px; }
#trick-pop {
  position: fixed; top: 32%; left: 50%; transform: translate(-50%, -50%);
  font-size: 40px; font-weight: bold; color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.8), 0 0 24px rgba(126,200,255,.6);
  opacity: 0; pointer-events: none; z-index: 12; white-space: nowrap;
}
#trick-pop.show { animation: trickpop 1.3s ease-out forwards; }
@keyframes trickpop {
  0% { opacity: 0; transform: translate(-50%, -40%) scale(.5); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
  30% { transform: translate(-50%, -50%) scale(1); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -72%) scale(1); }
}
#slowmo {
  display: none; position: fixed; top: 76px; right: 14px; z-index: 9;
  padding: 5px 12px; font-size: 13px; font-weight: bold; letter-spacing: 2px;
  color: #0b1620; background: linear-gradient(#9fd8ff, #58a8e0);
  border-radius: 4px; box-shadow: 0 0 14px rgba(120, 200, 255, .8);
}
#slowmo.show { display: block; }
#bail-msg {
  position: fixed; top: 52%; left: 50%; transform: translate(-50%, -50%);
  font-size: 30px; font-weight: bold; color: #ff6b5e;
  text-shadow: 0 2px 8px rgba(0,0,0,.8);
  opacity: 0; pointer-events: none; z-index: 12;
}
#bail-msg.show { opacity: 1; }

/* ---------- loading ---------- */
#loading {
  position: fixed; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  background: #20242a;
  font-size: 18px; color: #8fa0b2;
  transition: opacity .4s;
}
.load-inner { padding: 18px 30px; background: rgba(40,48,58,.9); border: 1px solid #161b22; border-radius: 8px; }
