/* ═══════════════════════════════════════════════
   Orion-V-Lite — Apple Design Philosophy
   in Retro Green-on-Black Terminal Aesthetic
   ═══════════════════════════════════════════════ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: #000;
  color: #39FF14;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 500;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::selection { background: rgba(57, 255, 20, 0.3); }
::-webkit-scrollbar { display: none; }

/* ── Typography Hierarchy ── */
h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
h3 { font-size: 17px; font-weight: 600; letter-spacing: 0; line-height: 1.4; }
.body { font-size: 16px; font-weight: 500; line-height: 1.5; }
.caption { font-size: 14px; font-weight: 500; line-height: 1.4; }
.small-label { font-size: 13px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.6; }

/* ── Color Utilities ── */
.text-primary { color: #39FF14; }
.text-secondary { color: rgba(57, 255, 20, 0.6); }
.text-tertiary { color: rgba(57, 255, 20, 0.4); }
.text-quaternary { color: rgba(57, 255, 20, 0.25); }
.bg-subtle { background: rgba(57, 255, 20, 0.04); }
.bg-selected { background: rgba(57, 255, 20, 0.12); }
.border-subtle { border-color: rgba(57, 255, 20, 0.12); }
.border-visible { border-color: rgba(57, 255, 20, 0.2); }

/* ── Layout System ── */
.view-slider {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.app-page {
  flex: 0 0 100vw;
  width: 100vw;
  height: 100vh;
  scroll-snap-align: start;
  overflow-y: auto;
}
.app-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 60px 20px 100px 20px;
  min-height: 100vh;
}

/* ── Page Header ── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(57, 255, 20, 0.1);
}
.page-header h1 { margin: 0; }
.page-header .page-indicator {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.3;
  letter-spacing: 0.05em;
}

/* ── Search Input ── */
.search-input-wrap {
  position: relative;
  margin-bottom: 24px;
}
.search-input-wrap input {
  width: 100%;
  background: rgba(57, 255, 20, 0.04);
  border: 1px solid rgba(57, 255, 20, 0.15);
  border-radius: 12px;
  padding: 16px 20px 16px 48px;
  color: #fff;
  font-size: 17px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  outline: none;
  transition: border-color 0.2s;
}
.search-input-wrap input:focus {
  border-color: rgba(57, 255, 20, 0.4);
}
.search-input-wrap input::placeholder {
  color: rgba(255, 255, 255, 0.25);
  font-weight: 400;
}
.search-input-wrap .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.3;
  pointer-events: none;
}

/* ── Chip Scroll ── */
.chip-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 24px;
  -webkit-overflow-scrolling: touch;
}
.chip-scroll::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  padding: 8px 18px;
  border-radius: 980px;
  border: 1px solid rgba(57, 255, 20, 0.15);
  background: transparent;
  color: rgba(57, 255, 20, 0.6);
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  touch-action: manipulation;
}
.chip:hover { border-color: rgba(57, 255, 20, 0.3); color: rgba(57, 255, 20, 0.8); }
.chip.active {
  background: rgba(57, 255, 20, 0.12);
  border-color: rgba(57, 255, 20, 0.4);
  color: #39FF14;
}

/* ── Section Header ── */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-header h3 { margin: 0; }

