/* ================================================================
   components.css — Reusable UI components
================================================================ */

/* ── Custom cursor ───────────────────────────────────────────── */
#cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 10px; height: 10px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: multiply;
  transition: width 0.15s, height 0.15s;
}

#cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid #111;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, border-color 0.3s;
}

.cursor-trail-dot {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9997;
  transform: translate(-50%, -50%);
}

/* ── Hero typography ─────────────────────────────────────────── */
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: var(--space-3);
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.2s forwards;
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.9;
  background: var(--rainbow);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: var(--space-4);
  opacity: 0;
  animation: rainbowShift 6s ease infinite, fadeInUp 0.8s ease 0.4s forwards;
}

.hero-divider {
  height: 4px;
  width: clamp(60px, 10vw, 120px);
  background: var(--rainbow);
  background-size: 300% 300%;
  border-radius: 2px;
  margin-bottom: var(--space-4);
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.6s forwards, rainbowShift 4s ease 0.6s infinite;
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 300;
  color: var(--color-text);
  min-height: 2.5em;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.8s forwards;
  max-width: 700px;
}

.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--color-text);
  margin-left: 2px;
  vertical-align: middle;
  animation: typewriterBlink 0.7s ease infinite;
}

/* ── Section typography ──────────────────────────────────────── */
.section-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: var(--space-3);
  display: block;
}

.section--rainbow .section-label {
  color: rgba(0,0,0,0.5);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--space-6);
}

/* ── About ───────────────────────────────────────────────────── */
.about-text p {
  font-size: var(--text-lg);
  line-height: 1.75;
  margin-bottom: var(--space-3);
  color: rgba(0,0,0,0.85);
}

.about-text p:last-child { margin-bottom: 0; }

.stat-card {
  background: rgba(255,255,255,0.4);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: var(--radius);
  padding: var(--space-4);
  transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.5);
  margin-bottom: var(--space-1);
}

.stat-value {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: #000;
}

.stat-sub {
  font-size: var(--text-sm);
  color: rgba(0,0,0,0.6);
  margin-top: 4px;
}

/* ── Album card ──────────────────────────────────────────────── */
.album-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-6);
  align-items: center;
  border: 1px solid var(--color-subtle);
  border-radius: var(--radius);
  overflow: hidden;
}

.album-cover {
  aspect-ratio: 1;
  background: var(--rainbow);
  background-size: 400% 400%;
  animation: rainbowShift 6s ease infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: rgba(0,0,0,0.35);
  letter-spacing: 0.1em;
  text-align: center;
  padding: var(--space-3);
  line-height: 2;
}

.album-info {
  padding: var(--space-5);
}

.album-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
}

.album-meta {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-muted);
  letter-spacing: 0.1em;
  margin-bottom: var(--space-4);
  display: flex;
  gap: var(--space-3);
}

.album-meta span::before { content: '— '; }

.album-desc {
  font-size: var(--text-base);
  color: var(--color-muted);
  line-height: 1.7;
  margin-bottom: var(--space-5);
}

.tracklist-title {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: var(--space-3);
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-rainbow {
  display: inline-block;
  padding: 14px 32px;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #000;
  border: none;
  border-radius: var(--radius);
  background: var(--rainbow);
  background-size: 300% 300%;
  animation: rainbowShift 4s ease infinite;
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: none;
}

.btn-rainbow:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-rainbow:active { transform: translateY(0); }

/* ── Tabs ────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--color-subtle);
  margin-bottom: var(--space-6);
}

.tab-btn {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: var(--space-2) var(--space-4);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--color-muted);
  transition: color var(--transition);
  position: relative;
  bottom: -1px;
  cursor: none;
}

.tab-btn.active {
  color: var(--color-text);
  border-image: var(--rainbow) 1;
  border-image-slice: 1;
  border-bottom-width: 3px;
  border-bottom-style: solid;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeInUp 0.4s ease; }

/* ── Forms ───────────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  max-width: 640px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field.full { grid-column: 1 / -1; }

.form-field label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.form-field input,
.form-field textarea {
  font-family: var(--font-body);
  font-size: var(--text-base);
  padding: 12px 16px;
  border: 1px solid var(--color-subtle);
  border-radius: var(--radius);
  background: var(--color-faint);
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--c5);
  box-shadow: 0 0 0 3px rgba(167,139,250,0.15);
}

.form-note {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-muted);
  margin-top: var(--space-3);
  letter-spacing: 0.05em;
}

.form-note-small {
  font-size: var(--text-xs);
  color: var(--color-muted);
  margin-top: 8px;
}

.form-success {
  display: none;
  padding: var(--space-4);
  background: var(--color-faint);
  border: 1px solid var(--color-subtle);
  border-radius: var(--radius);
  animation: fadeInUp 0.4s ease;
}

.form-success strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-1);
}

.form-success p {
  color: var(--color-muted);
  font-size: var(--text-sm);
}

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  animation: fadeIn 0.3s ease forwards;
}

.modal-box {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: var(--space-6);
  position: relative;
  animation: fadeInUp 0.4s ease;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-muted);
  transition: color var(--transition);
  padding: 4px 8px;
  cursor: none;
}

.modal-close:hover { color: var(--color-text); }

.modal-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
}

.modal-text {
  font-size: var(--text-base);
  color: var(--color-muted);
  line-height: 1.7;
  margin-bottom: var(--space-5);
}

.modal-progress-wrap {
  background: #f0f0f0;
  border-radius: 2px;
  height: 6px;
  overflow: hidden;
  margin-bottom: var(--space-2);
}

.modal-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--rainbow);
  background-size: 400% 400%;
  animation: progressBar97 3.5s cubic-bezier(0.4,0,0.2,1) forwards,
             rainbowShift 2s ease infinite;
}

.modal-progress-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-muted);
  letter-spacing: 0.08em;
  text-align: right;
}

/* ── Fake Spotify Player ─────────────────────────────────────── */
#player {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 72px;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--color-subtle);
  display: flex;
  align-items: center;
  padding: 0 var(--space-5);
  gap: var(--space-4);
  z-index: 2000;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.06);
}

