:root {
  --bg: #091124;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --border: rgba(59, 130, 246, 0.1);
  --border-hover: rgba(59, 130, 246, 0.25);
  --text: #ffffff;
  --muted: #94a3b8;
  --accent: #60a5fa;
  --accent-2: #93c5fd;
  --accent-3: rgba(59, 130, 246, 0.12);
  --glow: rgba(59, 130, 246, 0.22);
  --user-bubble: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(30, 64, 175, 0.14));
  --assistant-bubble: linear-gradient(135deg, rgba(15, 23, 42, 0.32), rgba(30, 41, 59, 0.62));
  --shadow: 0 24px 60px rgba(0,0,0,0.6);
  --radius: 24px;
}

body[data-mood="happy"]       { --accent: #ffffff; --glow: rgba(192,132,252,0.24); }
body[data-mood="calm"]        { --accent: #818cf8; --glow: rgba(129,140,248,0.22); }
body[data-mood="heartbroken"] { --accent: #e879f9; --glow: rgba(232,121,249,0.22); }
body[data-mood="focused"]     { --accent: #60a5fa; --glow: rgba(96,165,250,0.22); }
body[data-mood="energetic"]   { --accent: #f472b6; --glow: rgba(244,114,182,0.24); }
body[data-mood="romantic"]    { --accent: #fb7185; --glow: rgba(251,113,133,0.22); }

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  transition: background 400ms ease;
}

.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.glow-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  transition: background 600ms ease;
}

.glow-1 {
  width: 500px;
  height: 500px;
  top: -150px;
  left: -100px;
  background: radial-gradient(circle, rgba(59,130,246,0.22), transparent 70%);
  animation: blobDrift1 14s ease-in-out infinite alternate;
}

.glow-2 {
  width: 400px;
  height: 400px;
  bottom: -100px;
  right: -80px;
  background: radial-gradient(circle, var(--glow), transparent 70%);
  animation: blobDrift2 11s ease-in-out infinite alternate;
}

.glow-3 {
  width: 280px;
  height: 280px;
  top: 40%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(59,130,246,0.08), transparent 70%);
  animation: blobDrift3 16s ease-in-out infinite alternate;
}

.glow-4 {
  width: 350px;
  height: 350px;
  bottom: 10%;
  right: 15%;
  background: radial-gradient(circle, var(--accent-3), transparent 70%);
  animation: blobDrift4 18s ease-in-out infinite alternate;
}

.glow-5 {
  width: 450px;
  height: 450px;
  bottom: -50px;
  right: 30%;
  background: radial-gradient(circle, rgba(59,130,246,0.15), transparent 70%);
  animation: blobDrift5 22s ease-in-out infinite alternate;
}

@keyframes blobDrift1 { from { transform: translate(0,0); } to { transform: translate(50px, 40px); } }
@keyframes blobDrift2 { from { transform: translate(0,0); } to { transform: translate(-40px,-30px); } }
@keyframes blobDrift3 { from { transform: translateX(-50%) scale(1); } to { transform: translateX(-50%) scale(1.3); } }
@keyframes blobDrift4 { from { transform: translate(0,0); } to { transform: translate(-60px, -40px); } }
@keyframes blobDrift5 { from { transform: translate(0,0); } to { transform: translate(40px, -60px); } }

.staff-group {
  position: absolute;
  left: 0;
  right: 0;
  top: 42%;
  display: flex;
  flex-direction: column;
  gap: 18px;
  opacity: 0.04;
}

.staff-line {
  height: 1px;
  background: var(--accent);
}

.floating-notes {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.float-note {
  position: absolute;
  color: var(--accent);
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 8px var(--glow));
}

.hindi-note {
  font-family: 'Amita', cursive;
}

.float-up { bottom: -10%; animation: driftUp linear infinite; }
.float-down { top: -10%; animation: driftDown linear infinite; }
.float-left { right: -10%; animation: driftLeft linear infinite; }
.float-right { left: -10%; animation: driftRight linear infinite; }

@keyframes driftUp {
  0%   { transform: translate(0, 0) rotate(-20deg); opacity: 0; }
  10%  { opacity: 0.45; }
  50%  { transform: translate(30px, -55vh) rotate(10deg); opacity: 0.6; }
  90%  { opacity: 0.2; }
  100% { transform: translate(-30px, -120vh) rotate(35deg); opacity: 0; }
}

@keyframes driftDown {
  0%   { transform: translate(0, 0) rotate(-20deg); opacity: 0; }
  10%  { opacity: 0.45; }
  50%  { transform: translate(-30px, 55vh) rotate(10deg); opacity: 0.6; }
  90%  { opacity: 0.2; }
  100% { transform: translate(30px, 120vh) rotate(35deg); opacity: 0; }
}

@keyframes driftLeft {
  0%   { transform: translate(0, 0) rotate(-20deg); opacity: 0; }
  10%  { opacity: 0.45; }
  50%  { transform: translate(-55vw, 30px) rotate(10deg); opacity: 0.6; }
  90%  { opacity: 0.2; }
  100% { transform: translate(-120vw, -30px) rotate(35deg); opacity: 0; }
}

@keyframes driftRight {
  0%   { transform: translate(0, 0) rotate(-20deg); opacity: 0; }
  10%  { opacity: 0.45; }
  50%  { transform: translate(55vw, -30px) rotate(10deg); opacity: 0.6; }
  90%  { opacity: 0.2; }
  100% { transform: translate(120vw, 30px) rotate(35deg); opacity: 0; }
}

.radar-bg {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, rgba(96, 165, 250, 0.15) 0%, transparent 50%),
    repeating-radial-gradient(circle at 50% 50%,
      transparent 0,
      transparent 48px,
      rgba(96, 165, 250, 0.12) 50px);
}

.radar-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 2px dashed rgba(96, 165, 250, 0.25);
}

.radar-1 {
  right: -150px;
  bottom: -150px;
  width: 700px;
  height: 700px;
  border: 1px solid rgba(96, 165, 250, 0.1);
  animation: vinylRotate 60s linear infinite;
  box-shadow: inset 0 0 100px rgba(96, 165, 250, 0.05), 0 0 120px rgba(96, 165, 250, 0.08);
  opacity: 0.7;
}
.radar-1::after { inset: 220px; animation: vinylRotate 30s linear infinite reverse; }

.radar-2 {
  left: -250px;
  top: -150px;
  width: 900px;
  height: 900px;
  border: 1px solid rgba(96, 165, 250, 0.05);
  animation: vinylRotate 80s linear infinite reverse;
  box-shadow: inset 0 0 100px rgba(96, 165, 250, 0.03);
  opacity: 0.4;
}
.radar-2::after { inset: 300px; animation: vinylRotate 45s linear infinite; border: 1px dashed rgba(96, 165, 250, 0.15); }

.radar-3 {
  right: 20%;
  top: -100px;
  width: 400px;
  height: 400px;
  border: 1px solid rgba(96, 165, 250, 0.08);
  animation: vinylRotate 40s linear infinite;
  opacity: 0.5;
  background:
    radial-gradient(circle at 50% 50%, rgba(96, 165, 250, 0.1) 0%, transparent 50%),
    repeating-radial-gradient(circle at 50% 50%,
      transparent 0,
      transparent 38px,
      rgba(96, 165, 250, 0.08) 40px);
}
.radar-3::after { inset: 120px; animation: vinylRotate 25s linear infinite reverse; border: 1px dashed rgba(96, 165, 250, 0.2); }

@keyframes vinylRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.page-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 20px;
  max-width: 1300px;
  margin: 0 auto;
  padding: 24px;
  height: 100vh;
  animation: pageLift 600ms ease both;
}

