/* ── Reset & base ─────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg, #1164a3, #ff0080);
  display: flex;
  flex-direction: column;
}

/* ── Nav ──────────────────────────────────────────────── */
nav {
  background: rgba(255, 255, 255, 0.9);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

nav img.logo-header {
  height: 36px;
}

nav a {
  color: #1164a3;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.95em;
  transition: color 0.2s;
}

nav a:hover {
  color: #ff0080;
}

/* ── Main content ─────────────────────────────────────── */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 16px;
}

/* ── Hero (homepage) ──────────────────────────────────── */
.hero {
  text-align: center;
  color: #ffffff;
  margin-bottom: 32px;
}

.hero img.logo-main {
  max-width: 320px;
  width: 90%;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 1.5em;
  text-shadow: 2px 2px 0 #000;
  margin-bottom: 12px;
}

.hero p {
  font-size: 1.05em;
  max-width: 600px;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.4);
  margin: 0 auto 24px;
}

/* ── Card container ───────────────────────────────────── */
.card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  padding: 32px;
  width: 90%;
  max-width: 700px;
  color: #000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.card h2 {
  color: #1164a3;
  margin-bottom: 20px;
  font-size: 1.3em;
}

/* ── Flash messages ───────────────────────────────────── */
.flash-list {
  list-style: none;
  width: 90%;
  max-width: 700px;
  margin-bottom: 16px;
}

.flash-list li {
  padding: 10px 16px;
  border-radius: 6px;
  margin-bottom: 8px;
  font-weight: bold;
}

.flash-list li.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.flash-list li.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* ── Form ─────────────────────────────────────────────── */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 6px;
  color: #1164a3;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-family: Arial, sans-serif;
  font-size: 1em;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #1164a3;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.required {
  color: #ff0080;
}

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-block;
  background: #1164a3;
  color: #ffffff;
  padding: 10px 24px;
  border: none;
  border-radius: 5px;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: background 0.2s;
}

.btn:hover {
  background: #0e4c81;
}

.btn-pink {
  background: #ff0080;
}

.btn-pink:hover {
  background: #cc0066;
}

/* ── Songs table ──────────────────────────────────────── */
.songs-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 0.92em;
}

.songs-table th {
  background: #1164a3;
  color: #fff;
  padding: 10px 12px;
  text-align: left;
}

.songs-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #ddd;
  vertical-align: top;
}

.songs-table tr:nth-child(even) td {
  background: rgba(17, 100, 163, 0.05);
}

.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.82em;
  font-weight: bold;
  text-transform: uppercase;
}

.status-pending  { background: #fff3cd; color: #856404; }
.status-complete { background: #d4edda; color: #155724; }
.status-working  { background: #cce5ff; color: #004085; }

.empty-state {
  text-align: center;
  color: #666;
  padding: 32px;
  font-style: italic;
}

/* ── Footer ───────────────────────────────────────────── */
footer {
  text-align: center;
  color: rgba(255,255,255,0.75);
  font-size: 0.9em;
  padding: 20px;
}

/* ── Chat ─────────────────────────────────────────────── */
.chat-container {
  width: 90%;
  max-width: 700px;
}

.chat-card {
  background: rgba(255,255,255,0.97);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 28px rgba(0,0,0,0.28);
  display: flex;
  flex-direction: column;
}

.chat-header {
  background: linear-gradient(90deg, #1164a3, #ff0080);
  padding: 14px 20px;
}

.chat-host-name {
  color: #fff;
  font-weight: bold;
  font-size: 1em;
  letter-spacing: 0.3px;
}

.chat-host-sub {
  color: rgba(255,255,255,0.78);
  font-size: 0.78em;
  margin-top: 2px;
}

.chat-messages {
  padding: 20px 18px;
  min-height: 340px;
  max-height: 460px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8f9fc;
}

.bubble {
  max-width: 82%;
  padding: 10px 15px;
  border-radius: 18px;
  line-height: 1.5;
  font-size: 0.96em;
  word-wrap: break-word;
}

.bubble.ai {
  background: #1164a3;
  color: #fff;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.bubble.user {
  background: #ff0080;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

/* Typing indicator */
.typing-bubble {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 12px 16px;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  animation: dotPulse 1.4s infinite ease-in-out;
  opacity: 0.3;
}

.dot:nth-child(1) { animation-delay: 0s; }
.dot:nth-child(2) { animation-delay: 0.22s; }
.dot:nth-child(3) { animation-delay: 0.44s; }

@keyframes dotPulse {
  0%, 60%, 100% { opacity: 0.3; transform: scale(1); }
  30% { opacity: 1; transform: scale(1.3); }
}

.chat-input-bar {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  background: #fff;
  border-top: 1px solid #e8e8e8;
}

.chat-input-bar input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1em;
  font-family: Arial, sans-serif;
  transition: border-color 0.2s;
}

.chat-input-bar input:focus {
  outline: none;
  border-color: #1164a3;
}

.chat-input-bar input:disabled {
  background: #f5f5f5;
  cursor: not-allowed;
}

/* Confirmation card */
.confirm-card {
  text-align: center;
  max-width: 560px;
}

.confirm-icon {
  font-size: 3.5em;
  margin-bottom: 10px;
}

.confirm-card h2 {
  color: #ff0080;
  font-size: 1.6em;
  margin-bottom: 10px;
}

.confirm-card p {
  font-size: 1.05em;
  color: #333;
  margin-bottom: 20px;
}

.suno-label {
  background: #f0f4ff;
  border-left: 3px solid #1164a3;
  padding: 10px 14px;
  border-radius: 0 6px 6px 0;
  text-align: left;
  font-size: 0.88em;
  color: #444;
  margin-bottom: 20px;
  line-height: 1.5;
}

.suno-label strong {
  color: #1164a3;
  display: block;
  margin-bottom: 4px;
}

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

/* Songs table additions */
.song-link {
  font-size: 0.8em;
  color: #ff0080;
  font-weight: bold;
  text-decoration: none;
}

.song-link:hover {
  text-decoration: underline;
}

.vibe-badge {
  display: inline-block;
  background: linear-gradient(90deg, #1164a3, #ff0080);
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.8em;
  font-weight: bold;
  text-transform: capitalize;
}

.prompt-row td {
  background: #f8f0ff;
  color: #555;
  font-size: 0.82em;
  font-style: italic;
  padding: 6px 12px 10px;
  border-bottom: 2px solid #eee;
}

.prompt-label {
  font-style: normal;
  font-weight: bold;
  color: #1164a3;
  margin-right: 6px;
}
