:root{
  --bg:#050301;
  --panel:rgba(0,0,0,.44);
  --panel2:rgba(0,0,0,.36);
  --border:rgba(255,170,60,.22);
  --orange:#ffb25a;
  --amber:#ff8f2b;
}

/* Keep the footer pinned to the bottom on short pages. */
html, body { height:100%; }
body{
  margin:0;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  background:var(--bg);
  color:var(--orange);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  overflow-x:hidden;
}
main.page{ flex:1 0 auto; }
footer.footer{ flex:0 0 auto; }

#shader{ position:fixed; inset:0; z-index:-3; width:100%; height:100%; background:#000; }
.crt-overlay{
  position:fixed;inset:0;z-index:-2;pointer-events:none;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0) 0%, rgba(0,0,0,0.38) 55%, rgba(0,0,0,0.82) 100%);
  mix-blend-mode: overlay;
}

.container{ max-width:920px; margin:auto; padding:20px; }

h1{
  text-align:center;
  margin:10px 0 16px;
  letter-spacing:2px;
  color:var(--amber);
  text-shadow: 0 0 10px rgba(255,140,40,.35), 0 0 30px rgba(255,120,20,.12);
}

.stack{
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
  box-shadow: 0 0 0 1px rgba(0,0,0,.75) inset, 0 16px 46px rgba(0,0,0,.55);
  background:rgba(0,0,0,.25);
}