@keyframes pageLift {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.profile-panel,
.chat-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  animation: slideInLeft 600ms ease both;
  transition: border-color 300ms;
}

.profile-panel:hover { border-color: var(--border-hover); }

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: none; }
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-note {
  font-size: 2rem;
  display: block;
}

.eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 2px;
}

h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  line-height: 1;
  background: linear-gradient(135deg, #93c5fd, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--text);
  font-weight: 700;
}

.panel-copy {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.user-identity {
  margin-bottom: 12px;
}

.user-name {
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 2px;
  font-family: 'Playfair Display', serif;
}

.user-email {
  color: rgba(147, 197, 253, 0.7);
  font-size: 0.85rem;
  font-weight: 400;
  font-family: 'Inter', sans-serif;
  margin-left: 6px;
}

.eq-bar {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 28px;
  padding: 0 2px;
}

.eq-bar span {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(to top, var(--accent), rgba(59,130,246,0.3));
  opacity: 0.55;
}

.eq-bar span:nth-child(1)  { height: 10px; }
.eq-bar span:nth-child(2)  { height: 18px; }
.eq-bar span:nth-child(3)  { height: 8px; }
.eq-bar span:nth-child(4)  { height: 24px; }
.eq-bar span:nth-child(5)  { height: 14px; }
.eq-bar span:nth-child(6)  { height: 20px; }
.eq-bar span:nth-child(7)  { height: 11px; }
.eq-bar span:nth-child(8)  { height: 22px; }
.eq-bar span:nth-child(9)  { height: 9px; }
.eq-bar span:nth-child(10) { height: 16px; }

.profile-card,
.hero-card,
.chat-log,
.chat-form,
.message,
.favorites-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  transition: border-color 200ms, background 200ms;
}

