/* TrueWishes Birthday Song Player — song.css v2 */
#tw-bs-wrap {
  max-width: 580px;
  margin: 0 auto;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ── Header ── */
.tw-bs-header {
  background: linear-gradient(135deg, #FF416C 0%, #FF4B2B 100%);
  border-radius: 20px 20px 0 0;
  padding: 26px 20px 20px;
  text-align: center;
  color: #fff;
}
.tw-bs-emoji-row {
  display: flex; justify-content: center; gap: 12px;
  font-size: 28px; margin-bottom: 10px;
}
.tw-bs-emoji-row span {
  display: inline-block;
  animation: tw-bs-bounce 1.4s ease-in-out infinite;
}
.tw-bs-emoji-row span:nth-child(1){ animation-delay:0s; }
.tw-bs-emoji-row span:nth-child(2){ animation-delay:.15s; }
.tw-bs-emoji-row span:nth-child(3){ animation-delay:.30s; }
.tw-bs-emoji-row span:nth-child(4){ animation-delay:.45s; }
.tw-bs-emoji-row span:nth-child(5){ animation-delay:.60s; }
@keyframes tw-bs-bounce {
  0%,100%{ transform:translateY(0); }
  40%    { transform:translateY(-9px); }
}
.tw-bs-header h2 { font-size:24px; font-weight:800; margin:0 0 5px; color:#fff; }
.tw-bs-header p  { font-size:13px; opacity:.88; margin:0; }

/* ── Card ── */
.tw-bs-card {
  background: #fff;
  border-radius: 0 0 20px 20px;
  padding: 24px 24px 20px;
  box-shadow: 0 8px 40px rgba(255,65,108,.13);
}

/* ── Steps ── */
.tw-bs-step {
  display: flex; gap: 14px; margin-bottom: 20px; align-items: flex-start;
}
.tw-bs-step-num {
  width:28px; height:28px; border-radius:50%;
  background: linear-gradient(135deg,#FF416C,#FF4B2B);
  color:#fff; font-size:13px; font-weight:700;
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0; margin-top:2px;
}
.tw-bs-step-body { flex:1; }
.tw-bs-step-body label {
  display:block; font-size:13px; font-weight:700; color:#444; margin-bottom:8px;
}
.tw-bs-step-body input[type="text"] {
  width:100%; padding:11px 14px;
  border:2px solid #FFD0C0; border-radius:12px;
  font-size:15px; color:#333; background:#fff9f7;
  outline:none; transition:border-color .2s,box-shadow .2s;
  box-sizing:border-box; font-family:inherit;
}
.tw-bs-step-body input:focus {
  border-color:#FF416C; box-shadow:0 0 0 3px rgba(255,65,108,.11);
}

/* ── Voice buttons ── */
.tw-bs-voices { display:flex; gap:8px; flex-wrap:wrap; }
.tw-bs-voice {
  padding:9px 16px; border:1.5px solid #FFD0C0; border-radius:10px;
  background:#fff9f7; font-size:13px; color:#666; cursor:pointer;
  transition:all .15s; font-family:inherit;
}
.tw-bs-voice:hover { border-color:#FF416C; background:#FFF0EB; }
.tw-bs-voice.active {
  border-color:#FF416C;
  background:linear-gradient(135deg,#FF416C,#FF4B2B);
  color:#fff; font-weight:700;
  box-shadow:0 3px 10px rgba(255,65,108,.28);
}

/* ── Songs grid ── */
.tw-bs-songs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  padding: 2px;
}
.tw-bs-loading-songs {
  grid-column: 1/-1;
  text-align:center; padding:24px; color:#aaa; font-size:13px;
}
.tw-bs-no-songs {
  grid-column:1/-1;
  background:#fff8e1; border:1px solid #ffe082;
  border-radius:10px; padding:20px; text-align:center; color:#795548; font-size:13px;
}

/* ── Song card ── */
.tw-bs-song-card {
  border: 2px solid #FFD0C0;
  border-radius: 12px;
  padding: 12px 10px;
  cursor: pointer;
  transition: all .18s;
  background: #fff9f7;
  text-align: center;
  position: relative;
}
.tw-bs-song-card:hover  { border-color:#FF416C; background:#FFF0EB; transform:translateY(-2px); }
.tw-bs-song-card.active {
  border-color:#FF416C;
  background:linear-gradient(135deg,#fff0eb,#ffe8dc);
  box-shadow:0 4px 14px rgba(255,65,108,.22);
}
.tw-bs-song-card.active::after {
  content:'✓';
  position:absolute; top:6px; right:8px;
  font-size:13px; color:#FF416C; font-weight:700;
}
.tw-bs-song-thumb {
  width:56px; height:56px; border-radius:10px; overflow:hidden;
  margin:0 auto 8px;
  background:linear-gradient(135deg,#FF416C,#FF4B2B);
  display:flex; align-items:center; justify-content:center;
  font-size:26px;
}
.tw-bs-song-thumb img { width:100%; height:100%; object-fit:cover; }
.tw-bs-song-card-title {
  font-size:12px; font-weight:700; color:#333;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.tw-bs-song-card-sub {
  font-size:11px; color:#aaa; margin-top:2px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}

/* ── Generate button ── */
.tw-bs-gen-btn {
  width:100%; padding:15px;
  background:linear-gradient(135deg,#FF416C,#FF4B2B);
  color:#fff; border:none; border-radius:14px;
  font-size:17px; font-weight:800; cursor:pointer;
  margin-top:4px; margin-bottom:14px;
  transition:opacity .2s,transform .1s; font-family:inherit;
  box-shadow:0 4px 16px rgba(255,65,108,.32);
}
.tw-bs-gen-btn:hover  { opacity:.9; }
.tw-bs-gen-btn:active { transform:scale(.98); }
.tw-bs-gen-btn:disabled { opacity:.55; cursor:not-allowed; box-shadow:none; }

/* Spinner */
.tw-bs-spin {
  display:inline-block; width:15px; height:15px;
  border:2px solid rgba(255,255,255,.35);
  border-top-color:#fff; border-radius:50%;
  animation:tw-bs-spin .7s linear infinite;
  vertical-align:middle; margin-right:5px;
}
.tw-bs-loading-songs .tw-bs-spin {
  border-color:rgba(0,0,0,.15); border-top-color:#FF416C;
}
@keyframes tw-bs-spin { to{ transform:rotate(360deg); } }

/* ── Error ── */
.tw-bs-error {
  padding:10px 14px; background:#fff0f0;
  border:1px solid #ffcdd2; border-radius:8px;
  color:#c62828; font-size:13px; margin-bottom:12px;
}

/* ── Player ── */
.tw-bs-player {
  background:linear-gradient(135deg,#1a1a2e,#16213e);
  border-radius:16px; padding:18px; color:#fff;
}

/* Waveform */
.tw-bs-waveform {
  display:flex; align-items:center; justify-content:center;
  gap:3px; height:52px; margin-bottom:14px;
}
.tw-bs-bar {
  width:4px; background:rgba(255,65,108,.3);
  border-radius:2px;
}
.tw-bs-waveform.playing .tw-bs-bar {
  background:#FF416C;
  animation:tw-bs-wave .7s ease-in-out infinite alternate;
}
@keyframes tw-bs-wave {
  from{ transform:scaleY(.3); opacity:.5; }
  to  { transform:scaleY(1.3); opacity:1; }
}

/* Now playing row */
.tw-bs-now-playing {
  display:flex; align-items:center; gap:14px; margin-bottom:14px;
}
.tw-bs-cover {
  width:52px; height:52px; border-radius:10px; overflow:hidden;
  background:linear-gradient(135deg,#FF416C,#FF4B2B);
  display:flex; align-items:center; justify-content:center;
  font-size:26px; flex-shrink:0;
}
.tw-bs-cover img { width:100%; height:100%; object-fit:cover; }
.tw-bs-info { flex:1; min-width:0; }
.tw-bs-song-name {
  font-size:15px; font-weight:700; color:#fff;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.tw-bs-for-name  { font-size:13px; color:rgba(255,255,255,.65); margin-top:2px; }
.tw-bs-status    { font-size:11px; color:rgba(255,255,255,.4);  margin-top:3px; }

.tw-bs-play-btn {
  width:50px; height:50px; border-radius:50%;
  background:linear-gradient(135deg,#FF416C,#FF4B2B);
  border:none; color:#fff; font-size:20px; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0; transition:opacity .15s,transform .1s;
  box-shadow:0 4px 14px rgba(255,65,108,.45);
}
.tw-bs-play-btn:hover  { opacity:.88; }
.tw-bs-play-btn:active { transform:scale(.93); }

/* Progress */
.tw-bs-progress-wrap {
  height:5px; background:rgba(255,255,255,.12);
  border-radius:3px; margin-bottom:5px; cursor:pointer; overflow:hidden;
}
.tw-bs-progress {
  height:100%; width:0%;
  background:linear-gradient(90deg,#FF416C,#FF4B2B);
  border-radius:3px; transition:width .25s linear;
}
.tw-bs-time {
  font-size:11px; color:rgba(255,255,255,.4);
  margin-bottom:14px; text-align:right;
}

/* Action buttons */
.tw-bs-actions { display:flex; gap:8px; }
.tw-bs-action {
  flex:1; padding:9px 6px; border-radius:10px;
  font-size:13px; font-weight:700; cursor:pointer;
  border:none; font-family:inherit;
  transition:opacity .15s; text-align:center;
}
.tw-bs-action:hover { opacity:.85; }
.tw-bs-wa    { background:#25D366; color:#fff; }
.tw-bs-again { background:rgba(255,255,255,.1); color:#fff; border:1px solid rgba(255,255,255,.2); }

/* ── Footer ── */
.tw-bs-footer {
  text-align:center; font-size:12px; color:#bbb; margin-top:14px;
}
.tw-bs-footer a { color:#FF416C; text-decoration:none; }
.tw-bs-footer a:hover { text-decoration:underline; }

@media(max-width:420px){
  .tw-bs-songs-grid { grid-template-columns:1fr 1fr; }
  .tw-bs-actions    { flex-direction:column; }
}