.card{
  margin:0;
  padding:14px 16px;
  background:var(--panel);
  border-top:0;
}
.card.alt{ background:var(--panel2); }
.listen-card{
  border:0;
  background:transparent;
  box-shadow:none;
  margin-bottom:12px;
}
.card.alt.controls-panel{
  border:0;
  background:transparent;
  box-shadow:none;
  margin-top:12px;
}
.playlist-panel{
  margin-top:12px;
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
  box-shadow: 0 0 0 1px rgba(0,0,0,.75) inset;
}
.playlist-note{
  margin:0 0 8px;
  color:rgba(255,200,140,.82);
  font-size:13px;
}
.playlist-list{
  margin:0;
  padding:0;
  list-style:none;
  max-height:360px;
  overflow:auto;
  border:0;
  border-radius:0;
  background:rgba(0,0,0,.28);
}
.playlist-list li{
  padding:8px 10px;
  border-top:1px solid rgba(255,170,60,.12);
}
.playlist-list li:first-child{ border-top:0; }
.playlist-list li::before{ content:none; }
.playlist-item{
  display:flex;
  align-items:flex-start;
  gap:10px;
  cursor:grab;
}
.playlist-item.current{
  background:rgba(255,140,40,.20);
  box-shadow: inset 0 0 0 1px rgba(255,170,70,.55), 0 0 18px rgba(255,120,20,.14);
  border-radius:8px;
}
.playlist-item.current .playlist-index{
  color:rgba(255,230,190,.92);
  font-weight:700;
}
.playlist-item.current .li-title{
  color:rgba(255,210,145,.98);
}
.playlist-item.dragging{
  opacity:.5;
  cursor:grabbing;
}
.playlist-item.drop-before{
  box-shadow: inset 0 2px 0 rgba(255,170,70,.8);
}
.playlist-item.drop-after{
  box-shadow: inset 0 -2px 0 rgba(255,170,70,.8);
}
.playlist-main{
  min-width:0;
  flex:1;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
}
.playlist-meta{
  display:flex;
  align-items:center;
  gap:8px;
  width:100%;
  margin-top:2px;
}
.playlist-index{
  flex:0 0 3ch;
  text-align:right;
  color:rgba(255,200,140,.72);
  font-size:12px;
}
.playlist-path{
  display:block;
  min-width:0;
  flex:1;
  color:rgba(255,195,130,.62);
  font-size:12px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.playlist-actions{
  margin-left:auto;
  display:flex;
  gap:6px;
}
.playlist-btn{
  min-width:34px;
  padding:6px 8px;
}
.playlist-btn.danger{
  border-color:rgba(255,120,90,.25);
}
.playlist-empty{
  color:rgba(255,200,140,.72);
  font-size:13px;
}
.search-panel{
  margin-top:12px;
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
  box-shadow: 0 0 0 1px rgba(0,0,0,.75) inset;
}
.search-note{
  margin:0 0 8px;
  color:rgba(255,200,140,.82);
  font-size:13px;
}
.search-form{
  display:flex;
  gap:8px;
  align-items:center;
}
.search-form .input{
  flex:1;
}
.search-results{
  margin:10px 0 0;
  padding:0;
  list-style:none;
  max-height:320px;
  overflow:auto;
  border:0;
  border-radius:0;
  background:rgba(0,0,0,.28);
}
.search-results li{
  padding:8px 10px;
  border-top:1px solid rgba(255,170,60,.12);
}
.search-results li:first-child{ border-top:0; }
.search-results li::before{ content:none; }
.search-item{
  display:flex;
  align-items:flex-start;
  gap:10px;
}
.search-main{
  min-width:0;
  flex:1;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  cursor:pointer;
}
.search-name{
  color:rgba(255,210,160,.9);
}
.search-type{
  font-size:11px;
  letter-spacing:.5px;
  text-transform:uppercase;
  color:rgba(255,170,95,.86);
  border:1px solid rgba(255,170,60,.25);
  border-radius:999px;
  padding:1px 7px;
}
.search-path{
  width:100%;
  color:rgba(255,195,130,.62);
  font-size:12px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.search-tagline{
  width:100%;
  color:rgba(255,212,158,.82);
  font-size:12px;
}
.search-actions{
  margin-left:auto;
  display:flex;
  gap:6px;
}
.search-btn{
  min-width:72px;
}
.search-empty{
  color:rgba(255,200,140,.72);
  font-size:13px;
}
.db-panel{
  margin-top:12px;
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
  box-shadow: 0 0 0 1px rgba(0,0,0,.75) inset;
}
.db-tree{
  max-height:360px;
  overflow:auto;
  padding:2px 0;
  border:0;
  background:rgba(0,0,0,.28);
}
.db-tree-list{
  margin:0;
  padding-left:14px;
  list-style:none;
}
.db-tree-list.root{ padding-left:2px; }
.db-tree-list li{
  padding:6px 8px;
  line-height:1.35;
}
.db-tree-list li::before{ content:none; }
.db-tree-list details{ margin:2px 0; }
.db-tree-list summary{
  cursor:pointer;
  user-select:none;
  color:rgba(255,200,140,.86);
  display:flex;
  align-items:center;
  gap:8px;
}
.db-tree-list summary:hover{ color:var(--orange); }
.db-tree-file{
  display:flex;
  align-items:center;
  gap:8px;
}
.db-tree-label{
  min-width:0;
  flex:1;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.db-tree-actions{
  margin-left:auto;
  display:flex;
  gap:6px;
}
.db-add-btn{
  padding:4px 8px;
}
.db-tree-note{
  margin:4px 0 0;
  color:rgba(255,180,100,.84);
  font-size:13px;
}
.stored-panel{
  margin-top:12px;
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
  box-shadow: 0 0 0 1px rgba(0,0,0,.75) inset;
}
.stored-list{
  margin:0;
  padding:0;
  list-style:none;
  max-height:320px;
  overflow:auto;
  border:0;
  background:rgba(0,0,0,.28);
}
.stored-list li{
  padding:8px 10px;
  border-top:1px solid rgba(255,170,60,.12);
}
.stored-list li:first-child{ border-top:0; }
.stored-list li::before{ content:none; }
.stored-item{
  display:flex;
  align-items:center;
  gap:10px;
}
.stored-name{
  min-width:0;
  flex:1;
  color:rgba(255,210,160,.86);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.stored-actions{
  margin-left:auto;
  display:flex;
  gap:6px;
}
.stored-btn{
  min-width:72px;
}
.stored-note{
  margin:4px 0 0;
  color:rgba(255,180,100,.84);
  font-size:13px;
}
.section-collapse > summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
}
.section-collapse > summary::-webkit-details-marker{ display:none; }
.section-collapse > summary h2{ margin:0; }
#collapsedCurrentSong{
  display:none;
  margin:0;
  min-width:0;
  max-width:calc(100% - 28px);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.collapsed-track-hash{
  color:rgba(255,180,90,.70);
  margin-right:2px;
}
#tracksCollapse:not([open]) > summary #collapsedCurrentSong{
  display:block;
}
.section-collapse > summary::after{
  content:"+";
  margin-left:auto;
  color:rgba(255,200,140,.82);
  font-weight:900;
}
.section-collapse[open] > summary{
  margin-bottom:10px;
}
.section-collapse[open] > summary::after{
  content:"−";
}

h2{
  margin:0 0 10px;
  font-size:16px;
  letter-spacing:1px;
  color:var(--orange);
  text-shadow: 0 0 8px rgba(255,140,40,.25);
  text-transform: lowercase;
}

.dur{
  color:rgba(255,210,160,.78);
  font-size:12px;
  padding-left:6px;
  opacity:.85;
}

.btnrow{ display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; align-items:center; }
.grow{ flex:1; min-width:18px; }

button, .btn{
  padding:10px 12px;
  border:1px solid rgba(255,180,90,.22);
  border-radius:8px;
  background:rgba(18,8,2,.65);
  color:var(--amber);
  font-weight:900;
  cursor:pointer;
  box-shadow: 0 0 14px rgba(255,130,30,.10);
  text-decoration:none;
  display:inline-block;
  user-select:none;
}
button:hover, .btn:hover{ box-shadow: 0 0 18px rgba(255,140,40,.16); }
button:active, .btn:active{ transform:translateY(1px); }

button.small, .btn.small{ padding:8px 10px; font-weight:800; }
button.on, .btn.on{
  border-color: rgba(255,180,90,.45);
  box-shadow: 0 0 18px rgba(255,140,40,.18);
}

#progCircleWrap{
  margin-top:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
}
#progCircleShell{
  position:relative;
  width:160px;
  height:160px;
  display:flex;
  align-items:center;
  justify-content:center;
}
#progCircle{
  position:absolute;
  inset:0;
  width:160px;
  height:160px;
  cursor:pointer;
  filter: drop-shadow(0 0 16px rgba(255,130,30,.16));
  pointer-events:none;
}
.prog-circle-track{
  fill:none;
  stroke:rgba(255,255,255,.12);
  stroke-width:10;
}
.prog-circle-bar{
  fill:none;
  stroke:url(#circleRingGradient);
  stroke-width:10;
  stroke-linecap:round;
  transform:rotate(-90deg);
  transform-origin:50% 50%;
  transition:stroke-dashoffset .08s linear;
}
#circleSeekText{
  font-size:12px;
  color:rgba(255,210,160,.90);
  border:1px solid rgba(255,170,60,.22);
  border-radius:999px;
  padding:4px 8px;
  background:rgba(0,0,0,.45);
  line-height:1;
  pointer-events:none;
}
.current-cover-wrap{
  margin-top:16px;
  display:flex;
  justify-content:center;
}
.current-cover-link{
  position:relative;
  z-index:2;
  display:inline-flex;
  text-decoration:none;
}
.current-cover-img{
  width:104px;
  height:104px;
  object-fit:cover;
  border:1px solid rgba(255,170,60,.22);
  border-radius:50%;
  background:rgba(0,0,0,.32);
  display:none;
  transform-origin:center center;
}
.current-cover-img.is-playing{
  animation:cover-spin-cw 4s linear infinite;
}
@keyframes cover-spin-cw{
  from{ transform:rotate(0deg); }
  to{ transform:rotate(360deg); }
}
.volwrap{ display:flex; align-items:center; gap:8px; margin:0; }
.vollabel{
  font-size:12px;
  color:rgba(255,210,160,.78);
  letter-spacing:1px;
  user-select:none;
}
#vol{
  height:12px;
  width:180px;
  background:rgba(255,255,255,.08);
  border-radius:999px;
  cursor:pointer;
  overflow:hidden;
  box-shadow: 0 0 12px rgba(255,140,40,.14) inset;
}
#volbar{
  height:12px;
  width:80%;
  border-radius:999px;
  background:linear-gradient(90deg, rgba(255,170,70,.95), rgba(255,120,25,.95));
  box-shadow: 0 0 16px rgba(255,140,40,.18);
}