/* ── Song Row ── */
.song-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(57, 255, 20, 0.06);
  transition: background 0.15s;
}
.song-row:hover { background: rgba(57, 255, 20, 0.02); }
.song-info { flex: 1; min-width: 0; }
.song-title {
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.song-artist {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.5;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.song-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Icon Button ── */
.icon-btn {
  background: none;
  border: none;
  color: rgba(57, 255, 20, 0.4);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-btn:hover { color: rgba(57, 255, 20, 0.7); background: rgba(57, 255, 20, 0.06); }
.icon-btn.active { color: #39FF14; }
.icon-btn.faved { color: #39FF14; opacity: 0.8; }

/* ── Pill Button ── */
.pill-btn {
  background: transparent;
  border: 1px solid rgba(57, 255, 20, 0.2);
  color: rgba(57, 255, 20, 0.7);
  padding: 6px 14px;
  border-radius: 980px;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  touch-action: manipulation;
}
.pill-btn:hover {
  background: rgba(57, 255, 20, 0.08);
  border-color: rgba(57, 255, 20, 0.35);
  color: #39FF14;
}
.pill-btn:active { transform: scale(0.97); }

/* ── Key Selector ── */
.key-selector {
  display: flex;
  gap: 2px;
  background: rgba(57, 255, 20, 0.04);
  border-radius: 8px;
  padding: 2px;
}
.key-btn {
  background: none;
  border: none;
  color: rgba(57, 255, 20, 0.4);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.key-btn:hover { color: rgba(57, 255, 20, 0.7); }
.key-btn.active {
  background: rgba(57, 255, 20, 0.12);
  border: 1px solid rgba(57, 255, 20, 0.3);
  color: #39FF14;
}

/* ── Empty State ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}
.empty-state .terminal-prompt {
  font-family: 'Courier New', monospace;
  font-size: 22px;
  opacity: 0.4;
  margin-bottom: 20px;
}
.empty-state .terminal-prompt .cursor { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.empty-state p { font-size: 14px; opacity: 0.5; max-width: 260px; line-height: 1.6; }

/* ── INFO Page Links ── */
.info-links { display: flex; flex-direction: column; gap: 1px; background: rgba(57, 255, 20, 0.06); border-radius: 12px; overflow: hidden; }
.info-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: #000;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  color: inherit;
}
.info-link:hover { background: rgba(57, 255, 20, 0.03); }
.info-link .link-label { font-size: 16px; font-weight: 500; }
.info-link .link-arrow { opacity: 0.25; font-size: 18px; }

/* ── Profile Form ── */
.form-group { margin-bottom: 24px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 8px;
}
.form-group input {
  width: 100%;
  background: rgba(57, 255, 20, 0.04);
  border: 1px solid rgba(57, 255, 20, 0.15);
  border-radius: 12px;
  padding: 16px 18px;
  color: #fff;
  font-size: 16px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus { border-color: rgba(57, 255, 20, 0.4); }
.form-group input::placeholder { color: rgba(255, 255, 255, 0.2); }
.save-btn {
  width: 100%;
  background: rgba(57, 255, 20, 0.1);
  border: 1px solid rgba(57, 255, 20, 0.25);
  color: #39FF14;
  padding: 16px;
  border-radius: 12px;
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.save-btn:hover { background: rgba(57, 255, 20, 0.15); border-color: rgba(57, 255, 20, 0.4); }
.save-btn:active { transform: scale(0.98); }
.saved-notice {
  text-align: center;
  font-size: 14px;
  opacity: 0.5;
  margin-top: 12px;
  transition: opacity 0.3s;
}
.saved-notice.visible { opacity: 0.8; }

/* ── FAB Menu ── */
.fab-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(57, 255, 20, 0.2);
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.fab-toggle:hover { border-color: rgba(57, 255, 20, 0.4); background: rgba(0, 0, 0, 0.95); }
.fab-toggle svg { stroke: #39FF14; }

/* ── Fullscreen Nav Overlay ── */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.97);
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.nav-overlay.open { opacity: 1; pointer-events: auto; }
.nav-overlay .nav-link {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: color 0.2s;
}
.nav-overlay .nav-link:hover { color: rgba(255, 255, 255, 0.8); }
.nav-overlay .nav-link.active { color: #39FF14; }
.nav-overlay .nav-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.nav-overlay .nav-close:hover { opacity: 1; }
.nav-overlay .nav-close svg { stroke: #fff; }

/* ── Page Dots (bottom) ── */
.page-dots {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 50;
}
.page-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(57, 255, 20, 0.2);
  transition: all 0.3s;
}
.page-dot.active {
  width: 20px;
  border-radius: 3px;
  background: rgba(57, 255, 20, 0.6);
}

/* ── Loading Spinner ── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(57, 255, 20, 0.15);
  border-top-color: #39FF14;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(57, 255, 20, 0.12);
  border: 1px solid rgba(57, 255, 20, 0.2);
  color: #39FF14;
  padding: 12px 24px;
  border-radius: 980px;
  font-size: 14px;
  font-weight: 600;
  z-index: 300;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show { opacity: 1; }

/* ── Responsive ── */
@media (min-width: 480px) {
  .app-container { padding-left: 24px; padding-right: 24px; }
}
