:root{
  --bg:#000000;
  --white:#f5f5f5;
  --gray:#777777;

  --red:#ff4d4d;
  --green:#5dff87;
  --blue:#4d79ff;
  --cyan:#57f7ff;
  --yellow:#ffe066;
  --magenta:#ff5cff;
  --orange:#ff9f43;
  --purple:#b26bff;

  --fg:#d7ffd9;
  --muted:#7fb98d;
  --mono:"Space Mono", monospace;
}

*{
  box-sizing:border-box;
}

html,
body{
  margin:0;
  min-height:100%;
  background:var(--bg);
  color:var(--fg);
  font-family:var(--mono);
}

body{
  overflow:auto;
  image-rendering:pixelated;
  -webkit-font-smoothing:none;
  text-rendering:optimizeSpeed;
  font-size:13px;
}

body,
button,
input,
label,
pre{
  font-family:var(--mono);
}

.app{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:18px 14px;
}

.terminal{
  width:min(980px, 100%);
  display:grid;
  grid-template-rows:auto auto 1fr auto;
  gap:16px;
  align-items:center;
}

.header{
  display:grid;
  justify-items:center;
  gap:8px;
  text-align:center;
}

.title{
  color:var(--green);
  font-size:16px;
  font-weight:700;
  letter-spacing:.18em;
  text-transform:uppercase;
  text-shadow:none;
  margin:0;
}

.subtitle{
  color:var(--muted);
  font-size:11px;
  font-weight:400;
  letter-spacing:.08em;
  max-width:60ch;
}

.status-bar{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:10px 18px;
  color:var(--muted);
  font-size:12px;
  font-weight:400;
}

.status-bar strong{
  color:var(--fg);
  font-weight:700;
}

.main{
  width:100%;
  display:grid;
  grid-template-columns:minmax(0, 1fr) 260px;
  gap:18px;
  align-items:start;
}

.section,
.player,
.playlist-panel{
  min-width:0;
}

.player{
  display:grid;
  justify-items:center;
  gap:10px;
  text-align:center;
}

.section-title,
.panel-title{
  color:var(--cyan);
  text-transform:uppercase;
  letter-spacing:.14em;
  font-size:11px;
  font-weight:700;
}

.track-info{
  display:grid;
  gap:4px;
  justify-items:center;
}

.track-name{
  color:#fff;
  font-size:18px;
  font-weight:700;
  line-height:1.25;
  word-break:break-word;
  margin:0;
}

.meta{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:10px 14px;
  color:var(--muted);
  font-size:11px;
  font-weight:400;
}

.meta span{
  white-space:nowrap;
}

#visualizer{
  width:100%;
  margin:0;
  padding:0;
  min-height:520px;
  display:flex;
  align-items:center;
  justify-content:center;
  white-space:pre;
  line-height:1;
  font-size:14px;
  font-weight:400;
  user-select:none;
  overflow:hidden;
  color:var(--green);
  text-shadow:none;
}

.ascii-progress{
  width:100%;
  display:grid;
  gap:6px;
  justify-items:center;
}

#asciiSeek{
  width:100%;
  margin:0;
  white-space:pre;
  text-align:center;
  color:var(--fg);
  font-size:12px;
  line-height:1;
  overflow:hidden;
  user-select:none;
}

.controls{
  width:100%;
  display:grid;
  gap:10px;
  justify-items:center;
}

.controls-row{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:6px;
}

button,
.file-btn{
  appearance:none;
  font:inherit;
  background:transparent;
  color:var(--fg);
  border:1px solid rgba(255,255,255,.18);
  padding:4px 8px;
  cursor:pointer;
  letter-spacing:.05em;
  text-transform:uppercase;
  font-size:11px;
  line-height:1;
  border-radius:0;
  box-shadow:none;
  transition:none;
}

button:hover,
.file-btn:hover{
  background:transparent;
  color:#fff;
  border-color:var(--green);
}

button.active{
  border-color:var(--green);
  color:#fff;
}

.danger{
  border-color:rgba(255,77,77,.8);
  color:#ffb3b3;
}

.volume-wrap{
  width:100%;
  display:grid;
  gap:6px;
  justify-items:center;
  color:var(--muted);
  font-size:11px;
  letter-spacing:.08em;
}

input[type="range"]{
  width:100%;
  accent-color:var(--green);
}

.file-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.playlist-panel{
  display:grid;
  gap:8px;
  justify-items:stretch;
  align-content:start;
}

.playlist{
  display:grid;
  gap:4px;
  max-height:650px;
  overflow:auto;
  padding-right:2px;
}

.track-btn{
  width:100%;
  text-align:left;
  border:none;
  padding:2px 0;
  background:transparent;
  color:var(--fg);
  cursor:pointer;
  font:inherit;
  line-height:1.2;
}

.track-btn .name{
  color:#fff;
  word-break:break-word;
}

.track-btn .info{
  color:var(--muted);
  font-size:10px;
}

.track-btn.active .name{
  color:var(--green);
}

.track-btn:hover .name{
  color:var(--cyan);
}

.drop{
  color:var(--muted);
  font-size:11px;
  line-height:1.5;
}

.footer{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:10px 18px;
  color:var(--muted);
  font-size:11px;
  text-align:center;
}

.footer strong{
  color:#fff;
}

.file-input{
  display:none;
}

.crt{
  position:fixed;
  inset:0;
  pointer-events:none;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,.03),
      rgba(255,255,255,.03) 1px,
      transparent 1px,
      transparent 3px
    );
  mix-blend-mode:overlay;
}

.active-drop{
  color:var(--green);
}

@media (max-width: 900px){
  .main{
    grid-template-columns:1fr;
  }

  #visualizer{
    min-height:320px;
    font-size:10px;
  }

  .playlist-panel{
    justify-items:center;
  }
}