/* Replace default list bullets with the site's hashtag marker. */
ul{ margin:0; padding-left:0; list-style:none; }
li{
  line-height:1.45;
  position:relative;
  padding-left:18px;
}
li::before{
  content:"#";
  position:absolute;
  left:0;
  top:0;
  color:rgba(255,180,90,.70);
}
.li-artist{ color:rgba(255,210,160,.80); }
.li-title{ color:rgba(255,150,60,.92); }
.li-album{ color:rgba(255,190,120,.82); }
a.discogs-link{
  text-decoration:none;
}
a.discogs-link.disabled-link{
  pointer-events:none;
}

.statusline{
  margin-top: 1.25em;
  font-size:12px;
  color:rgba(255,210,160,.78);
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:baseline;
  justify-content:center;
  text-align:center;
}
.pill{
  display:inline-block;
  padding:2px 8px;
  border:1px solid rgba(255,170,60,.22);
  border-radius:999px;
  background:rgba(0,0,0,.25);
}

/* Footer layout keeps utility actions aligned left/center/right. */
footer.footer{
  max-width:920px;
  width:100%;
  margin: 0 auto;
  padding: 0 20px 20px;
}
.footerbar{
  margin-top:16px;
  padding-top:14px;
  display:flex;
  align-items:center;
  gap:10px;
}
.footerbar .left{ flex:1; display:flex; justify-content:flex-start; }
.footerbar .mid{ flex:1; display:flex; justify-content:center; }
.footerbar .right{ flex:1; display:flex; justify-content:flex-end; }

.modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.65);
  display:none;
  z-index:60;
  align-items:center;
  justify-content:center;
  padding:18px;
}
.modal:target{ display:flex; }
.modalbox{
  width:min(520px, 100%);
  border:1px solid rgba(255,170,60,.22);
  border-radius:12px;
  overflow:hidden;
  background:rgba(0,0,0,.35);
  box-shadow: 0 16px 46px rgba(0,0,0,.55);
}
.modalbox .card{ border-top:0; }
.modalclose{
  float:right;
  text-decoration:none;
  color:rgba(255,180,90,.65);
  font-weight:900;
}
.modalclose:hover{ color:var(--orange); }

.input{
  width:100%;
  box-sizing:border-box;
  padding:10px 12px;
  border:1px solid rgba(255,180,90,.22);
  border-radius:8px;
  background:rgba(18,8,2,.45);
  color:var(--orange);
  outline:none;
}
.err{ margin-top:10px; color:#ffb25a; opacity:.9; font-size:12px; }

.helptext{
  font-size:13px;
  line-height:1.55;
  color:rgba(255,210,160,.86);
}
.helptext p{ margin:10px 0; }
.helptext code{
  color:var(--orange);
  background:rgba(0,0,0,.28);
  padding:1px 6px;
  border-radius:6px;
  border:1px solid rgba(255,170,60,.18);
}

.no-margin{ margin:0; }
.sep{ opacity:.55; }
.btnrow.mt-2{ margin-top:2px; }
.mt-10{ margin-top:10px; }
.btnrow.mt-10{ margin-top:10px; }
.authed-only{ display:none; }
body.authed .authed-only{ display:inline-block; }
.auth-only-block{ display:none; }
body.authed .auth-only-block{ display:block; }