.profile-card,
.favorites-panel {
  padding: 18px;
  display: grid;
  gap: 10px;
}

.inline-player {
  display: grid;
  gap: 10px;
  padding: 14px 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.inline-player.is-playing {
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2), var(--shadow);
}

.inline-player-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

#inline-player-track {
  color: var(--muted);
  font-size: 0.92rem;
}

#inline-player-time {
  color: var(--accent-2);
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
}

.inline-progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  cursor: pointer;
  overflow: hidden;
}

.inline-progress:focus {
  outline: 2px solid rgba(59, 130, 246, 0.45);
  outline-offset: 2px;
}

.inline-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transition: width 120ms linear;
}

#inline-audio {
  width: 100%;
  display: none;
}

.profile-card:hover,
.favorites-panel:hover {
  border-color: var(--border-hover);
}

label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

input,
select {
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 180ms, box-shadow 180ms, background 180ms;
  outline: none;
}

input::placeholder { color: rgba(255, 255, 255, 0.7); }

input:focus,
select:focus {
  border-color: rgba(59,130,246,0.45);
  background: rgba(59,130,246,0.06);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

select option { 
  background: #ffffff; 
  color: var(--text);
  padding: 8px 12px;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2360a5fa' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 40px;
}

.stack-form {
  display: grid;
  gap: 10px;
}

.primary-btn,
.secondary-btn,
.mood-chip,
.track-link,
.submit-btn {
  border: 0;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
  transition: transform 160ms, box-shadow 160ms, background 180ms, opacity 160ms;
}

.primary-btn,
.submit-btn {
  padding: 13px 20px;
  background: linear-gradient(135deg, #60a5fa, var(--accent), #ffffff);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 8px 24px rgba(59,130,246,0.3);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.submit-btn {
  padding: 13px 20px;
}

.primary-btn:hover,
.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(59,130,246,0.45);
}

.secondary-btn {
  padding: 12px 18px;
  color: var(--accent-2);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
}

.secondary-btn:hover,
.mood-chip:hover,
.track-link:hover {
  transform: translateY(-1px);
  border-color: var(--border-hover);
}

.secondary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.hero-card {
  padding: 16px 22px;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  min-height: 108px;
  align-items: center;
}

.hero-text p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.hero-waveform {
  display: flex;
  align-items: end;
  gap: 6px;
  min-height: 100%;
}

.hero-bar {
  flex: 1;
  min-height: 26px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  animation: heroWave 1.1s ease-in-out infinite alternate;
}

.hero-bar:nth-child(odd) { animation-duration: 0.8s; }
.hero-bar:nth-child(1) { height: 28px; }
.hero-bar:nth-child(2) { height: 66px; }
.hero-bar:nth-child(3) { height: 42px; }
.hero-bar:nth-child(4) { height: 82px; }
.hero-bar:nth-child(5) { height: 54px; }
.hero-bar:nth-child(6) { height: 76px; }
.hero-bar:nth-child(7) { height: 36px; }
.hero-bar:nth-child(8) { height: 86px; }
.hero-bar:nth-child(9) { height: 48px; }
.hero-bar:nth-child(10) { height: 72px; }
.hero-bar:nth-child(11) { height: 32px; }
.hero-bar:nth-child(12) { height: 90px; }

@keyframes heroWave {
  from { transform: scaleY(0.65); }
  to { transform: scaleY(1.05); }
}

.chat-log {
  padding: 18px;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.message-stack {
  display: grid;
  gap: 14px;
  height: 100%;
  overflow-y: auto;
  padding-right: 4px;
  align-content: start;
}

.message {
  padding: 18px;
}

.message.user {
  background: var(--user-bubble);
}

.message.assistant {
  background: var(--assistant-bubble);
}

.loading-message {
  border-style: dashed;
  border-color: rgba(59, 130, 246, 0.28);
}

.typing-indicator {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 6px 2px;
}

.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-2);
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
.typing-dot:nth-child(3) { animation-delay: 0s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}

.message-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.message-role {
  font-weight: 700;
  color: var(--text);
}

.message p {
  color: var(--muted);
  line-height: 1.65;
}

.recommendations {
  display: grid;
  gap: 12px;
}

.recommendation-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255,255,255,0.03);
  display: flex;
  gap: 16px;
  align-items: center;
}

