/* =====================
   BeatBridge App — UI Styles
   Matches landing page theme.css design tokens
   ===================== */

.app-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 100px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.section-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 10px;
}

/* ---- Venue Selector ---- */
.venue-selector { display: flex; flex-direction: column; }

.venue-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.venue-pill {
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.venue-pill:hover { border-color: var(--accent-pink); color: var(--text); }
.venue-pill.active {
  border-color: var(--accent-pink);
  background: rgba(247,37,133,0.12);
  color: var(--accent-pink);
  box-shadow: 0 0 12px var(--accent-pink-glow);
}

/* ---- Search Section ---- */
.search-section {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.search-box { flex: 1; min-width: 280px; }

.search-input-wrap {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.search-input-wrap:focus-within { border-color: var(--accent-pink); }

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 14px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  color: var(--text);
  width: 100%;
}
.search-input::placeholder { color: var(--text-dim); }

.search-btn {
  padding: 10px 16px;
  background: none;
  border: none;
  color: var(--accent-pink);
  cursor: pointer;
  font-size: 18px;
  transition: opacity 0.2s;
}
.search-btn:hover { opacity: 0.7; }

.search-hint {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 8px;
}

.analyze-btn {
  padding: 14px 28px;
  background: var(--accent-pink);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  box-shadow: 0 0 20px rgba(247,37,133,0.3);
}
.analyze-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 0 30px rgba(247,37,133,0.5); }
.analyze-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ---- Seed Track ---- */
.seed-track-section { display: flex; flex-direction: column; gap: 10px; }
.seed-label { display: flex; justify-content: space-between; align-items: center; }

.seed-card {
  background: var(--surface);
  border: 1px solid var(--accent-pink);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: center;
  box-shadow: 0 0 24px rgba(247,37,133,0.15);
}

.seed-cover {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-2);
  flex-shrink: 0;
}

.seed-info { flex: 1; }

.seed-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.seed-artist {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.seed-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.seed-tag {
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
}

.tag-bpm { background: rgba(58,134,255,0.15); color: var(--accent-blue); }
.tag-key  { background: rgba(0,200,255,0.15);  color: var(--accent-cyan); }
.tag-energy { background: rgba(255,190,11,0.15); color: var(--accent-gold); }
.tag-genre { background: rgba(232,234,246,0.08); color: var(--text-muted); }

.btn-ghost {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  padding: 8px 16px;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}
.btn-ghost:hover { border-color: var(--text-muted); color: var(--text); }
.btn-sm { font-size: 13px; padding: 6px 12px; }
.btn-xs { font-size: 12px; padding: 4px 10px; }

/* ---- Energy Meter ---- */
.energy-section { display: flex; flex-direction: column; gap: 10px; }

.energy-meter-wrap {
  position: relative;
  padding-top: 28px;
}

.energy-target-line {
  position: absolute;
  top: 28px;
  width: 3px;
  height: 20px;
  background: var(--accent-gold);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(255,190,11,0.6);
  transform: translateX(-50%);
}

.energy-bar {
  height: 16px;
  background: var(--surface-2);
  border-radius: 100px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.energy-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-pink));
  border-radius: 100px;
  transition: width 0.8s ease;
  min-width: 4px;
}

.energy-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 6px;
  font-family: 'Space Grotesk', sans-serif;
}

.energy-advice {
  font-size: 13px;
  color: var(--text-muted);
  padding: 10px 14px;
  background: var(--surface);
  border-radius: 10px;
  border: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ---- Recommendations ---- */
.recs-section { display: flex; flex-direction: column; gap: 10px; }

.recs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.rec-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  transition: all 0.25s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rec-card:hover { border-color: var(--accent-blue); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }

.rec-header { display: flex; gap: 12px; align-items: flex-start; }

.rec-cover {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-2);
  flex-shrink: 0;
}

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

.rec-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rec-artist {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rec-score-badge {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 100px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.score-high   { background: rgba(0,200,255,0.15); color: var(--accent-cyan); }
.score-medium { background: rgba(255,190,11,0.15); color: var(--accent-gold); }
.score-low    { background: rgba(232,234,246,0.08); color: var(--text-muted); }

.rec-metrics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.rec-metric {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  background: var(--surface-2);
  color: var(--text-muted);
}

.rec-mix {
  padding: 10px 14px;
  background: rgba(58,134,255,0.08);
  border: 1px solid rgba(58,134,255,0.2);
  border-radius: 10px;
  font-size: 12px;
  color: var(--accent-blue);
  line-height: 1.5;
}

.rec-energy-dir {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
}

.dir-up   { color: #ff6b35; }
.dir-same { color: var(--accent-gold); }
.dir-down { color: var(--accent-cyan); }

/* ---- Empty State ---- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  color: var(--text);
  margin-bottom: 10px;
}
.empty-state p {
  font-size: 14px;
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ---- Nav actions ---- */
.nav-actions { display: flex; align-items: center; gap: 12px; }

/* ---- Loading spinner ---- */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 0.8s linear infinite; }

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .app-main { padding: 90px 16px 40px; gap: 24px; }
  .search-section { flex-direction: column; }
  .analyze-btn { width: 100%; }
  .recs-grid { grid-template-columns: 1fr; }
  .seed-card { flex-direction: column; align-items: flex-start; }
}