/* ===================================================
   OnAir365 — Modern Theme v2.0
   CSS Custom Properties drive per-station branding.
   Defaults set here; overridden per-page via PHP inline <style>.
   =================================================== */

:root {
  --brand-primary: #6c3fc2;
  --brand-accent:  #00d4aa;
  --brand-dark:    #0f0e17;
  --brand-surface: rgba(255, 255, 255, 0.06);
  --brand-border:  rgba(255, 255, 255, 0.11);
  --brand-text:    #ffffff;
  --brand-muted:   rgba(255, 255, 255, 0.55);
  --radius:        16px;
  --radius-sm:     8px;
  --transition:    0.22s ease;
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--brand-dark);
  color: var(--brand-text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* === HEADER === */
header.site-header {
  background: rgba(15, 14, 23, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--brand-border);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-logo img {
  height: 42px;
  width: auto;
  display: block;
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
  color: var(--brand-text);
  padding: 8px 18px;
  border-radius: 50px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.btn-logout:hover {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
}

/* === DASHBOARD === */
.site-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 32px;
}

.dashboard-header {
  text-align: center;
  margin-bottom: 48px;
}

.dashboard-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  line-height: 1.1;
}

.dashboard-header p {
  color: var(--brand-muted);
  font-size: 1rem;
  max-width: 440px;
  margin: 0 auto;
}

/* === STATION GRID === */
.stations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.station-card {
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--brand-text);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.station-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
  border-color: var(--brand-primary);
}

.station-card-image {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.station-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 20px;
}

.station-initial {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 2.6rem;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.9);
}

.station-card-body {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.station-card-name {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
}

.station-card-play {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.station-card:hover .station-card-play {
  background: var(--brand-accent);
  transform: scale(1.12);
}

.station-card-play svg {
  width: 13px;
  height: 13px;
  fill: #fff;
  margin-left: 2px;
}

/* === STATION PLAYER PAGE === */
.station-page {
  min-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
  text-align: center;
  position: relative;
}

/* Subtle radial glow from brand colour */
.station-page::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(108, 63, 194, 0.18), transparent 70%);
  background: radial-gradient(ellipse 80% 60% at 50% 0%, color-mix(in srgb, var(--brand-primary) 22%, transparent), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.station-page > * { position: relative; z-index: 1; }

/* Logo */
.station-logo {
  width: 128px;
  height: 128px;
  border-radius: var(--radius);
  object-fit: contain;
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
  padding: 14px;
  margin-bottom: 28px;
}

.station-logo-placeholder {
  width: 128px;
  height: 128px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 2.8rem;
  color: #fff;
}

.station-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 5.5vw, 3.2rem);
  letter-spacing: -0.035em;
  margin-bottom: 8px;
  line-height: 1.1;
}

.station-tagline {
  color: var(--brand-muted);
  font-size: 1rem;
  margin-bottom: 44px;
}

/* === EQUALIZER BARS === */
.equalizer {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 34px;
  margin: 0 auto 28px;
}

.eq-bar {
  width: 5px;
  border-radius: 3px;
  background: var(--brand-accent);
  transform-origin: bottom;
  transition: opacity 0.3s;
}

.eq-bar:nth-child(1) { animation: eq 0.72s ease-in-out infinite alternate; }
.eq-bar:nth-child(2) { animation: eq 0.94s ease-in-out 0.10s infinite alternate; }
.eq-bar:nth-child(3) { animation: eq 0.63s ease-in-out 0.20s infinite alternate; }
.eq-bar:nth-child(4) { animation: eq 1.01s ease-in-out 0.15s infinite alternate; }
.eq-bar:nth-child(5) { animation: eq 0.77s ease-in-out 0.05s infinite alternate; }

@keyframes eq {
  from { height: 6px;  opacity: 0.5; }
  to   { height: 34px; opacity: 1;   }
}

.equalizer.paused .eq-bar {
  animation-play-state: paused;
  height: 6px;
  opacity: 0.3;
}

/* === NOW PLAYING === */
.now-playing-wrap {
  margin-bottom: 40px;
}

.now-playing-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--brand-accent);
  font-weight: 600;
  margin-bottom: 6px;
}

.now-playing-track {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 600;
  min-height: 1.8em;
  transition: opacity 0.3s;
}

/* === PLAY BUTTON === */
.player-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 560px;
  margin-bottom: 44px;
}

.player-controls .btn-play { order: 1; }
.player-controls .btn-back { order: 2; }

.player-controls--inline {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  flex-direction: unset;
}

.player-controls--inline .btn-play { order: unset; }
.player-controls--inline .btn-back { order: unset; justify-self: end; }
.player-controls--inline .btn-request { justify-self: start; }

