/* Soundora — Spotify-inspired AI music app */
@import url("mobile.css");

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

:root {
  --bg: #0a0a0f;
  --bg-elevated: #12121a;
  --bg-highlight: #1a1a28;
  --sidebar: #050508;
  --text: #f5f5f7;
  --muted: #a1a1b5;
  --accent: #1db954;
  --accent-dim: #169c46;
  --accent-glow: rgba(29, 185, 84, 0.35);
  --purple: #a78bfa;
  --border: rgba(255, 255, 255, 0.08);
  --player-h: 90px;
  --sidebar-w: 240px;
  --mobile-header-h: 52px;
  --mobile-tab-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

html {
  -webkit-text-size-adjust: 100%;
}

html, body {
  min-height: 100%;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: "Outfit", system-ui, sans-serif;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

button, input, textarea, select {
  font: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: 1fr var(--player-h);
  height: 100vh;
  height: 100dvh;
  min-height: 0;
}

/* —— Desktop sidebar —— */
.sidebar {
  grid-row: 1 / 3;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  min-height: 0;
}

.sidebar-brand {
  font-family: "Space Grotesk", "Outfit", system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
  padding: 0 8px;
  text-decoration: none;
  display: block;
}

.sidebar-brand:hover {
  filter: brightness(1.1);
}

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; margin-bottom: 24px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  text-align: left;
  width: 100%;
  min-height: 44px;
}

.nav-item:hover, .nav-item.active { color: var(--text); background: var(--bg-highlight); }
.nav-item.active { color: var(--accent); }

.sidebar-stats {
  margin-top: auto;
  padding: 16px 12px;
  border-radius: 12px;
  background: var(--bg-highlight);
  border: 1px solid var(--border);
}

.sidebar-stats h4 {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}

.stat-row strong { color: var(--accent); }

.sidebar-user {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
  padding: 0 8px;
  word-break: break-all;
}

/* —— Mobile chrome (hidden on desktop) —— */
.mobile-header,
.mobile-stats,
.mobile-tabs {
  display: none;
}

.main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #1a1228 0%, var(--bg) 280px);
}

.main-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 24px 28px 120px;
}

.main-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.main-header h1 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.1;
}

.main-header p { color: var(--muted); font-size: 14px; margin-top: 6px; max-width: 42ch; }

.header-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s, filter 0.12s;
  min-height: 44px;
}

.btn:active { transform: scale(0.98); }
.btn-accent { background: var(--accent); color: #000; }
.btn-accent:hover { filter: brightness(1.08); }
.btn-accent:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-highlight); }

.create-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 32px;
}

.create-panel h2 { font-size: 18px; margin-bottom: 16px; }

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.field input, .field textarea, .field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
}

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

.style-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  min-height: 36px;
}

.chip.active { border-color: var(--accent); color: var(--accent); background: rgba(29, 185, 84, 0.1); }

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
  margin: 12px 0 18px;
  min-height: 44px;
}

.checkbox-row input { width: 20px; height: 20px; accent-color: var(--accent); }

.section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
}

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

.track-card {
  background: var(--bg-elevated);
  border-radius: 12px;
  padding: 14px;
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
  position: relative;
}

.track-card:hover { background: var(--bg-highlight); border-color: var(--border); }
.track-card.is-playing { border-color: var(--accent); }

.track-cover {
  aspect-ratio: 1;
  border-radius: 8px;
  background: linear-gradient(135deg, #2d1b4e, #0f766e);
  margin-bottom: 12px;
  overflow: hidden;
  position: relative;
}

.track-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.track-cover .placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 36px;
}

.play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.track-card:hover .play-overlay,
.track-card.is-playing .play-overlay { opacity: 1; }

.play-fab {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  border: none;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 8px 24px var(--accent-glow);
}

.track-card h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-card p {
  font-size: 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.status-pill {
  display: inline-block;
  margin-top: 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 99px;
  background: var(--bg);
  color: var(--muted);
}

.status-pill.processing { color: #fbbf24; }
.status-pill.completed { color: var(--accent); }
.status-pill.failed { color: #f87171; }

.track-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.track-download-btn {
  margin-left: auto;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.track-download-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(29, 185, 84, 0.08);
}

.track-download-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 16px;
  font-size: 14px;
}

.limit-contact-card {
  background: linear-gradient(145deg, rgba(29, 185, 84, 0.08), rgba(167, 139, 250, 0.1));
  border: 1px solid rgba(29, 185, 84, 0.35);
  border-radius: 16px;
  padding: 24px 22px;
  margin-bottom: 24px;
  text-align: center;
}

.limit-contact-card.hidden { display: none; }

.limit-contact-card--inline {
  margin-top: 20px;
  margin-bottom: 0;
  text-align: left;
}

.limit-contact-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.limit-contact-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.limit-contact-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
  max-width: 42ch;
  margin-left: auto;
  margin-right: auto;
}

.limit-contact-card--inline p { margin-left: 0; margin-right: 0; }

.limit-contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  max-width: 320px;
  margin: 0 auto;
}