.player-track {
  display: flex;
  flex-direction: column;
  min-width: 200px;
}

.player-title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.player-artist {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-muted);
  letter-spacing: 0.05em;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 1;
}

.player-btn {
  font-size: 1.1rem;
  padding: 4px 8px;
  color: var(--color-muted);
  transition: color var(--transition);
  cursor: none;
}

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

.player-play {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--rainbow);
  background-size: 300% 300%;
  animation: rainbowShift 4s ease infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #000;
  border: none;
  transition: transform var(--transition);
  cursor: none;
  line-height: 1;
}

.player-play:hover { transform: scale(1.1); }

.player-progress-wrap {
  flex: 1;
  height: 4px;
  background: #eee;
  border-radius: 2px;
  overflow: hidden;
  max-width: 400px;
}

#player-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--rainbow);
  background-size: 400% 400%;
  animation: rainbowShift 4s ease infinite;
  transition: width 0.5s linear;
}

.player-time {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-muted);
  white-space: nowrap;
}

.player-right {
  margin-left: auto;
}

.player-source {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-muted);
  letter-spacing: 0.05em;
}

/* ── Easter Egg overlay ──────────────────────────────────────── */
#easter-egg {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translate(-50%, 0);
  background: var(--rainbow);
  background-size: 300% 300%;
  animation: rainbowShift 3s ease infinite;
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  max-width: 520px;
  width: 90%;
  z-index: 6000;
  display: none;
  box-shadow: var(--shadow-lg);
}

#easter-egg.show {
  display: block;
  animation: easterEggIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
             rainbowShift 3s ease infinite;
}

#easter-egg.hide {
  animation: easterEggOut 0.4s ease forwards,
             rainbowShift 3s ease infinite;
}

.easter-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.5);
  margin-bottom: var(--space-2);
}

.easter-content {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  color: #000;
  line-height: 1.5;
}

/* ── Toast notification ──────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 90px;
  right: var(--space-4);
  background: var(--color-text);
  color: var(--color-bg);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
  padding: 10px 18px;
  border-radius: var(--radius);
  z-index: 7000;
  display: none;
  max-width: 320px;
  box-shadow: var(--shadow-md);
}

.toast.show {
  display: block;
  animation: toastIn 0.3s ease;
}

.toast.hide {
  animation: toastOut 0.3s ease forwards;
}

/* ── Glitch effect on hero title ─────────────────────────────── */
.hero-title.glitch {
  position: relative;
}

.hero-title.glitch::before,
.hero-title.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  background: var(--rainbow);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-title.glitch::before {
  animation: glitch1 0.4s steps(1) infinite;
  color: var(--c1);
}

.hero-title.glitch::after {
  animation: glitch2 0.4s steps(1) infinite;
  color: var(--c4);
}

/* ── Confetti pieces ─────────────────────────────────────────── */
.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  pointer-events: none;
  z-index: 8000;
  border-radius: 2px;
  animation: confettiFall linear forwards;
}

/* ── Disco mode ──────────────────────────────────────────────── */
body.disco-mode {
  animation: disco 0.3s linear infinite;
}

/* ── Responsive player ───────────────────────────────────────── */
@media (max-width: 768px) {
  #player { padding: 0 var(--space-3); gap: var(--space-2); }
  .player-right { display: none; }
  .player-progress-wrap { max-width: 120px; }
  .album-card { grid-template-columns: 1fr; }
  .album-cover { aspect-ratio: 16/6; }
  .form-grid { grid-template-columns: 1fr; }
}