.recommendation-sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  width: 90px;
  order: 2;
}

.recommendation-sidebar .track-link {
  width: 100%;
  justify-content: center;
  padding: 8px;
  font-size: 0.85rem;
  background: linear-gradient(135deg, #3b82f6, #60a5fa, #1d4ed8);
  border: none;
  color: #ffffff;
  border-radius: 999px;
  transition: all 160ms;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.recommendation-sidebar .track-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
  filter: brightness(1.1);
}

.recommendation-sidebar form {
  margin: 0;
  width: 100%;
}

.recommendation-sidebar .save-btn {
  width: 100%;
}

.recommendation-sidebar .primary-play-btn {
  margin-bottom: 0;
}

.recommendation-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.recommendation-card h3,
.favorite-item h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
}

.recommendation-card p,
.favorite-item p,
.recommendation-meta,
.favorites-empty {
  color: var(--muted);
  line-height: 1.5;
}

.recommendation-actions,
.favorite-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.track-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--accent-2);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
}

.track-link:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.preview-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px dashed rgba(59, 130, 246, 0.34);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 0.78rem;
}

.primary-play-btn {
  background: linear-gradient(135deg, #60a5fa, var(--accent), #ffffff);
  color: #ffffff;
  border-color: transparent;
  font-weight: 600;
  padding: 12px 20px;
  font-size: 0.95rem;
  margin-bottom: 12px;
  box-shadow: 0 6px 20px rgba(59,130,246,0.3);
  transition: transform 160ms, box-shadow 160ms;
}

.primary-play-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(59,130,246,0.45);
}

.primary-play-btn:disabled {
  opacity: 0.5;
  transform: none;
  cursor: not-allowed;
}

.play-inline-btn.is-playing {
  background: linear-gradient(135deg, #60a5fa, var(--accent), #ffffff);
  color: #ffffff;
  border-color: transparent;
  animation: playPulse 1.2s ease-in-out infinite;
}

@keyframes playPulse {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.35); }
  70% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.save-btn,
.remove-fav-btn {
  color: var(--accent-2);
}

.chat-form {
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.more-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.more-actions button {
  width: 150px;
}

.favorites-header {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}

.favorites-list {
  display: grid;
  gap: 12px;
}

.favorite-item {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255,255,255,0.03);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.logout-btn {
  width: 100%;
}

.recently-played-list {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 10px;
  padding-bottom: 8px;
}

.recently-played-list::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}

.recently-played-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.recently-played-list::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

.recently-played-list::-webkit-scrollbar-thumb:hover {
  background: var(--accent-2);
}

.recent-song-item {
  flex: 0 0 100%;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,0.02);
  transition: border-color 200ms;
  min-width: 0;
}

.recent-song-item:hover {
  border-color: var(--border-hover);
}

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

.recent-song-info h4 {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 2px;
  white-space: normal;
  word-wrap: break-word;
}

