/* macOS music app mockup — matches real Moonlight design */

.mockup-window {
  width: 100%;
  aspect-ratio: 16 / 10.2;
  border-radius: 12px;
  overflow: hidden;
  background: #0d0a1e;
  box-shadow: var(--shadow-app);
  border: 1px solid rgba(255,255,255,0.08);
  position: relative;
  isolation: isolate;
  /* Force native-looking system font INSIDE the mockup only */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  font-size: 13px;
  color: #ece8f3;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}

/* The whole window is one grid: body / transport (no separate titlebar) */
.mockup-window {
  display: grid;
  grid-template-rows: 1fr 76px;
}

/* ---------- Sidebar with traffic lights at top ---------- */

/* ---------- Body (sidebar + main) ---------- */
.mockup-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 0;
  position: relative;
}

/* Sidebar — vibrancy: darker, slightly translucent feel */
.mockup-sidebar {
  background:
    linear-gradient(180deg, rgba(18, 22, 56, 0.55), rgba(13, 14, 36, 0.45));
  border-right: 1px solid rgba(255,255,255,0.03);
  padding: 14px 10px 10px;
  overflow: hidden;
  position: relative;
}
/* Traffic lights live in the sidebar */
.mockup-sidebar .traffic {
  display: flex; gap: 8px;
  padding: 0 4px 18px;
}
.tl { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 0.5px rgba(0,0,0,0.2); }
.tl.red { background: #ff5f57; }
.tl.yellow { background: #febc2e; }
.tl.green { background: #28c840; }
/* Subtle vertical fade — left side appears "lifted" off content */
.mockup-sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,0.20), transparent 30%);
}

.sb-group { margin-bottom: 16px; }
.sb-group-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 10px 8px;
}
.sb-group-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.32);
}
.sb-group-icon {
  width: 18px; height: 18px;
  display: grid; place-items: center;
  color: rgba(255,255,255,0.35);
  border-radius: 4px;
}
.sb-group-icon:hover { background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.6); }

.sb-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px;
  border-radius: 5px;
  color: rgba(255,255,255,0.82);
  cursor: default;
  font-size: 13px;
  line-height: 1;
  user-select: none;
}
.sb-row + .sb-row { margin-top: 1px; }
.sb-row:hover { background: rgba(255,255,255,0.03); }
.sb-row .sb-ico { color: rgba(255,255,255,0.55); display: inline-flex; flex-shrink: 0; }
.sb-row.active {
  background: rgba(255,255,255,0.07);
  color: #fff;
}
.sb-row.active .sb-ico { color: #fff; }
.sb-label { flex: 1; }

/* ---------- Main ---------- */
.mockup-main {
  padding: 22px 28px 0;
  overflow: hidden;
  background:
    radial-gradient(900px 600px at 100% -10%, rgba(122, 98, 200, 0.05), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(70, 100, 200, 0.06), transparent 60%);
  position: relative;
}

.main-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 4px 0 18px;
}
.main-head-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.1;
}
.main-head-sub {
  font-size: 12.5px;
  color: rgba(255,255,255,0.45);
  margin-top: 2px;
  font-weight: 400;
}

.mockup-search-main {
  display: flex; align-items: center; gap: 7px;
  height: 26px;
  padding: 0 10px;
  min-width: 200px;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.45);
  box-shadow: inset 0 0 0 0.5px rgba(255,255,255,0.06);
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 22px 18px;
  padding-bottom: 30px;
}
.album-tile {
  display: flex; flex-direction: column; gap: 8px;
  cursor: pointer;
  min-width: 0; /* allow grid track to shrink below content's intrinsic width */
}
.album-tile > * { min-width: 0; }
.album-tile > .cover { aspect-ratio: 1; width: 100%; border-radius: 4px; }
.album-tile:hover .cover { transform: translateY(-1px); box-shadow: 0 10px 24px -10px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,255,255,0.08); }
.cover { transition: transform .18s ease, box-shadow .18s ease; }
.album-meta { padding: 0; min-width: 0; }
.album-title {
  font-size: 12.5px;
  color: #fff;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
}
.album-artist {
  font-size: 11.5px;
  color: rgba(255,255,255,0.50);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

/* ---------- Transport (glass bar at bottom) ---------- */
.mockup-transport {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1.05fr 1.35fr 1.05fr;
  align-items: center;
  padding: 0 18px;
  gap: 16px;
  /* Light translucent gray — sits on the dark window */
  background:
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.05));
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-top: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 -1px 0 rgba(0,0,0,0.4);
}