.limit-contact-card--inline .limit-contact-list { margin: 0; }

.limit-contact-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.limit-contact-list span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.limit-contact-list a {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  word-break: break-all;
}

.track-card.is-processing {
  border-color: rgba(251, 191, 36, 0.45);
}

.track-progress {
  margin-top: 12px;
}

.track-progress-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #fbbf24;
  margin-bottom: 6px;
}

.track-progress-bar {
  height: 6px;
  border-radius: 99px;
  background: var(--bg);
  overflow: hidden;
  border: 1px solid var(--border);
}

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

.track-card .status-pill.processing {
  animation: pulseProcessing 1.6s ease-in-out infinite;
}

@keyframes pulseProcessing {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* —— Player —— */
.player-bar {
  grid-column: 2;
  background: #181818;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  min-height: var(--player-h);
}

.player-bar.hidden { display: none; }

.player-track {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.player-thumb {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  background: var(--bg-highlight);
  flex-shrink: 0;
  overflow: hidden;
}

.player-thumb img { width: 100%; height: 100%; object-fit: cover; }

.player-meta { min-width: 0; flex: 1; }

.player-meta h4 {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-meta p {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.control-btns { display: flex; align-items: center; gap: 16px; }

.control-btns button {
  background: none;
  border: none;
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  opacity: 0.85;
  min-width: 44px;
  min-height: 44px;
}

.control-btns button.play-main {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--text);
  color: #000;
  font-size: 16px;
}

.progress-wrap {
  width: 100%;
  max-width: 520px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}

.progress-wrap input[type="range"] {
  flex: 1;
  min-height: 28px;
  accent-color: var(--accent);
}

.player-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.player-actions .btn { min-height: 40px; padding: 8px 14px; }

/* Mobile-only play button in track row */
.player-track-actions {
  display: none;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.player-track-actions button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--text);
  color: #000;
  font-size: 16px;
  cursor: pointer;
}

.toast {
  position: fixed;
  bottom: calc(var(--player-h) + 16px);
  left: 50%;
  transform: translateX(-50%);
  background: #282828;
  color: var(--text);
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  z-index: 300;
  max-width: min(90vw, 420px);
  text-align: center;
}

.toast.error { border: 1px solid #f87171; }
.toast.hidden { display: none; }

.auth-gate {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 400;
  padding: 24px;
  padding-top: calc(24px + var(--safe-top));
  padding-bottom: calc(24px + var(--safe-bottom));
}

.auth-gate.hidden { display: none; }

.auth-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 24px;
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.auth-card h2 { margin-bottom: 8px; font-size: 22px; }
.auth-card p { color: var(--muted); margin-bottom: 20px; font-size: 14px; }
.auth-card .btn { width: 100%; }

/* Hide site footer inside full-screen app on phones */
@media (max-width: 900px) {
  #site-footer-root { display: none; }
}

/* —— Mobile layout —— */
@media (max-width: 900px) {
  :root {
    --player-h: auto;
  }

  .app-shell {
    display: block;
    position: relative;
    min-height: 100dvh;
    padding-top: calc(var(--mobile-header-h) + var(--safe-top));
    padding-bottom: calc(var(--mobile-tab-h) + var(--safe-bottom));
  }

  .sidebar { display: none; }

  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 120;
    height: calc(var(--mobile-header-h) + var(--safe-top));
    padding: var(--safe-top) 16px 0;
    background: rgba(5, 5, 8, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
  }

  .mobile-brand {
    font-family: "Space Grotesk", "Outfit", system-ui, sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    min-height: 44px;
    display: flex;
    align-items: center;
    text-decoration: none;
  }

  .mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-icon-btn {
    border: 1px solid var(--border);
    background: var(--bg-highlight);
    color: var(--muted);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    min-height: 36px;
    cursor: pointer;
  }

  .mobile-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 16px 0;
    margin-bottom: -8px;
  }

  .mobile-stat-pill {
    font-size: 12px;
    color: var(--muted);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 12px;
  }

  .mobile-stat-pill strong { color: var(--accent); }

  .main {
    min-height: calc(100dvh - var(--mobile-header-h) - var(--mobile-tab-h) - var(--safe-top) - var(--safe-bottom));
  }

  .main-scroll {
    padding: 16px 16px 24px;
    padding-bottom: calc(100px + var(--safe-bottom));
  }

  .main-header {
    margin-bottom: 20px;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .main-header h1 { font-size: 26px; }
  .main-header p { font-size: 13px; }

  .header-actions {
    width: 100%;
    flex-direction: column;
  }

  .header-actions .btn { width: 100%; justify-content: center; }

  .create-panel {
    padding: 18px 16px;
    margin-bottom: 24px;
  }

  .create-panel .btn-accent { width: 100%; }

  .track-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .track-card { padding: 10px; }

  .play-overlay { opacity: 1; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.55)); align-items: flex-end; justify-content: flex-end; padding: 10px; }
  .play-fab { width: 40px; height: 40px; font-size: 16px; }

  .player-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--mobile-tab-h) + var(--safe-bottom));
    z-index: 110;
    grid-column: unset;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px 12px;
    background: rgba(24, 24, 24, 0.96);
    backdrop-filter: blur(14px);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35);
  }

  .player-track {
    width: 100%;
    padding-right: 0;
  }

  .player-track-actions { display: flex; }

  .player-controls {
    width: 100%;
  }

  .player-controls .control-btns { display: none; }

  .progress-wrap {
    max-width: none;
    font-size: 10px;
  }

  .player-actions {
    position: static;
    flex-shrink: 0;
  }

  .player-actions .btn {
    padding: 8px 12px;
    font-size: 11px;
    min-height: 36px;
    white-space: nowrap;
  }

  /* Row: cover + meta + play + download */
  .player-bar:not(.hidden) {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
  }

  .player-track { grid-column: 1; grid-row: 1; }
  .player-actions { grid-column: 2; grid-row: 1; align-self: center; }
  .player-controls { grid-column: 1 / -1; grid-row: 2; }

  .mobile-tabs {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    height: calc(var(--mobile-tab-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: rgba(5, 5, 8, 0.96);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
  }

  .mobile-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: none;
    background: none;
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    min-height: 44px;
    padding: 6px 4px;
  }

  .mobile-tab span:first-child { font-size: 20px; line-height: 1; }

  .mobile-tab.active { color: var(--accent); }

  .toast {
    bottom: calc(var(--mobile-tab-h) + 80px + var(--safe-bottom));
    font-size: 13px;
    padding: 10px 16px;
  }

  .app-shell:has(.player-bar:not(.hidden)) .main-scroll {
    padding-bottom: calc(160px + var(--safe-bottom));
  }
}