.btn-play {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  box-shadow: 0 8px 32px rgba(108, 63, 194, 0.45);
  transition: transform var(--transition), box-shadow var(--transition);
}

.btn-play:hover {
  transform: scale(1.09);
  box-shadow: 0 14px 48px rgba(108, 63, 194, 0.65);
}

.btn-play:active { transform: scale(0.96); }

.btn-play svg {
  width: 26px;
  height: 26px;
  fill: #fff;
}

.icon-play  { margin-left: 3px; }

/* Show/hide play vs pause icon */
.btn-play .icon-pause { display: none; }
.btn-play.playing .icon-play  { display: none; }
.btn-play.playing .icon-pause { display: block; }

/* Loading spinner state */
.btn-play.loading {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  opacity: 0.7;
  cursor: wait;
}

/* === BACK BUTTON === */
.btn-back {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  line-height: 1.4;
  padding: 10px 22px;
  border: 1px solid var(--brand-border);
  border-radius: 50px;
  transition: var(--transition);
  background: var(--brand-surface);
  white-space: nowrap;
}

.btn-back:hover {
  color: var(--brand-text);
  border-color: var(--brand-primary);
  background: rgba(108, 63, 194, 0.12);
}

/* === LOGIN PAGE === */
.login-page {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.login-card {
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.login-card h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  margin-bottom: 8px;
  line-height: 1.2;
}

.login-sub {
  color: var(--brand-muted);
  text-align: center;
  font-size: 0.9rem;
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  color: var(--brand-muted);
  margin-bottom: 6px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.form-group input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 1rem;
  color: var(--brand-text);
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
  outline: none;
  appearance: none;
}

.form-group input:focus {
  border-color: var(--brand-primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(108, 63, 194, 0.22);
}

.form-group input::placeholder { color: rgba(255, 255, 255, 0.28); }

.btn-login {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  margin-top: 10px;
  transition: opacity var(--transition);
  letter-spacing: 0.01em;
}

.btn-login:hover { opacity: 0.88; }

.forgot-link {
  display: block;
  text-align: center;
  margin-top: 20px;
  color: var(--brand-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition);
}

.forgot-link:hover { color: var(--brand-accent); }

.login-error {
  background: rgba(220, 53, 69, 0.13);
  border: 1px solid rgba(220, 53, 69, 0.38);
  color: #ff8b94;
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  font-size: 0.88rem;
  margin-bottom: 20px;
  text-align: center;
}

/* === STREAM STATUS BADGE === */
/*
   display:none by default — takes zero space, no gap.
   Switches to inline-flex only when JS sets text content,
   which naturally pushes the play button down.
*/
.stream-status {
  display: none;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 24px;
}

.stream-status:not(:empty) { display: inline-flex; }

.stream-status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Buffering state */
.stream-status.buffering {
  background: rgba(255, 180, 0, 0.12);
  border: 1px solid rgba(255, 180, 0, 0.3);
  color: #ffb400;
}
.stream-status.buffering::before {
  background: #ffb400;
  animation: pulse-dot 1s ease-in-out infinite;
}

/* Reconnecting state */
.stream-status.reconnecting {
  background: rgba(255, 100, 60, 0.12);
  border: 1px solid rgba(255, 100, 60, 0.3);
  color: #ff7a50;
}
.stream-status.reconnecting::before {
  background: #ff7a50;
  animation: pulse-dot 0.6s ease-in-out infinite;
}

/* Connected/live state */
.stream-status.live {
  background: rgba(0, 212, 100, 0.12);
  border: 1px solid rgba(0, 212, 100, 0.3);
  color: #00d464;
}
.stream-status.live::before { background: #00d464; }

@keyframes pulse-dot {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  header.site-header { padding: 14px 20px; }
  .site-main { padding: 40px 20px; }
  .stations-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
}

@media (max-width: 540px) {
  header.site-header { padding: 12px 16px; }
  .site-main { padding: 32px 16px; }
  .stations-grid { grid-template-columns: 1fr; }
  .login-card { padding: 36px 24px; }
  .station-page { padding: 40px 16px; }
}

/* === SONG REQUEST BUTTON === */
.btn-request {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
  color: var(--brand-muted);
  padding: 10px 22px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  line-height: 1.4;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.btn-request:hover {
  color: var(--brand-accent);
  border-color: var(--brand-accent);
  background: rgba(0, 212, 170, 0.08);
}

.btn-request svg { flex-shrink: 0; }

/* === REQUEST MODAL === */
.request-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.request-modal.is-open { display: flex; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 14, 23, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  width: 100%;
  max-width: 520px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.request-modal.is-open .modal-card {
  animation: modal-in 0.26s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--brand-border);
  flex-shrink: 0;
}

.modal-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--brand-surface);
  color: var(--brand-muted);
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--brand-text);
}

/* === MODAL SEARCH === */
.modal-search-wrap {
  position: relative;
  padding: 14px 24px;
  border-bottom: 1px solid var(--brand-border);
  flex-shrink: 0;
}

.modal-search-icon {
  position: absolute;
  left: 38px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--brand-muted);
  pointer-events: none;
}

