@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=IBM+Plex+Mono:wght@400;500;700&display=swap');
:root {
  --bg: #050507;
  --bg-soft: rgba(11, 11, 18, 0.92);
  --panel: rgba(10, 10, 16, 0.82);
  --panel-strong: rgba(19, 19, 30, 0.88);
  --line: rgba(255, 255, 255, 0.28);
  --line-dim: rgba(255, 255, 255, 0.16);
  --text: #f4f4f4;
  --muted: #9e9eab;
  --green: #a8ff8d;
  --cyan: #8ee9ff;
  --blue: #83b0ff;
  --pink: #ffb7cf;
  --orange: #ffcf87;
  --red: #ff9090;
  --accent: var(--cyan);
  --border: var(--line-dim);
  --shadow: 0 0 0 1px rgba(255,255,255,.08), 0 22px 60px rgba(0,0,0,.55);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 12%, rgba(95, 88, 184, 0.12), transparent 26%),
    radial-gradient(circle at 78% 30%, rgba(77, 139, 255, 0.09), transparent 26%),
    radial-gradient(circle at 50% 100%, rgba(255, 99, 146, 0.06), transparent 22%),
    linear-gradient(180deg, #07070b 0%, #040406 100%);
  color: var(--text);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  overflow-x: hidden;
}

button, input, select {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; }

.scanlines,
.noise,
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.scanlines {
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.055) 0px,
    rgba(255, 255, 255, 0.055) 1px,
    rgba(0, 0, 0, 0.18) 3px,
    rgba(0, 0, 0, 0.18) 8px
  );
  opacity: 0.38;
}

.noise {
  background-image:
    radial-gradient(rgba(255,255,255,.08) 0.5px, transparent 0.5px),
    radial-gradient(rgba(255,255,255,.03) 0.5px, transparent 0.5px);
  background-position: 0 0, 8px 8px;
  background-size: 16px 16px;
  mix-blend-mode: soft-light;
  opacity: 0.14;
}

.vignette {
  box-shadow: inset 0 0 160px rgba(0,0,0,.9), inset 0 0 60px rgba(120, 100, 255, .08);
}

.screen-frame {
  position: relative;
  z-index: 1;
  width: min(1460px, calc(100% - 32px));
  margin: 16px auto;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(8,8,12,.82), rgba(5,5,8,.9));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 24px 80px rgba(0,0,0,.55);
}

.panel {
  position: relative;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16, 16, 24, 0.68), rgba(7, 7, 12, 0.84));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.05), transparent 18%, transparent 82%, rgba(255,255,255,.02));
  opacity: 0.7;
}


