/* ============================================================
   THE ASSORTMENT — Stylesheet
   Palette: Near-Black + Ocean Blue
   ============================================================ */

/* ── BASE RESET ── */
*, *::before, *::after { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

/* ── COLOR PALETTE & VARIABLES ── */
:root {
  --bg:           #08090a; 
  --bg-card:      #131518; 
  --bg-hover:     #1a1c20; 
  --border:       #2c2c2e; 
  --accent:       #0e57e9; /* Locked in */
  --text:         #e3e3e3; 
  --text-sec:     #b0b0b0; 
  --text-muted:   #707070; 
  
  --font:         'Inter', sans-serif;
  --mono:         ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, monospace;
}

/* ── GLOBAL STYLES ── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button { 
  cursor: pointer; 
  border: none; 
  background: none; 
  font-family: var(--font); 
}

a { 
  color: var(--accent); 
  text-decoration: none; 
}

a:hover {
  text-decoration: underline;
}

/* ─────────────────────────────────────────────
   HEADER
───────────────────────────────────────────── */
.site-header {
  text-align: center;
  padding: 3.5rem 2rem 3rem; 
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.site-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 300;
  letter-spacing: -0.02em;
}

.site-sub {
  font-size: 0.85rem; 
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-sec);
}

.site-byline {
  font-size: 0.85rem; 
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
}

.header-nav { 
  display: flex; 
  align-items: center; 
  gap: 0.75rem; 
}

.about-toggle {
  font-size: 0.85rem; 
  font-weight: 500;
  color: var(--text-sec);
  transition: color 0.2s;
}

.about-toggle:hover,
.about-toggle.open { 
  color: var(--accent); 
}

.sep { 
  color: var(--text-muted); 
  font-size: 0.95rem; 
}

/* ─────────────────────────────────────────────
   DROPDOWN SECTIONS
───────────────────────────────────────────── */
.about-section {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  border-bottom: 1px solid transparent;
}

.about-section.open {
  max-height: 350px;
  border-bottom-color: var(--border);
}

.about-inner {
  max-width: max-content; 
  margin: 0 auto;
  padding: 2.5rem 2rem;
  text-align: center;
}

.about-text, .disclaimer {
  font-size: 0.95rem; 
  font-weight: 300;
  line-height: 1.85;
  color: var(--text-sec);
  white-space: nowrap; 
}

/* ─────────────────────────────────────────────
   CONTROLS BAR
───────────────────────────────────────────── */
.controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
}

.sort-controls { 
  display: flex; 
  gap: 0.75rem; 
}

.sort-btn { 
  font-size: 0.85rem; 
  color: var(--text-muted); 
  font-weight: 500; 
  transition: color 0.2s;
}

.sort-btn:hover {
  color: var(--text-sec);
}

.sort-btn.active { 
  color: var(--accent); 
}

.entry-count { 
  font-size: 0.85rem; 
  color: var(--text-muted); 
  text-transform: uppercase; 
  letter-spacing: 0.1em;
}

/* ─────────────────────────────────────────────
   PLAYLIST GRID & CARDS
───────────────────────────────────────────── */
.playlist { 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); 
}

.entry-card {
  background: var(--bg-card);
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: background 0.2s;
}

.entry-card:hover { 
  background: var(--bg-hover); 
}

.entry-thumb {
  width: 65px; 
  height: 65px;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
  position: relative;
}

.entry-thumb img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  filter: blur(9px); 
  transform: scale(1.1); 
}

.entry-info { 
  flex: 1; 
  min-width: 0; 
}

.entry-id {
  font-family: var(--mono);
  font-size: 0.75rem; 
  font-weight: 600;
  color: #ffffff; 
  margin-bottom: 0.35rem;
  letter-spacing: 0.05em;
}

.entry-audio {
  font-size: 0.75rem; 
  color: var(--text-sec);
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; 
}

.entry-date { 
  font-size: 0.65rem; 
  color: var(--text-muted); 
}

/* ── LOAD MORE PAGINATION ── */
.load-more-wrap {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0; /* Reduced to pull footer up */
}

.load-more-btn {
  padding: 0.4rem 1.2rem; /* Shrunk padding */
  font-size: 0.85rem; /* Matched exactly to sort toggles */
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid var(--border);
  color: var(--text-sec);
  border-radius: 20px;
  transition: all 0.2s ease;
}

.load-more-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ─────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem 2rem; /* Reduced overall padding for tighter geometry */
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.75rem; /* Tighter gap */
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.85rem; 
}