.nav-item--packages {
  margin-top: 4px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
}

.nav-item--packages:hover,
.nav-item--packages:focus-visible {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--text);
}

@media (max-width: 380px) {
  .track-grid {
    grid-template-columns: 1fr;
  }
}

@media (hover: none) {
  .track-card:hover { border-color: transparent; }
  .track-card.is-playing { border-color: var(--accent); }
}

/* —— Song packages modal —— */
/* Hidden for now — remove this block to re-enable */
.nav-item--packages,
#btnPackages,
.package-modal {
  display: none !important;
}

.package-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-top: max(20px, env(safe-area-inset-top));
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}

.package-modal.is-open,
.package-modal:not(.hidden) {
  display: flex;
}

.package-modal.hidden:not(.is-open) { display: none; }

body.package-modal-open { overflow: hidden; }

.package-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.package-modal__panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(90vh, 900px);
  overflow: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px 22px 22px;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.55);
  animation: packageIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes packageIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.package-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.package-modal__head h2 {
  font-family: "Space Grotesk", "Outfit", sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.package-modal__sub {
  font-size: 14px;
  color: var(--muted);
  max-width: 52ch;
  line-height: 1.5;
}

.package-modal__close {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s, background 0.2s;
}

.package-modal__close:hover {
  border-color: var(--accent);
  background: var(--bg-highlight);
}

.package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.package-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 18px 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.package-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 16px 40px rgba(29, 185, 84, 0.12);
  transform: translateY(-3px);
}

.package-card--featured {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 12%, transparent), var(--bg));
}

.package-card--pro {
  border-color: color-mix(in srgb, #79e0ff 40%, transparent);
  background: linear-gradient(160deg, rgba(46, 155, 255, 0.1), var(--bg));
}

.package-card__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #000;
}

.package-card--pro .package-card__badge {
  background: #2e9bff;
  color: #fff;
}

.package-card__songs {
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
}

.package-card__price {
  font-family: "Space Grotesk", sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
}

.package-card__per {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 4px;
}

.package-card__save {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 10px;
}

.package-card__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: auto;
  text-decoration: none;
  font-size: 12px;
  padding: 10px 14px;
}

.package-modal__foot {
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.package-modal__foot a {
  color: var(--accent);
  font-weight: 600;
}

@media (max-width: 640px) {
  .package-modal__panel { padding: 18px 16px 16px; }
  .package-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .package-card__price { font-size: 22px; }
}

@media (max-width: 420px) {
  .package-grid { grid-template-columns: 1fr; }
}