body { font-size: 13px; }
button { padding: 10px 14px; border: 1px solid rgba(255,255,255,.32); border-radius: 0; background: linear-gradient(180deg, rgba(40,40,48,.5), rgba(17,17,24,.8)); transition: background .14s, border-color .14s; }
button:hover:not(:disabled) { border-color: rgba(180,231,255,.55); background: linear-gradient(180deg, rgba(58,58,70,.58), rgba(23,23,32,.92)); }
button:disabled { opacity: .35; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.primary { color: #f5f7ff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 0 20px rgba(120,160,255,.08); }
button[aria-pressed=true], #bones button.selected { border-color: rgba(169,235,255,.7); background: linear-gradient(180deg, rgba(80,86,100,.66), rgba(28,28,40,.95)); color: var(--cyan); text-shadow: 0 0 10px rgba(142,233,255,.14); }
header { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding: 24px; margin-bottom: 16px; }
header, .panel { border-radius: 14px; }
.brand { margin-right: auto; font-family: 'Press Start 2P', monospace; font-size: clamp(16px,2.1vw,28px); line-height: 1.6; color: #f7f7f7; text-shadow: 0 0 12px rgba(255,255,255,.14); text-decoration: none; }
header button, .project-actions>button, .wide, .rig-button { font-family: 'Press Start 2P', monospace; font-size: 9px; line-height: 1.7; }
main { min-width: 0; }
.project { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 18px 6px 22px; margin-bottom: 16px; border-bottom: 1px solid var(--line-dim); }
.eyebrow { font-family: 'Press Start 2P', monospace; color: var(--muted); font-size: 8px; line-height: 1.8; letter-spacing: .06em; }
h1, h2 { font-family: 'Press Start 2P', monospace; font-weight: 400; }
h1 { font-size: clamp(18px,2vw,26px); line-height: 1.5; margin: 12px 0; }
h2 { font-size: 10px; line-height: 1.7; margin: 0; }
p { color: var(--muted); line-height: 1.7; margin: 7px 0; }
.project p { color: var(--cyan); }
.project-actions { display: flex; align-items: flex-end; gap: 12px; }
label { display: block; font-size: 11px; color: var(--muted); }
input:not([type=range],[type=checkbox],[hidden]), select { display: block; width: 100%; min-width: 0; margin-top: 8px; padding: 10px; border: 1px solid rgba(255,255,255,.32); border-radius: 0; background: linear-gradient(180deg, rgba(40,40,48,.5), rgba(17,17,24,.8)); color: var(--text); }
select { min-width: 220px; max-width: 310px; }
@media (forced-colors: none) {
  #preset {
    appearance: none;
    padding-right: 32px;
    background:
      linear-gradient(45deg, transparent 50%, var(--text) 50%) right 17px center / 5px 5px no-repeat,
      linear-gradient(135deg, var(--text) 50%, transparent 50%) right 12px center / 5px 5px no-repeat,
      linear-gradient(180deg, rgba(40,40,48,.5), rgba(17,17,24,.8));
  }
}
select option { background: #13131e; color: var(--text); }
input[type=range] { width: 100%; accent-color: var(--cyan); margin: 16px 0 9px; }
input[type=checkbox] { accent-color: var(--cyan); }
.workspace { display: grid; grid-template-columns: 218px minmax(0,1fr) 258px; gap: 16px; }
.panel { overflow: hidden; min-width: 0; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 54px; padding: 16px; border-bottom: 1px solid var(--line-dim); }
#bones { height: 315px; overflow: auto; padding: 0 8px; }
#bones button { display: flex; align-items: center; gap: 9px; text-align: left; padding: 8px; border: 1px solid transparent; background: transparent; width: 100%; font-size: 11px; margin: 2px 0; white-space: normal; line-height: 1.5; }
#bones button::before { content: '◇'; color: var(--muted); }
#bones button.selected::before { content: '◆'; color: var(--cyan); }
.rig-button { margin: 12px; width: calc(100% - 24px); padding: 10px 6px; font-size: 8px; }
.hint { font-size: 10px; padding: 0 14px; line-height: 1.7; }
code { font: inherit; color: var(--cyan); overflow-wrap: anywhere; }
.viewport { min-height: 510px; display: flex; flex-direction: column; }
.view-top, .view-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; color: var(--muted); font-size: 9px; }
.view-top { justify-content: flex-end; border-bottom: 1px solid var(--line-dim); letter-spacing: 1px; flex-wrap: wrap; }
.view-top button { font-size: 10px; padding: 6px 9px; }
.view-bottom { margin-top: auto; border-top: 1px solid var(--line-dim); }
.view-bottom span:first-child { color: var(--cyan); }
canvas { display: block; width: 100%; flex: 1; min-height: 380px; touch-action: none; }
.inspector { padding-bottom: 14px; }
.inspector select { min-width: 0; }
.inspector>label, .inspector>.two-fields, .inspector>h3, .inspector>.eyebrow { margin: 15px 16px; }
.two-fields { display: flex; gap: 12px; }
.two-fields>label { flex: 1; min-width: 0; }
.loop-label { display: flex; align-items: center; gap: 4px; font-size: 10px; padding-top: 14px; line-height: 1.7; }
.divider { border-top: 1px solid var(--line-dim); margin: 18px 0; }
.inspector h3 { font-size: 15px; margin-top: 8px; overflow-wrap: anywhere; }
.accent, output { color: var(--cyan); }
output { float: right; }
.wide { width: calc(100% - 32px); margin: 5px 16px; padding: 12px 6px; }
.timeline { margin-top: 16px; }
.transport { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line-dim); }
.transport>div { display: flex; align-items: center; gap: 8px; }
.transport button { padding: 6px 11px; }
.transport .play { display: grid; place-items: center; min-width: 40px; min-height: 34px; color: var(--cyan); }
.play::before { content: ''; box-sizing: content-box; width: 0; height: 0; border-block: 6px solid transparent; border-left: 10px solid currentColor; }
.play.playing::before { width: 4px; height: 12px; border: 0; border-inline: 3px solid currentColor; }
.time-input { display: flex; align-items: center; gap: 10px; }
.time-input input { width: 76px!important; margin: 0!important; padding: 6px!important; }
.timeline-scroll { max-height: 260px; overflow: auto; }
#ruler, .track { display: grid; grid-template-columns: 218px minmax(350px,1fr); min-width: 650px; }
#ruler { height: 32px; color: var(--muted); font-size: 9px; position: sticky; top: 0; background: #13131e; z-index: 2; }
#ruler>span { padding: 10px 16px; letter-spacing: 1.5px; }
#ticks { position: relative; cursor: crosshair; margin-right: 24px; }
#ticks span { position: absolute; top: 9px; transform: translateX(-50%); }
.track { height: 31px; border-top: 1px solid rgba(255,255,255,.08); }
.track.selected { background: rgba(142,233,255,.08); }
.track-label { border: 0; border-right: 1px solid var(--line-dim); background: transparent; text-align: left; font-size: 10px; padding: 6px 16px; }
.track.selected .track-label { color: var(--cyan); }
.track-lane { position: relative; margin-right: 24px; cursor: crosshair; background: repeating-linear-gradient(to right,transparent 0,transparent calc(10% - 1px),rgba(255,255,255,.08) 10%); }
.key { position: absolute; top: 9px; width: 10px; height: 10px; padding: 0; border: 1px solid #c2c2d3; background: #818194; transform: translateX(-50%) rotate(45deg); z-index: 1; cursor: ew-resize; }
.selected .key { background: var(--cyan); border-color: var(--cyan); }
.playhead { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--orange); pointer-events: none; z-index: 1; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-thumb { background: #545465; }
@media(min-width:1500px) { .viewport { min-height: 570px; } #bones { height: 375px; } }
@media(max-width:1180px) { .workspace { grid-template-columns: 180px minmax(0,1fr) 240px; } .project-actions { flex-wrap: wrap; justify-content: flex-end; max-width: 310px; } .view-bottom span:last-child { display: none; } }
@media(max-width:1000px) { .workspace { grid-template-columns: 170px minmax(0,1fr); } .inspector { grid-column: 1/-1; display: grid; grid-template-columns: 1fr 1fr; } .inspector .panel-title, .inspector h3, .inspector>.hint { grid-column: 1/-1; } .inspector .divider, .inspector>.eyebrow { display: none; } header { padding: 18px; } .brand { width: 100%; } }
@media(max-width:780px) { .project { display: block; } .project-actions { justify-content: flex-start; margin-top: 18px; max-width: none; } .workspace { grid-template-columns: 135px minmax(0,1fr); gap: 10px; } .viewport { min-height: 430px; } canvas { min-height: 330px; } .view-top { padding: 10px; font-size: 8px; letter-spacing: 0; } .view-top button { padding: 6px; } #bones { height: 290px; } #bones button { font-size: 9px; padding: 7px 3px; } .rig-button { font-size: 7px; padding: 8px 3px; margin: 8px; width: calc(100% - 16px); } .timeline-scroll { max-height: 240px; } }
@media(max-width:640px) { .screen-frame { width: calc(100% - 12px); margin: 6px auto; padding: 10px; border-radius: 16px; } header { padding: 14px; } .brand { font-size: clamp(12px,3.3vw,20px); } .panel-title { padding: 12px 8px; } h2 { font-size: 9px; } }
@media(max-width:420px) { .project-actions { display: block; } .project-actions select { min-width: 0; max-width: none; } .project-actions>button { margin-top: 12px; } .workspace { grid-template-columns: 105px minmax(0,1fr); } .inspector>label, .inspector>.two-fields { margin: 12px 10px; } .two-fields { gap: 6px; } .wide { width: calc(100% - 20px); margin: 5px 10px; font-size: 8px; } .transport { padding: 10px 8px; } .transport>div { gap: 5px; } .transport button { padding: 6px 8px; } .time-input { gap: 5px; } .time-input input { width: 60px!important; } }