/* ═══════════════════════════════════════════
   iPOD OVERLAY & UI
═══════════════════════════════════════════ */
.overlay {
  position: fixed; 
  inset: 0; 
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(10px); 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  z-index: 100;
}

.ipod {
  background: linear-gradient(168deg, #f5f2ec 0%, #d8d4cc 100%);
  border-radius: 34px;
  width: min(480px, 94vw);
  height: min(90vh, 850px);
  padding: 18px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 50px 100px rgba(0,0,0,0.5);
}

.ipod-screen-shell {
  flex: 1; 
  background: #141414; 
  border-radius: 12px; 
  padding: 4px;
  display: flex; 
  flex-direction: column; 
  margin-bottom: 12px;
}

.ipod-screen { 
  flex: 1; 
  background: #000000; 
  border-radius: 9px; 
  display: flex; 
  flex-direction: column; 
  overflow: hidden; 
  min-height: 0; 
}

.screen-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0; 
  position: relative; /* Anchor for volume indicator */
}

.screen-bar { 
  display: flex; 
  justify-content: space-between; 
  padding: 8px 12px; 
  background: #091020; 
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.screen-label, .screen-pos { 
  font-family: var(--mono); 
  font-size: 0.6rem; 
  text-transform: uppercase; 
  color: #4d78bb; 
}

.screen-media { 
  flex: 1; 
  background: #000000; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  position: relative;
  overflow: hidden;
  min-height: 0; 
}

.screen-media-fg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%; 
  height: 100%;
  object-fit: contain; 
  z-index: 1;
}

/* ── VOLUME INDICATOR ── */
.volume-indicator {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 1.25rem; /* Increased size significantly */
  font-weight: bold; /* Added bold weight */
  color: #fff;
  background: rgba(0,0,0,0.65); /* Slightly darker backing */
  padding: 8px 16px; /* Increased padding */
  border-radius: 8px; /* Slightly rounder */
  z-index: 50;
  pointer-events: none;
  transition: opacity 0.4s ease;
  opacity: 1;
}

.volume-indicator.fade-out {
  opacity: 0;
}

.screen-meta { 
  padding: 8px 12px; 
  display: flex; 
  gap: 0.75rem; 
  border-top: 1px solid rgba(255,255,255,0.05); 
}

.screen-id { 
  font-family: var(--mono); 
  font-size: 0.7rem; 
  color: #ffffff; 
  font-weight: 600; 
}

.screen-audio { 
  font-family: var(--mono); 
  font-size: 0.65rem; 
  color: #5888d8; 
  flex: 1; 
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.screen-date { 
  font-family: var(--mono); 
  font-size: 0.6rem; 
  color: #2e4a72; 
}

.screen-progress { 
  padding: 8px 12px; 
  display: flex; 
  align-items: center; 
  gap: 10px; 
}

.progress-track { 
  flex: 1; 
  height: 6px; 
  background: #1a2a44; 
  cursor: pointer; 
  border-radius: 3px;
  position: relative;
}

.progress-fill { 
  height: 100%; 
  background: var(--accent); 
  width: 0%; 
  border-radius: 3px;
}

.progress-time { 
  font-family: var(--mono); 
  font-size: 0.6rem; 
  color: #2e4a72; 
}

/* ── CREDITS VIEW ── */
.credits-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem;
}

.credits-row { 
  display: flex; 
  flex-direction: column; 
  gap: 0.5rem; 
}

.credits-label { 
  font-family: var(--mono); 
  font-size: 0.55rem; 
  color: #4d78bb; 
  text-transform: uppercase; 
}

.credits-val { 
  font-family: var(--mono); 
  font-size: 0.75rem; 
  color: #8bb4f8; 
  word-break: break-all;
  padding: 0 0.5rem;
}

.credits-val a {
  color: #8bb4f8;
  text-decoration: none;
  font-size: inherit;
}

.credits-val a:hover {
  text-decoration: underline;
}

/* ── iPOD CLICK WHEEL ── */
.ipod-strip {
  text-align: center;
  font-family: var(--mono);
  font-size: 0.5rem;
  color: #9a9288;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 10px 0;
}

.wheel { 
  width: 140px; 
  height: 140px; 
  border-radius: 50%; 
  background: #ccc6bd; 
  position: relative; 
  margin: 10px auto; 
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.1), 0 5px 15px rgba(0,0,0,0.2);
}

.wnav { 
  position: absolute; 
  font-size: 1.1rem; 
  color: #6a6460; 
  transition: color 0.2s;
}