.recent-song-info p {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recently-empty {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 20px 0;
  font-style: italic;
}

.mood-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mood-grid form {
  margin: 0;
}

.mood-chip {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mood-icon {
  color: var(--accent-2);
}

.flash-stack {
  display: grid;
  gap: 10px;
}

.flash {
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 0.94rem;
}

.flash.success {
  background: rgba(46, 204, 113, 0.14);
  color: #95f4b8;
}

.flash.error {
  background: rgba(255, 126, 179, 0.14);
  color: #ffadd1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.bg-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.note {
  position: absolute;
  font-size: 1.6rem;
  opacity: 0;
  animation: floatNote linear infinite;
  color: var(--accent);
  filter: blur(0.5px);
  user-select: none;
}

.note:nth-child(3) { left: 8%; animation-duration: 14s; animation-delay: 0s; font-size: 1.2rem; }
.note:nth-child(4) { left: 18%; animation-duration: 11s; animation-delay: 2.5s; font-size: 2rem; }
.note:nth-child(5) { left: 30%; animation-duration: 16s; animation-delay: 1s; font-size: 1rem; }
.note:nth-child(6) { left: 45%; animation-duration: 12s; animation-delay: 4s; font-size: 1.8rem; }
.note:nth-child(7) { left: 60%; animation-duration: 15s; animation-delay: 0.5s; font-size: 1.4rem; }
.note:nth-child(8) { left: 72%; animation-duration: 13s; animation-delay: 3s; font-size: 1rem; }
.note:nth-child(9) { left: 85%; animation-duration: 18s; animation-delay: 1.5s; font-size: 2.2rem; }
.note:nth-child(10) { left: 92%; animation-duration: 10s; animation-delay: 5s; font-size: 1.2rem; }
.note:nth-child(11) { left: 12%; animation-duration: 12s; animation-delay: 1.2s; font-size: 1.5rem; }
.note:nth-child(12) { left: 22%; animation-duration: 9s; animation-delay: 2.8s; font-size: 1.9rem; }
.note:nth-child(13) { left: 34%; animation-duration: 15s; animation-delay: 0.8s; font-size: 1.1rem; }
.note:nth-child(14) { left: 41%; animation-duration: 11s; animation-delay: 4.6s; font-size: 1.7rem; }
.note:nth-child(15) { left: 53%; animation-duration: 13s; animation-delay: 2.1s; font-size: 1.3rem; }
.note:nth-child(16) { left: 66%; animation-duration: 10s; animation-delay: 5.3s; font-size: 2rem; }
.note:nth-child(17) { left: 78%; animation-duration: 14s; animation-delay: 1.7s; font-size: 1.2rem; }
.note:nth-child(18) { left: 88%; animation-duration: 9s; animation-delay: 3.6s; font-size: 1.6rem; }
.note:nth-child(19) { left: 95%; animation-duration: 16s; animation-delay: 0.3s; font-size: 1rem; }
.note:nth-child(20) { left: 5%; animation-duration: 12s; animation-delay: 6.1s; font-size: 1.8rem; }
.note:nth-child(21) { left: 27%; animation-duration: 8.5s; animation-delay: 4.2s; font-size: 1.25rem; }
.note:nth-child(22) { left: 49%; animation-duration: 11.5s; animation-delay: 5.8s; font-size: 1.45rem; }
.note:nth-child(23) { left: 14%; animation-duration: 9.4s; animation-delay: 2.2s; font-size: 1.1rem; }
.note:nth-child(24) { left: 24%; animation-duration: 13.2s; animation-delay: 0.6s; font-size: 1.7rem; }
.note:nth-child(25) { left: 37%; animation-duration: 10.1s; animation-delay: 3.8s; font-size: 1.3rem; }
.note:nth-child(26) { left: 44%; animation-duration: 15.4s; animation-delay: 1.9s; font-size: 1.9rem; }
.note:nth-child(27) { left: 57%; animation-duration: 8.8s; animation-delay: 4.4s; font-size: 1.2rem; }
.note:nth-child(28) { left: 63%; animation-duration: 12.6s; animation-delay: 2.7s; font-size: 1.6rem; }
.note:nth-child(29) { left: 71%; animation-duration: 9.9s; animation-delay: 5.1s; font-size: 1rem; }
.note:nth-child(30) { left: 79%; animation-duration: 14.1s; animation-delay: 1.3s; font-size: 2rem; }
.note:nth-child(31) { left: 86%; animation-duration: 11.8s; animation-delay: 3.1s; font-size: 1.35rem; }
.note:nth-child(32) { left: 93%; animation-duration: 10.7s; animation-delay: 0.4s; font-size: 1.75rem; }
.note:nth-child(33) { left: 3%; animation-duration: 16.2s; animation-delay: 2.9s; font-size: 1.15rem; }
.note:nth-child(34) { left: 52%; animation-duration: 7.9s; animation-delay: 5.6s; font-size: 1.5rem; }
.note:nth-child(35) { left: 9%; animation-duration: 12.4s; animation-delay: 1.4s; font-size: 1.35rem; }
.note:nth-child(36) { left: 16%; animation-duration: 9.6s; animation-delay: 3.2s; font-size: 1.05rem; }
.note:nth-child(37) { left: 20%; animation-duration: 14.7s; animation-delay: 0.9s; font-size: 1.85rem; }
.note:nth-child(38) { left: 29%; animation-duration: 10.8s; animation-delay: 4.8s; font-size: 1.2rem; }
.note:nth-child(39) { left: 33%; animation-duration: 8.9s; animation-delay: 2.4s; font-size: 1.55rem; }
.note:nth-child(40) { left: 39%; animation-duration: 13.6s; animation-delay: 5.2s; font-size: 1rem; }
.note:nth-child(41) { left: 47%; animation-duration: 11.1s; animation-delay: 1.8s; font-size: 1.7rem; }
.note:nth-child(42) { left: 55%; animation-duration: 9.3s; animation-delay: 3.7s; font-size: 1.25rem; }
.note:nth-child(43) { left: 61%; animation-duration: 15.2s; animation-delay: 0.5s; font-size: 1.95rem; }
.note:nth-child(44) { left: 68%; animation-duration: 10.2s; animation-delay: 4.1s; font-size: 1.15rem; }
.note:nth-child(45) { left: 74%; animation-duration: 12.9s; animation-delay: 2.6s; font-size: 1.45rem; }
.note:nth-child(46) { left: 81%; animation-duration: 8.7s; animation-delay: 5.4s; font-size: 1.1rem; }
.note:nth-child(47) { left: 87%; animation-duration: 14.3s; animation-delay: 1.1s; font-size: 1.8rem; }
.note:nth-child(48) { left: 91%; animation-duration: 9.8s; animation-delay: 3.4s; font-size: 1.3rem; }
.note:nth-child(49) { left: 96%; animation-duration: 11.9s; animation-delay: 0.7s; font-size: 1.6rem; }
.note:nth-child(50) { left: 6%; animation-duration: 13.8s; animation-delay: 4.9s; font-size: 1.4rem; }

@keyframes floatNote {
  0%   { transform: translateY(110vh) rotate(0deg); opacity: 0; }
  8%   { opacity: 0.18; }
  90%  { opacity: 0.12; }
  100% { transform: translateY(-12vh) rotate(25deg); opacity: 0; }
}

.waveform {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 210px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding: 0 12px;
  opacity: 0.34;
  pointer-events: none;
}

.wave-bar {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(to top, var(--accent), transparent);
  animation: waveAnim ease-in-out infinite alternate;
  height: 70px;
}

.wave-bar:nth-child(odd) {
  animation-duration: 0.55s;
}

.wave-bar:nth-child(even) {
  animation-duration: 0.9s;
}

@keyframes waveAnim {
  from { transform: scaleY(0.1); }
  to   { transform: scaleY(1.35); }
}

.glow-blob-1 {
  width: 420px;
  height: 420px;
  top: -100px;
  left: -80px;
  background: radial-gradient(circle, rgba(130,80,220,0.25), transparent 70%);
  animation: driftBlob1 12s ease-in-out infinite alternate;
}

.glow-blob-2 {
  width: 350px;
  height: 350px;
  bottom: -80px;
  right: -60px;
  background: radial-gradient(circle, rgba(59,130,246,0.2), transparent 70%);
  animation: driftBlob2 10s ease-in-out infinite alternate;
}

.auth-wrap {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  padding: 24px;
}

.brand {
  text-align: center;
  margin-bottom: 32px;
}

.brand-icon {
  font-size: 2.4rem;
  display: block;
  margin-bottom: 10px;
}

.brand h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, #93c5fd, var(--accent), #c890ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 6px;
}

.brand p {
  color: var(--muted);
  font-size: 0.92rem;
  font-style: italic;
}

.auth-card-box {
  padding: 36px 32px;
}

.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  margin-bottom: 24px;
  color: var(--text);
}

