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

:root {
  --bg-dark: #0a0a0f;
  --bg-card: #14141f;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --spotify: #1db954;
  --spotify-hover: #1ed760;
  --border: #2a2a3a;
  --gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

header h1 {
  font-size: 2.5rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.header-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  text-align: center;
}

.card h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

.card p {
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  margin-bottom: 0.75rem;
}

.btn-spotify {
  background: var(--spotify);
  color: white;
}

.btn-spotify:hover {
  background: var(--spotify-hover);
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--gradient);
  color: white;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text-primary);
}

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

.user-info {
  text-align: center;
  margin-bottom: 1.5rem;
}

.greeting {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.user-name {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hint {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 0.5rem;
}

.prompt-box {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  margin: 1rem 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-primary);
}

/* Multiple prompts layout */
.results-intro {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.prompts-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.prompt-card {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.2s ease;
}

.prompt-card:hover {
  border-color: var(--accent);
}

.prompt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.prompt-number {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  font-size: 1.1rem;
}

.prompt-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
  opacity: 0.7;
}

.prompt-genres {
  margin-bottom: 0.75rem;
}

.prompt-genres .tag {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
}

.prompt-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.prompt-actions {
  display: flex;
  gap: 0.5rem;
}

.prompt-actions .btn {
  flex: 1;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  margin-bottom: 0;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.loading-sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.artist-tag {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.2));
  border-color: var(--accent);
}

.taste-profile {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.taste-profile h4 {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.profile-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.profile-item:last-child {
  border-bottom: none;
}

.profile-label {
  color: var(--text-secondary);
}

.profile-value {
  color: var(--text-primary);
  font-weight: 500;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.85rem;
}

.loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 15, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hidden {
  display: none !important;
}

.screen {
  animation: fadeIn 0.3s ease;
}

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

footer {
  text-align: center;
  margin-top: 3rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

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

footer a:hover {
  text-decoration: underline;
}

#history-list {
  max-height: 300px;
  overflow-y: auto;
}

.history-item {
  padding: 1rem;
  background: var(--bg-dark);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.history-item:hover {
  border-color: var(--accent);
}

.history-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.history-preview {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 500;
  animation: slideUp 0.3s ease;
  z-index: 200;
}

@keyframes slideUp {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 480px) {
  .container {
    padding: 1rem;
  }
  
  header h1 {
    font-size: 2rem;
  }
  
  .card {
    padding: 1.5rem;
  }
}
