/* Concrete Jungle - interface chrome. Skate-shop flyer, 2003: hazard tape,
   Impact headlines, stickers stuck on at angles, chunky plastic buttons. */

:root {
  --ink: #16151a;
  --ink-2: #24222b;
  --panel: #2b2830;
  --panel-2: #35313c;
  --line: #4a4550;
  --paper: #ded8cb;
  --yellow: #e8c34a;
  --yellow-2: #f6d96a;
  --red: #c8202e;
  --green: #4fc36a;
  --lcd: #9fe8b4;
  --headline: Impact, Haettenschweiler, "Arial Narrow Bold", "Arial Black", sans-serif;
  --body: "Trebuchet MS", Tahoma, Verdana, sans-serif;
  --mono: "Lucida Console", "DejaVu Sans Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body {
  background: #0d0c10;
  color: var(--paper);
  font-family: var(--body);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}
kbd {
  font-family: var(--mono); font-size: 10px;
  background: #171519; border: 1px solid #5a5460; border-bottom-width: 2px;
  border-radius: 3px; padding: 1px 4px; color: var(--yellow);
}
button { font-family: inherit; }

/* ------------------------------------------------------------------ layout */
.app {
  height: 100%;
  display: grid;
  grid-template-columns: 208px 1fr 252px;
  grid-template-rows: 52px 1fr;
  grid-template-areas: "top top top" "pal stage side";
  background: repeating-linear-gradient(135deg, #131217 0 22px, #17161c 22px 44px);
}
.app.mode-skate { grid-template-columns: 0 1fr 0; }
.app.mode-skate #palette,
.app.mode-skate #sidebar { display: none; }

#palette { grid-area: pal; }
#stage   { grid-area: stage; }
#sidebar { grid-area: side; }

#topbar {
  grid-area: top;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px;
  background: linear-gradient(#2e2a33, #201d26);
  border-bottom: 3px solid var(--ink);
  box-shadow: 0 2px 0 #3d3846, 0 6px 16px rgba(0,0,0,.6);
  position: relative; z-index: 6;
}
#topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 4px;
  background: repeating-linear-gradient(115deg, var(--yellow) 0 14px, #1a181d 14px 28px);
  opacity: .85;
}
.brand { display: flex; flex-direction: column; line-height: 1; }
.brand-main {
  font-family: var(--headline); font-size: 25px; letter-spacing: 1.2px;
  color: var(--paper); text-shadow: 2px 2px 0 var(--red), 4px 4px 0 rgba(0,0,0,.55);
  transform: skewX(-6deg);
}
.brand-sub { font-size: 9px; letter-spacing: 2.4px; color: #8f8a97; margin-top: 3px; }

.topbar-actions { display: flex; gap: 8px; align-items: center; }
.btn {
  border: 2px solid #0f0e12; border-radius: 4px;
  background: linear-gradient(#4a4552, #332f3b);
  color: var(--paper); padding: 7px 12px; cursor: pointer;
  font-size: 11px; letter-spacing: .8px; text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 2px 0 #0f0e12;
}
.btn:hover { background: linear-gradient(#585264, #3c3745); }
.btn:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.1); }
.btn-go {
  font-family: var(--headline); font-size: 17px; letter-spacing: 1.5px; padding: 6px 18px;
  background: linear-gradient(#e0b535, #b98c15); color: #1a1509;
  border-color: #6d5209;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 3px 0 #6d5209;
}
.btn-go:hover { background: linear-gradient(#f2c84a, #c99a1c); }
.btn-go em { font-style: normal; font-size: 12px; }
.btn-back { display: none; }
.app.mode-skate .btn-back { display: inline-block; }
.app.mode-skate #btn-demo,
.app.mode-skate #btn-clear,
.app.mode-skate #btn-share,
.app.mode-skate #btn-dropin { display: none; }

/* ----------------------------------------------------------------- palette */
.palette, .sidebar {
  background: linear-gradient(180deg, #262330, #1d1a24);
  border-right: 3px solid #0f0e12;
  display: flex; flex-direction: column; overflow: hidden;
}
.sidebar { border-right: 0; border-left: 3px solid #0f0e12; }
.panel-head {
  font-family: var(--headline); font-size: 15px; letter-spacing: 1.6px;
  padding: 9px 10px 7px; color: var(--yellow);
  background: repeating-linear-gradient(115deg, rgba(232,195,74,.14) 0 10px, transparent 10px 20px), #201d28;
  border-bottom: 2px solid #0f0e12;
  display: flex; justify-content: space-between; align-items: baseline;
}
.panel-note { font-family: var(--body); font-size: 9px; letter-spacing: 0; color: #8b8595; text-transform: none; }
.palette-list { overflow-y: auto; padding: 7px; display: grid; gap: 6px; }
.palette-list::-webkit-scrollbar { width: 9px; }
.palette-list::-webkit-scrollbar-thumb { background: #4a4550; border-radius: 4px; }

.part {
  display: grid; grid-template-columns: 62px 1fr; gap: 8px; align-items: center;
  padding: 5px 7px; cursor: pointer; text-align: left;
  background: linear-gradient(#332f3c, #272430);
  border: 2px solid #131118; border-radius: 4px; color: var(--paper);
  box-shadow: 0 2px 0 #131118;
}
.part:hover { background: linear-gradient(#3f3a4a, #302c3a); border-color: #6c6478; }
.part.on {
  background: linear-gradient(#5d4f22, #3d3414);
  border-color: var(--yellow); box-shadow: 0 0 0 1px rgba(232,195,74,.35), 0 2px 0 #131118;
}
.part img { width: 62px; height: 45px; display: block; image-rendering: auto; }
.part-name { font-size: 11px; font-weight: bold; letter-spacing: .3px; }
.part-size { font-size: 9px; color: #9a94a6; font-family: var(--mono); }
.palette-foot {
  margin-top: auto; padding: 9px 10px; font-size: 10px; color: #8b8595; line-height: 1.8;
  border-top: 2px solid #0f0e12; background: #1a1821;
}

/* ------------------------------------------------------------------- stage */
.stage { position: relative; overflow: hidden; background: #0b0a0e; }
#view { display: block; width: 100%; height: 100%; }

/* --------------------------------------------------------------- side pane */
.sidebar { padding-bottom: 0; }
.player-dock { padding: 10px 10px 4px; }
.park-stats { padding: 0 0 10px; border-top: 2px solid #0f0e12; margin-top: 6px; }
.stat {
  display: flex; justify-content: space-between; padding: 4px 12px;
  font-size: 11px; color: #a49dae;
}
.stat b { color: var(--paper); font-family: var(--mono); }
.tip {
  margin: 8px 11px 0; padding: 8px 9px; font-size: 11px; line-height: 1.55;
  color: #cfc8bb; background: rgba(232,195,74,.07);
  border-left: 3px solid var(--yellow);
}
.tip b { color: var(--yellow); }

/* ----------------------------------------------------------- player floats */
.player-dock-float {
  position: fixed; right: 14px; bottom: 14px; z-index: 30;
  display: none; filter: drop-shadow(0 10px 22px rgba(0,0,0,.65));
}
.app.mode-skate ~ .player-dock-float { display: block; }

/* --------------------------------------------------------------- discman  */
/* A portable CD player, 2003. Round lid, transparent window, a disc that
   really turns, a green LCD and chunky plastic transport keys. */
.discman { width: 232px; font-family: var(--body); }
.dm-body {
  position: relative; border-radius: 18px 18px 12px 12px;
  background:
    linear-gradient(160deg, #d3d7dc 0%, #9aa0a8 36%, #c2c7ce 58%, #7e848d 100%);
  border: 2px solid #4e535a; padding: 10px 10px 8px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75), 0 5px 14px rgba(0,0,0,.55);
}
.dm-lid {
  position: relative; height: 186px; border-radius: 13px;
  background: linear-gradient(150deg, rgba(48,53,62,.5), rgba(104,112,122,.34) 42%, rgba(28,31,37,.58));
  border: 2px solid #5c626b; overflow: hidden;
  box-shadow: inset 0 0 22px rgba(0,0,0,.55);
}
.dm-hinge {
  position: absolute; top: 5px; left: 50%; transform: translateX(-50%);
  width: 54px; height: 6px; border-radius: 3px;
  background: linear-gradient(#e6eaee, #767c85);
  box-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.dm-window {
  position: absolute; left: 50%; top: 16px; transform: translateX(-50%);
  width: 156px; height: 156px; border-radius: 50%;
  background: radial-gradient(circle at 34% 26%, rgba(255,255,255,.3), rgba(18,20,24,.5) 64%);
  border: 2px solid rgba(255,255,255,.34);
  box-shadow: inset 0 0 14px rgba(0,0,0,.6);
  overflow: hidden;
}
.dm-disc {
  position: absolute; inset: 6px; border-radius: 50%;
  background:
    repeating-conic-gradient(from 0deg,
      rgba(255,255,255,.20) 0deg 5deg, rgba(110,190,255,.16) 5deg 10deg,
      rgba(255,170,110,.18) 10deg 15deg, rgba(160,255,200,.15) 15deg 20deg),
    radial-gradient(circle, #d6dce3 26%, #9aa5b0 60%, #6d7883 100%);
  transform-origin: 50% 50%;
}
.dm-disc-ring { position: absolute; inset: 21%; border-radius: 50%; border: 1px solid rgba(255,255,255,.45); }
.dm-label {
  position: absolute; inset: 24%; border-radius: 50%;
  background: linear-gradient(#ece6d5, #cec6b1);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 9% 0 11%;
  color: #23201c; line-height: 1;
  box-shadow: inset 0 0 8px rgba(0,0,0,.28);
}
.dm-label-line1 {
  font-family: var(--headline); font-size: 15px; letter-spacing: .5px;
  transform: rotate(-6deg);
}
.dm-label-line2 {
  font-family: var(--headline); font-size: 13px; color: var(--red); transform: rotate(-6deg);
}
.dm-hole {
  position: absolute; left: 50%; top: 50%; width: 17px; height: 17px; margin: -8.5px 0 0 -8.5px;
  border-radius: 50%; background: #2c3138;
  box-shadow: inset 0 0 5px #000, 0 0 0 4px rgba(232,236,240,.8);
}
.dm-sheen {
  position: absolute; inset: 0; pointer-events: none; border-radius: 13px;
  background: linear-gradient(118deg, rgba(255,255,255,.30) 0 14%, transparent 32% 68%, rgba(255,255,255,.12) 86% 100%);
}
.dm-brand {
  position: absolute; left: 11px; bottom: 5px;
  font-family: var(--headline); font-size: 13px; letter-spacing: 1.8px; color: #eef2f5;
  text-shadow: 0 1px 1px rgba(0,0,0,.7);
}
.dm-brand span {
  font-family: var(--mono); font-size: 8px; letter-spacing: 0; margin-left: 6px;
  color: #c3cad1; vertical-align: 1px;
}
.dm-esp {
  position: absolute; right: 10px; top: 8px; width: 62px; text-align: right;
  font-family: var(--mono); font-size: 6px; line-height: 1.5; letter-spacing: .2px;
  color: #dde2e7; opacity: .75;
}
.dm-esp sup { font-size: 5px; }
.dm-sticker {
  position: absolute; font-family: var(--headline); font-size: 12px; letter-spacing: .6px;
  padding: 2px 6px; border-radius: 2px; color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.55);
}
.dm-sticker-a { top: 10px; left: 8px; background: var(--red); transform: rotate(-11deg); }
.dm-sticker-b { bottom: 24px; right: 9px; background: #1c6fbf; transform: rotate(8deg); }

.dm-panel { margin-top: 8px; }
.dm-lcd {
  background: linear-gradient(#20362a, #15251b);
  border: 2px solid #3f454b; border-radius: 4px; padding: 4px 7px 6px;
  box-shadow: inset 0 0 12px rgba(0,0,0,.75);
  font-family: var(--mono); color: var(--lcd);
}
.dm-lcd-row { display: flex; justify-content: space-between; font-size: 8.5px; opacity: .85; letter-spacing: .5px; }
.dm-lcd-row b { font-weight: normal; }
.dm-mode { opacity: .55; }
/* the RANDOM lamp of a CD player: the running order really is shuffled */
.dm-rand { opacity: .9; border: 1px solid currentColor; padding: 0 2px; border-radius: 1px; letter-spacing: 0; }
.discman.is-empty .dm-rand { opacity: .2; }
.dm-marquee { overflow: hidden; height: 16px; margin: 3px 0 4px; position: relative; }
.dm-marquee-inner {
  white-space: nowrap; font-size: 12.5px; letter-spacing: .6px;
  text-shadow: 0 0 7px rgba(159,232,180,.55);
}
.dm-marquee-inner.scroll { animation: dm-scroll var(--dur, 9s) linear infinite; }
@keyframes dm-scroll {
  0%   { transform: translateX(0); }
  12%  { transform: translateX(0); }
  88%  { transform: translateX(calc(-100% + 198px)); }
  100% { transform: translateX(calc(-100% + 198px)); }
}
.dm-bar { height: 3px; background: rgba(159,232,180,.16); border-radius: 2px; overflow: hidden; }
.dm-bar i { display: block; height: 100%; width: 0; background: var(--lcd); box-shadow: 0 0 6px var(--lcd); }

.dm-controls { display: flex; align-items: center; gap: 5px; margin-top: 8px; }
.dm-btn {
  flex: 1; height: 25px; border-radius: 4px; cursor: pointer;
  border: 1px solid #5b616a;
  background: linear-gradient(#e8ecf0, #a9afb7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 2px 0 #6b717a;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.dm-btn:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.7); }
.dm-btn svg { width: 20px; height: 13px; fill: #22262b; }
.dm-btn-play { flex: 1.4; }
.dm-vol {
  width: 32px; height: 27px; border-radius: 4px; cursor: ns-resize; position: relative;
  background: repeating-linear-gradient(0deg, #7d838b 0 2px, #b8bec5 2px 4px);
  border: 1px solid #575d65; overflow: hidden;
  box-shadow: inset 0 0 7px rgba(0,0,0,.5);
}
.dm-vol-wheel {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: calc(var(--vol, .65) * 100%);
  background: linear-gradient(#f2cd5c, #b98c15); opacity: .6;
}
.dm-vol-label {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 7px; color: #22262b; letter-spacing: .5px;
  text-shadow: 0 1px 0 rgba(255,255,255,.4);
}
.dm-hint {
  margin-top: 6px; text-align: center; font-family: var(--mono);
  font-size: 8.5px; color: #8b8595; letter-spacing: .4px;
}
.discman.is-empty .dm-disc { opacity: .22; }
.discman.is-empty .dm-label { background: #6d6a63; color: #322f2b; }
.discman.is-empty .dm-label-line1::after { content: ""; }

/* --------------------------------------------------------------------- HUD */
.hud { position: absolute; inset: 0; pointer-events: none; display: none; }
.app.mode-skate .hud { display: block; }
.hud::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 130px;
  background: linear-gradient(rgba(10,9,13,.45), rgba(10,9,13,0));
  pointer-events: none;
}
.hud-top {
  position: absolute; top: 12px; left: 16px; display: flex; gap: 20px; align-items: flex-end;
}
.hud-label { display: block; font-size: 9px; letter-spacing: 2px; color: rgba(255,240,210,.72); }
.hud-value {
  font-family: var(--headline); font-size: 34px; line-height: .92; color: #fff;
  text-shadow: 2px 3px 0 rgba(0,0,0,.55), 0 0 18px rgba(255,200,90,.35);
}
.hud-speed .hud-value { font-size: 24px; color: var(--yellow-2); }
.hud-combo {
  font-family: var(--headline); font-size: 21px; color: var(--yellow);
  opacity: 0; transform: translateY(5px); transition: opacity .18s, transform .18s;
  text-shadow: 2px 2px 0 rgba(0,0,0,.6);
}
.hud-combo.on { opacity: 1; transform: none; }
.hud-combo i { font-style: normal; font-size: 10px; letter-spacing: 1.6px; margin-left: 5px; }
.hud-trick {
  position: absolute; left: 50%; top: 21%; transform: translateX(-50%);
  font-family: var(--headline); font-size: 33px; letter-spacing: 1px; color: #fff;
  text-shadow: 3px 3px 0 var(--red), 5px 5px 0 rgba(0,0,0,.5);
  white-space: nowrap; opacity: 0; transition: opacity .2s;
  max-width: 88vw; overflow: hidden; text-overflow: ellipsis;
}
.hud-state {
  position: absolute; left: 50%; top: 31%; transform: translateX(-50%);
  font-family: var(--headline); font-size: 17px; letter-spacing: 3px;
  color: var(--yellow-2); opacity: 0; transition: opacity .15s;
  text-shadow: 2px 2px 0 rgba(0,0,0,.6);
}
.hud-state.on { opacity: .95; }
.hud-state.bad { color: #ff6a6a; }

.hint {
  position: absolute; left: 16px; bottom: 14px; display: none;
  font-size: 10.5px; line-height: 1.85; color: rgba(240,234,222,.9);
  background: rgba(16,15,20,.62); border-left: 3px solid var(--yellow);
  padding: 8px 12px; backdrop-filter: blur(3px); max-width: 430px;
  pointer-events: none;
}
.app.mode-skate .hint { display: block; }
.hint b { color: var(--yellow-2); }

.replay-badge {
  position: absolute; top: 14px; right: 18px;
  font-family: var(--headline); font-size: 15px; letter-spacing: 2px; color: #ff5a5a;
  text-shadow: 2px 2px 0 rgba(0,0,0,.6);
  animation: blink 1.1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: .25; } }

/* ------------------------------------------------------------------- boot  */
.boot {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 40%, #241f2a, #0b0a0e 70%);
  transition: opacity .45s;
}
.boot.gone { opacity: 0; pointer-events: none; }
.boot-card { text-align: center; }
.boot-logo {
  font-family: var(--headline); font-size: 52px; letter-spacing: 2px; color: var(--paper);
  text-shadow: 3px 3px 0 var(--red), 6px 6px 0 rgba(0,0,0,.6); transform: skewX(-7deg);
}
.boot-logo span { display: block; font-size: 30px; color: var(--yellow); letter-spacing: 7px; }
.boot-sub { margin: 14px 0 12px; font-size: 11px; letter-spacing: 3px; color: #8e8899; }
.boot-bar { width: 260px; height: 7px; background: #211e27; border: 1px solid #443f4d; margin: 0 auto; }
.boot-bar i { display: block; height: 100%; width: 4%; background: var(--yellow); transition: width .25s; }

/* ------------------------------------------------------------------ errors */
.errbar {
  position: fixed; left: 0; right: 0; top: 0; z-index: 200;
  background: #8e1119; color: #fff; font-family: var(--mono); font-size: 12px;
  padding: 9px 14px; border-bottom: 3px solid #ff5a5a; max-height: 42vh; overflow: auto;
  white-space: pre-wrap;
}