.form-group {
  margin-bottom: 18px;
}

.switch-link {
  text-align: center;
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.9rem;
}

.login-form {
  display: grid;
}

.login-btn {
  justify-self: center;
  width: min(280px, 100%);
}

.switch-link a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid rgba(59,130,246,0.3);
}

.vinyl-deco {
  position: fixed;
  right: -80px;
  top: 50%;
  transform: translateY(-50%);
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #1e1830 18%, transparent 19%),
    repeating-radial-gradient(circle at 50% 50%, transparent, transparent 14px, rgba(59,130,246,0.06) 15px);
  border: 2px solid rgba(59,130,246,0.1);
  animation: vinylRotate 18s linear infinite;
  opacity: 0.5;
}

@media (max-width: 960px) {
  body {
    overflow: auto;
  }

  .page-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
  }

  .chat-form {
    grid-template-columns: 1fr;
  }

  .hero-card {
    grid-template-columns: 1fr;
  }

  .favorite-item,
  .song-row,
  .recommendation-actions,
  .favorite-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (min-width: 961px) and (max-height: 820px) {
  body {
    overflow: auto;
  }

  .page-shell {
    height: auto;
    min-height: 100vh;
  }

  .profile-panel {
    max-height: none;
  }
}

@media (min-width: 1200px) {
  .page-shell {
    max-width: 1420px;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 24px;
  }

  body {
    overflow: auto;
  }

  .page-shell {
    min-height: 100vh;
    height: auto;
  }

  .chat-log {
    min-height: 0;
    height: auto;
    overflow: visible;
  }

  .message-stack {
    max-height: 52vh;
    overflow-y: auto;
  }
}
.float-top-left { bottom: -10%; animation: driftTopLeft linear infinite; }
.float-top-right { bottom: -10%; animation: driftTopRight linear infinite; }
.float-bottom-left { top: -10%; animation: driftBottomLeft linear infinite; }
.float-bottom-right { top: -10%; animation: driftBottomRight linear infinite; }