/* Now-playing left cluster */
.mockup-window .np { display: flex; align-items: center; gap: 11px; min-width: 0; }
.mockup-window .np .cover-mini {
  width: 42px; height: 42px;
  border-radius: 4px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,255,255,0.06);
}
.mockup-window .np-meta { min-width: 0; flex: 1; }
.mockup-window .np-title { font-size: 12.5px; color: #fff; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.25; }
.mockup-window .np-sub { font-size: 11px; color: rgba(255,255,255,0.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; line-height: 1.25; }

/* Center controls */
.tr-center { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; }
.tr-controls { display: flex; align-items: center; gap: 18px; }
.iconbtn {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 6px;
  color: rgba(255,255,255,0.85);
  transition: color .12s ease, background .12s ease, transform .12s ease;
}
.iconbtn:hover { color: #fff; background: rgba(255,255,255,0.06); }
.iconbtn.toggled { color: var(--cream-hi); }
.iconbtn.play {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #fff;
  color: #14111d;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.iconbtn.play:hover { background: #fff; transform: scale(1.04); }

/* Right cluster */
.tr-right { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.vol { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,0.7); }
.vol-bar {
  width: 80px; height: 3px;
  background: rgba(255,255,255,0.18);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
}
.vol-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: rgba(255,255,255,0.85);
  border-radius: 999px;
}

/* Full-width scrubber along the very bottom of the transport */
.tr-scrub {
  position: absolute;
  left: 16px; right: 16px;
  bottom: 8px;
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  align-items: center;
  gap: 10px;
}
.tr-time { font-size: 10.5px; color: rgba(255,255,255,0.55); font-variant-numeric: tabular-nums; line-height: 1; }
.tr-time.right { text-align: right; }
.tr-bar {
  height: 3px;
  background: rgba(255,255,255,0.18);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
}
.tr-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: rgba(255,255,255,0.85);
  border-radius: 999px;
}
.tr-knob {
  position: absolute; top: 50%;
  transform: translate(-50%, -50%);
  width: 0; height: 0;
  opacity: 0;
  transition: opacity .12s ease;
}
.tr-bar:hover .tr-knob { opacity: 1; width: 10px; height: 10px; background: #fff; border-radius: 50%; box-shadow: 0 2px 6px rgba(0,0,0,0.4); }

/* Placeholder state — slightly muted; same layout dimensions */
.mockup-window .np.placeholder { cursor: pointer; }
.mockup-window .np.placeholder .mockup-window .np-title { color: rgba(255,255,255,0.85); }
.mockup-window .np.placeholder .mockup-window .np-sub { color: rgba(255,255,255,0.5); }
.mockup-window .np.placeholder .cover-mini { filter: saturate(0.85); }

/* Drop overlay (when dragging file over window) */
.drop-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(110,150,240,0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 2px dashed rgba(255,255,255,0.5);
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  pointer-events: none;
}
.mockup-window.dragging .drop-overlay { display: flex; }

/* ---------- Edge vignettes: left + bottom fade ---------- */
/* This sits on top, fades the contents toward the page bg ever so slightly */
.mockup-window::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  background:
    /* left fade */
    linear-gradient(90deg, rgba(0,0,0,0.18), transparent 6%, transparent 100%),
    /* bottom fade beyond transport */
    linear-gradient(0deg, rgba(0,0,0,0.10), transparent 12%, transparent 100%);
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .mockup-window { font-size: 11.5px; aspect-ratio: 16 / 11; }
  .mockup-body { grid-template-columns: 0 1fr; }
  .mockup-sidebar { display: none; }
  .mockup-main { padding: 16px 16px 0; }
  .album-grid { grid-template-columns: repeat(3, 1fr); gap: 14px 12px; }
  .mockup-transport {
    grid-template-columns: minmax(0, 1.4fr) auto minmax(0, 0.6fr);
    padding: 0 12px;
    gap: 10px;
  }
  .tr-right { gap: 8px; }
  .vol-bar { width: 50px; }
  .tr-controls { gap: 10px; }
  .iconbtn { width: 24px; height: 24px; }
  .iconbtn.play { width: 28px; height: 28px; }
  .mockup-window .np .cover-mini { width: 36px; height: 36px; }
  .mockup-window .np-title { font-size: 12px; }
  .mockup-window .np-sub { font-size: 10.5px; }
  .mockup-search-main { display: none; }
}

@media (max-width: 560px) {
  .tr-right { display: none; }
  .mockup-transport { grid-template-columns: minmax(0, 1fr) auto; }
}
