/* Base generated by AI - Claude Sonnet 5 2026*/

/* ==========================================================================
   TOKENS
   ========================================================================== */
:root{
  --bg:          #11151b;
  --bg-elevated: #1a2028;
  --bg-inset:    #0c0f13;
  --bg-hover:    #212834;

  --text:        #ede7da;
  --text-dim:    #8b93a3;
  --text-faint:  #545c6a;

  --accent:      #e8a33d;
  --accent-dim:  #a97a34;
  --accent-soft: rgba(232, 163, 61, 0.14);

  --line:        #242b35;
  --line-soft:   #1c222b;

  --radius-sm: 3px;
  --radius-md: 6px;

  --font-body: 'Manrope', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --transport-h: 120px;
  --sidebar-w: 272px;
}

*{ box-sizing: border-box; }

html, body{
  height: 100%;
  margin: 0;
}

body{
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.mono{ font-family: var(--font-mono); }

::selection{ background: var(--accent-soft); color: var(--text); }

/* focus visibility */
button:focus-visible,
input:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ==========================================================================
   APP SHELL
   ========================================================================== */
.app{
  height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: 1fr var(--transport-h);
  grid-template-areas:
    "library view"
    "transport transport";
}

/* ==========================================================================
   LIBRARY (LEFT SIDEBAR)
   ========================================================================== */
.library{
  grid-area: library;
  background: var(--bg-elevated);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.library__brand{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px;
  color: var(--accent);
}

.brand__mark{ display: flex; }

.brand__name{
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--text);
}

.library__search{
  padding: 0 14px 14px;
}

.library__search input{
  width: 100%;
  background: var(--bg-inset);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  font-family: var(--font-body);
  font-size: 14px;
}

.library__search input::placeholder{ color: var(--text-faint); }

.library__search input:focus{
  border-color: var(--accent-dim);
  outline: none;
}

.library__scroll{
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px 16px;
}

.library__scroll::-webkit-scrollbar,
.view::-webkit-scrollbar{ width: 9px; }
.library__scroll::-webkit-scrollbar-thumb,
.view::-webkit-scrollbar-thumb{
  background: var(--line);
  border-radius: 5px;
}
.library__scroll::-webkit-scrollbar-track,
.view::-webkit-scrollbar-track{ background: transparent; }

/* artist group */
.artist-group{ margin-bottom: 2px; }

.artist-row{
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 9px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  text-align: left;
}

.artist-row:hover{ background: var(--bg-hover); }

.artist-row .chevron{
  color: var(--text-faint);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.artist-group.is-open .artist-row .chevron{ transform: rotate(90deg); }

.album-list{
  display: none;
  padding-left: 20px;
  border-left: 1px solid var(--line-soft);
  margin-left: 13px;
}

.artist-group.is-open .album-list{ display: block; }

.album-row{
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px;
  text-align: left;
}

.album-row:hover{ background: var(--bg-hover); color: var(--text); }

.album-row.is-active{
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

.no-results{
  color: var(--text-faint);
  padding: 14px 10px;
  font-size: 14px;
}

/* ==========================================================================
   MAIN VIEW
   ========================================================================== */
.view{
  grid-area: view;
  overflow-y: auto;
  min-height: 0;
}

.view__header{
  padding: 40px 40px 24px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: flex-end;
  gap: 24px;
  min-height: 168px;
}

.album-cover{
  width: 132px;
  height: 132px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 38px;
  color: rgba(0,0,0,0.55);
  box-shadow: 0 10px 26px -12px rgba(0,0,0,0.6);
}

/* Cover art image layered over the generated color-tile fallback.
   If cover-img fails to load (or none is set), the tile + initials
   underneath keep showing. */
.cover-img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-initials{ position: relative; z-index: 1; }

.has-image .cover-initials{ display: none; }

.album-heading .kicker{
  color: var(--text-dim);
  font-size: 16px;
  margin: 0 0 6px;
}

.album-heading h2{
  margin: 0 0 10px;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.album-heading .meta-line{
  color: var(--text-dim);
  font-size: 16px;
  margin: 0;
}

.album-heading .meta-line .dot{ margin: 0 7px; color: var(--text-faint); }

/* empty state */
.empty-state{
  padding-bottom: 8px;
}
.empty-state__eyebrow{
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px;
}
.empty-state h2{
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 800;
}
.empty-state__sub{
  color: var(--text-dim);
  max-width: 46ch;
  margin: 0;
}

/* track list */
.view__tracklist{ padding: 8px 40px 40px; }

.track-row{
  display: grid;
  grid-template-columns: 32px 1fr 70px;
  align-items: center;
  gap: 14px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.track-row:hover{ background: var(--bg-elevated); }

.track-row.is-active{ background: var(--accent-soft); }

.track-row .idx{
  font-family: var(--font-mono);
  color: var(--text-faint);
  font-size: 16px;
  text-align: center;
  position: relative;
}

.track-row.is-active .idx{ color: var(--accent); }

.track-row .idx .play-glyph{ display: none; }
.track-row.is-active .idx .num{ display: none; }
.track-row.is-active .idx .play-glyph{ display: inline-flex; }

.track-row .title-wrap{ min-width: 0; }

.track-row .t-title{
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-row.is-active .t-title{ color: var(--accent); }

.track-row .t-sub{
  font-size: 12.5px;
  color: var(--text-faint);
  margin-top: 1px;
}

.t-sub { margin-left: 10px;}

.track-row .t-duration{
  font-family: var(--font-mono);
  color: var(--text-dim);
  font-size: 14px;
  text-align: right;
}

/* ==========================================================================
   TRANSPORT (BOTTOM BAR)
   ========================================================================== */
.transport{
  grid-area: transport;
  background: var(--bg-elevated);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(340px, 2fr) minmax(180px, 1fr);
  align-items: center;
  gap: 20px;
  padding: 10px 20px;
}

/* now playing block */
.transport__now{
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.np-art{
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background: var(--bg-inset);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 16px;
  color: rgba(0,0,0,0.55);
}

.np-art.filled{ border: none; }

.np-meta{ min-width: 0; }

.np-title{
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-sub{
  font-size: 14px;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

/* transport center: buttons + scrub */
.transport__center{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.transport__buttons{
  display: flex;
  align-items: center;
  gap: 6px;
}

.tbtn{
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.12s ease;
}

.tbtn:hover:not(:disabled){ color: var(--text); }

.tbtn:disabled{ color: var(--text-faint); cursor: default; opacity: 0.5; }

.tbtn--ghost{ width: 32px; height: 32px; }

.tbtn--play{
  width: 46px;
  height: 46px;
  background: var(--accent);
  color: var(--bg-inset);
}

.tbtn--play:hover:not(:disabled){
  background: #f0b258;
  color: var(--bg-inset);
}

.tbtn--play:disabled{
  background: var(--line);
  color: var(--text-faint);
  opacity: 1;
}

.transport__scrub{
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 560px;
}

.time{
  font-size: 14px;
  color: var(--text-faint);
  width: 36px;
  flex-shrink: 0;
}

#curTime{ text-align: right; }

/* range inputs styled as a deck-style slider */
.seek{
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  cursor: pointer;
}

.seek::-webkit-slider-thumb{
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-elevated);
  box-shadow: 0 0 0 1px var(--accent);
  margin-top: -4px;
}

.seek::-moz-range-thumb{
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-elevated);
  box-shadow: 0 0 0 1px var(--accent);
}

.seek::-webkit-slider-runnable-track{
  height: 4px;
  border-radius: 2px;
  background: var(--line);
}

.seek:disabled{ opacity: 0.5; cursor: default; }

/* right cluster: track index + volume */
.transport__right{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.track-index{
  color: var(--text-faint);
  font-size: 14px;
  white-space: nowrap;
}

.vol-btn{
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 2px;
}
.vol-btn:hover{ color: var(--text); }

.seek--volume{ width: 84px; flex: none; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 880px){
  :root{ --sidebar-w: 220px; }
  .view__header{ padding: 28px 24px 20px; gap: 18px; }
  .album-cover{ width: 96px; height: 96px; font-size: 26px; }
  .album-heading h2{ font-size: 22px; }
  .view__tracklist{ padding: 8px 24px 32px; }
  .track-index{ display: none; }
}

@media (max-width: 640px){
  .app{
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr var(--transport-h);
    grid-template-areas:
      "library"
      "view"
      "transport";
  }
  .library{
    border-right: none;
    border-bottom: 1px solid var(--line);
    max-height: 40vh;
  }
  .transport{
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    padding: 10px 14px;
    height: auto;
    row-gap: 8px;
  }
  .transport__now{ order: 1; }
  .transport__center{ order: 2; }
  .transport__right{ order: 3; justify-content: space-between; }
  :root{ --transport-h: 128px; }
}