.wnav:hover { color: #222; }
.wnav.top   { top: 10px; left: 50%; transform: translateX(-50%); }
.wnav.bot   { bottom: 10px; left: 50%; transform: translateX(-50%); }
.wnav.left  { left: 10px; top: 50%; transform: translateY(-50%); }
.wnav.right { right: 10px; top: 50%; transform: translateY(-50%); }

.wcenter { 
  width: 50px; 
  height: 50px; 
  border-radius: 50%; 
  background: #fff; 
  position: absolute; 
  top: 50%; 
  left: 50%; 
  transform: translate(-50%, -50%); 
  font-size: 1.1rem; 
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}
.wcenter:active { transform: translate(-50%, -50%) scale(0.95); }

.ipod-actions {
  display: flex;
  justify-content: center;
  margin-top: 15px;
}

.take-btn {
  font-size: 0.7rem; 
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6a6460;
  border: 1px solid #b5b0a8;
  padding: 6px 16px;
  border-radius: 20px;
}
.take-btn:hover { background: rgba(0,0,0,0.05); }


/* ═══════════════════════════════════════════
   YOUR TAKE MODAL
═══════════════════════════════════════════ */
.take-modal { 
  position: fixed; 
  inset: 0; 
  background: rgba(0,0,0,0.6); 
  z-index: 200; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
}

.take-box { 
  background: var(--bg-card); 
  padding: 2rem; 
  border-radius: 12px; 
  width: min(380px, 90vw); 
  border: 1px solid var(--border);
}

.take-box h3 {
  font-size: 1.1rem; 
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.take-id { 
  font-family: var(--mono); 
  font-size: 0.85rem; 
  color: #fff; 
  margin-bottom: 1.5rem; 
}

textarea { 
  width: 100%; 
  height: 120px; 
  background: var(--bg); 
  color: #fff; 
  border: 1px solid var(--border); 
  padding: 12px; 
  margin-bottom: 1.5rem; 
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.95rem; 
  resize: none;
}

textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.take-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 1rem;
}

#take-save,
#take-send-link {
  background: var(--accent);
  color: #fff;
  padding: 8px 20px;
  border-radius: 6px;
  font-weight: 500;
}

.take-cancel {
  border: 1px solid var(--border);
  color: var(--text-sec);
  padding: 8px 20px;
  border-radius: 6px;
}

.take-note {
  font-size: 0.7rem; 
  color: var(--text-muted);
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ── YOUR TAKE — email step inputs ── */
.take-email-intro {
  font-size: 0.8rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-sec);
  margin-bottom: 1.25rem;
}

.take-box input[type="email"],
.take-box input[type="text"] {
  width: 100%;
  background: var(--bg);
  color: #fff;
  border: 1px solid var(--border);
  padding: 11px 12px;
  margin-bottom: 0.85rem;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.9rem;
}

.take-box input[type="email"]:focus,
.take-box input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
}

.take-box input::placeholder { color: var(--text-muted); }

/* ── YOUR TAKE — previous takes ── */
.take-prev-toggle {
  display: block;
  margin-top: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

.take-prev-toggle:hover { color: var(--accent); }

.take-prev-list {
  margin-top: 1rem;
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-right: 4px;
  scrollbar-width: thin;                       /* Firefox */
  scrollbar-color: var(--border) transparent;  /* Firefox: thumb, track */
}

/* WebKit / Safari scrollbar */
.take-prev-list::-webkit-scrollbar {
  width: 8px;
}

.take-prev-list::-webkit-scrollbar-track {
  background: transparent;
}

.take-prev-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.take-prev-list::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.take-prev-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.take-prev-text {
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.take-prev-date {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text-muted);
}

.take-prev-empty {
  font-size: 0.8rem;
  font-weight: 300;
  line-height: 1.5;
  color: var(--text-muted);
}

/* ── YOUR TAKE — status line ── */
.take-status {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--accent);
  margin-bottom: 0.6rem;
  line-height: 1.4;
}

/* ── YOUR TAKE — floating confirmation toast ── */
.take-toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%) translateY(150%);
  background: var(--bg-card);
  border: 1px solid var(--accent);
  color: var(--text);
  font-size: 0.85rem;
  padding: 0.85rem 1.4rem;
  border-radius: 30px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  z-index: 300;
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
  pointer-events: none;
}

.take-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Utility class to hide elements */
.hidden { display: none !important; }

/* ── MOBILE SAFEGUARD ── */
@media (max-width: 600px) {
  .about-text, .disclaimer {
    white-space: normal;
  }
}