@keyframes driftTopLeft {
  0%   { transform: translate(0, 0) rotate(-20deg); opacity: 0; }
  10%  { opacity: 0.45; }
  50%  { transform: translate(-50vw, -55vh) rotate(10deg); opacity: 0.6; }
  90%  { opacity: 0.2; }
  100% { transform: translate(-100vw, -120vh) rotate(35deg); opacity: 0; }
}

@keyframes driftTopRight {
  0%   { transform: translate(0, 0) rotate(-20deg); opacity: 0; }
  10%  { opacity: 0.45; }
  50%  { transform: translate(50vw, -55vh) rotate(10deg); opacity: 0.6; }
  90%  { opacity: 0.2; }
  100% { transform: translate(100vw, -120vh) rotate(35deg); opacity: 0; }
}

@keyframes driftBottomLeft {
  0%   { transform: translate(0, 0) rotate(-20deg); opacity: 0; }
  10%  { opacity: 0.45; }
  50%  { transform: translate(-50vw, 55vh) rotate(10deg); opacity: 0.6; }
  90%  { opacity: 0.2; }
  100% { transform: translate(-100vw, 120vh) rotate(35deg); opacity: 0; }
}

@keyframes driftBottomRight {
  0%   { transform: translate(0, 0) rotate(-20deg); opacity: 0; }
  10%  { opacity: 0.45; }
  50%  { transform: translate(50vw, 55vh) rotate(10deg); opacity: 0.6; }
  90%  { opacity: 0.2; }
  100% { transform: translate(100vw, 120vh) rotate(35deg); opacity: 0; }
}