.modal-search {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px 10px 36px;
  font-size: 0.9rem;
  color: var(--brand-text);
  font-family: 'Inter', sans-serif;
  outline: none;
  appearance: none;
  transition: var(--transition);
}

.modal-search:focus {
  border-color: var(--brand-primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(108, 63, 194, 0.2);
}

.modal-search::placeholder { color: rgba(255, 255, 255, 0.28); }

/* === SONG LIST === */
.song-list {
  overflow-y: auto;
  flex: 1;
  padding: 6px 0;
}

.song-list-msg {
  padding: 32px 24px;
  text-align: center;
  color: var(--brand-muted);
  font-size: 0.9rem;
}

.song-list-msg.error { color: #ff8b94; }

.song-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 24px;
  transition: background var(--transition);
}

.song-item:hover { background: rgba(255, 255, 255, 0.04); }

.song-art {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--brand-surface);
}

.song-art-placeholder {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  flex-shrink: 0;
}

.song-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.song-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--brand-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-artist {
  font-size: 0.78rem;
  color: var(--brand-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === REQUEST (+ ) BUTTON === */
.song-req-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--brand-border);
  background: var(--brand-surface);
  color: var(--brand-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.song-req-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  fill: none;
}

.song-req-btn:hover:not(:disabled) {
  background: var(--brand-accent);
  border-color: var(--brand-accent);
  color: #fff;
}

.song-req-btn.locked {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.07);
  cursor: not-allowed;
}

.cd-label {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--brand-muted);
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* === TOAST === */
.request-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
  color: var(--brand-text);
  padding: 11px 24px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
  white-space: nowrap;
}

.request-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.request-toast.success {
  border-color: rgba(0, 212, 100, 0.4);
  background: rgba(0, 212, 100, 0.12);
  color: #00d464;
}

.request-toast.error {
  border-color: rgba(220, 53, 69, 0.4);
  background: rgba(220, 53, 69, 0.12);
  color: #ff8b94;
}

/* === REQUEST MODAL RESPONSIVE === */
@media (max-width: 540px) {
  .request-modal { padding: 16px; }
  .modal-card { max-height: 85vh; }
  .modal-header { padding: 16px 20px 14px; }
  .modal-search-wrap { padding: 12px 20px; }
  .song-item { padding: 10px 20px; }
}

/* === SOUNDBOARD === */
.btn-soundboard {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
  color: var(--brand-muted);
  padding: 10px 22px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  line-height: 1.4;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 32px;
}

.btn-soundboard:hover {
  color: var(--brand-primary);
  border-color: var(--brand-primary);
  background: rgba(108, 63, 194, 0.08);
}

.btn-soundboard svg { flex-shrink: 0; }

/* Clip grid inside soundboard modal */
.soundboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  padding: 20px 24px;
  overflow-y: auto;
  max-height: 60vh;
}

.clip-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 22px 16px;
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  color: var(--brand-muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  line-height: 1.3;
}

.clip-btn svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  color: var(--brand-muted);
  transition: var(--transition);
}

.clip-btn .icon-stop { display: none; }

.clip-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-text);
  background: rgba(108, 63, 194, 0.1);
}

.clip-btn:hover svg { color: var(--brand-primary); }

.clip-btn.playing {
  border-color: var(--brand-primary);
  background: rgba(108, 63, 194, 0.15);
  color: var(--brand-text);
}

.clip-btn.playing svg { color: var(--brand-primary); }
.clip-btn.playing .icon-play { display: none; }
.clip-btn.playing .icon-stop { display: block; }

/* Clip progress bar */
.clip-progress-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.2s, max-height 0.2s;
}

.clip-btn.playing .clip-progress-wrap {
  opacity: 1;
  max-height: 24px;
}

.clip-progress {
  flex: 1;
  height: 3px;
  background: var(--brand-border);
  border-radius: 2px;
  overflow: hidden;
}

.clip-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--brand-primary);
  border-radius: 2px;
  transition: width 0.1s linear;
}

.clip-elapsed,
.clip-remaining {
  font-size: 0.68rem;
  color: var(--brand-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  min-width: 28px;
  line-height: 1;
}

.clip-remaining { text-align: right; }

@media (max-width: 540px) {
  .soundboard-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); padding: 16px; }
}
