:root {
  --bg-base: #0b0f17;
  --bg-surface: #111827;
  --bg-elevated: #1e293b;
  --bg-hover: #263449;
  --border-subtle: #1f2937;
  --border-strong: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #38bdf8;
  --accent-hover: #0ea5e9;
  --accent-soft: rgba(56, 189, 248, 0.14);
  --emerald: #10b981;
  --emerald-soft: rgba(16, 185, 129, 0.15);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --player-height: 88px;
  --header-height: 64px;
  --sidebar-width: 280px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

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

html, body {
  height: 100%;
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
}

/* ---------------------------------------------------------------------------
   Top Header
   --------------------------------------------------------------------------- */
.top-header {
  height: var(--header-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  gap: 16px;
  flex-shrink: 0;
  z-index: 20;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.subtitle-meta {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Discover / iTunes Search / Direct RSS Bar */
.discover-bar {
  flex: 1;
  max-width: 580px;
}

.discover-input-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-base);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 4px 6px 4px 12px;
  gap: 8px;
  transition: border-color 0.15s ease;
}

.discover-input-wrap:focus-within {
  border-color: var(--accent);
}

.search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.discover-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 13.5px;
  outline: none;
  min-width: 0;
}

.discover-input-wrap input::placeholder {
  color: var(--text-muted);
}

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

/* ---------------------------------------------------------------------------
   Buttons & Controls
   --------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
  color: var(--text-primary);
}

.btn:disabled,
.disabled-link {
  opacity: 0.45;
  pointer-events: none;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn-primary {
  background: var(--accent);
  color: #06131f;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-hover);
}

.btn-accent {
  background: var(--accent-soft);
  border-color: rgba(56, 189, 248, 0.35);
  color: var(--accent);
}

.btn-accent:hover {
  background: rgba(56, 189, 248, 0.24);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.full-width {
  width: 100%;
}

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

.spinning {
  animation: spin 1s linear infinite;
}

/* ---------------------------------------------------------------------------
   iTunes Search Results Drawer
   --------------------------------------------------------------------------- */
.search-results-panel {
  background: #131c2e;
  border-bottom: 1px solid var(--border-strong);
  padding: 14px 20px;
  max-height: 330px;
  overflow-y: auto;
  z-index: 15;
}

.search-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.search-panel-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.search-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.search-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px;
}

.search-card img {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-elevated);
  flex-shrink: 0;
}

.search-card-info {
  flex: 1;
  min-width: 0;
}

.search-card-title {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-card-author {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-card-genre {
  font-size: 11px;
  color: var(--text-muted);
}

/* ---------------------------------------------------------------------------
   Main Workspace Layout (Sidebar + Content)
   --------------------------------------------------------------------------- */
.main-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex-shrink: 0;
  padding: 14px 10px;
  gap: 18px;
}

.sidebar-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 6px 8px;
}

.sidebar-heading {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 0 8px 6px 8px;
}

.sidebar-heading-row .sidebar-heading {
  padding: 0;
}

.nav-list,
.podcast-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-item,
.podcast-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  transition: background 0.12s ease, color 0.12s ease;
  gap: 8px;
}

.nav-item:hover,
.podcast-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.nav-item.active,
.podcast-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.nav-label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}

.podcast-thumb {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  object-fit: cover;
  background: var(--bg-elevated);
  flex-shrink: 0;
}

.podcast-item-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}

.podcast-item-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.delete-podcast-btn {
  opacity: 0;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 12px;
}

.podcast-item:hover .delete-podcast-btn {
  opacity: 1;
}

.delete-podcast-btn:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.12);
}

.badge {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
}

.nav-item.active .badge,
.podcast-item.active .badge {
  background: rgba(56, 189, 248, 0.25);
  color: var(--accent);
}

.badge-amber {
  background: var(--amber-soft);
  color: var(--amber);
}

/* ---------------------------------------------------------------------------
   Main Episode Feed Area
   --------------------------------------------------------------------------- */
.content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-base);
}

.feed-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(17, 24, 39, 0.6);
  gap: 16px;
  flex-wrap: wrap;
}

.feed-title-group {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.feed-title-group h2 {
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.episode-count-badge {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.filter-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Toggle Switch ("New / Unplayed Only") */
.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.toggle-switch input {
  display: none;
}

.toggle-slider {
  width: 36px;
  height: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  position: relative;
  transition: all 0.2s ease;
}

.toggle-slider::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: transform 0.2s ease, background 0.2s ease;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.toggle-switch input:checked + .toggle-slider::after {
  transform: translateX(16px);
  background: var(--accent);
}

.toggle-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.episode-filter-box input {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  width: 190px;
}

.episode-filter-box input:focus {
  border-color: var(--accent);
}

/* Toast Banner */
.toast-banner {
  margin: 10px 22px 0 22px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border-left: 3px solid var(--accent);
  color: var(--text-primary);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toast-banner.error {
  border-left-color: var(--danger);
  background: rgba(239, 68, 68, 0.12);
}

/* Episode List */
.episodes-container {
  flex: 1;
  overflow-y: auto;
  padding: 14px 22px 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.episode-row {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.episode-row:hover {
  border-color: var(--border-strong);
}

.episode-row.playing {
  border-color: var(--accent);
  background: rgba(56, 189, 248, 0.05);
}

.episode-row.played {
  opacity: 0.68;
}

.episode-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ep-play-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.ep-play-btn:hover,
.episode-row.playing .ep-play-btn {
  background: var(--accent);
  color: #06131f;
  border-color: var(--accent);
}

.ep-artwork {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-elevated);
  flex-shrink: 0;
}

.ep-info {
  flex: 1;
  min-width: 0;
}

.ep-meta-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 2px;
  flex-wrap: wrap;
}

.ep-podcast-name {
  font-weight: 600;
  color: var(--accent);
}

.ep-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  line-height: 1.35;
}

.ep-title:hover {
  color: var(--accent);
}

.ep-progress-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
}

.ep-played-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--emerald-soft);
  color: var(--emerald);
}

.ep-unplayed-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.ep-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ep-toggle-played-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.ep-toggle-played-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
  border-color: var(--accent);
}

.ep-toggle-played-btn.is-played {
  background: var(--emerald-soft);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--emerald);
}

.ep-toggle-played-btn.is-played:hover {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.5);
  color: var(--amber);
}

.ep-download-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.ep-download-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.ep-description {
  font-size: 13px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-subtle);
  padding-top: 8px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.ep-description a {
  color: var(--accent);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ---------------------------------------------------------------------------
   Persistent Bottom Web Player
   --------------------------------------------------------------------------- */
.player-bar {
  height: var(--player-height);
  background: #0d1320;
  border-top: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 20px;
  flex-shrink: 0;
  z-index: 30;
}

/* Player Left: Artwork + Title */
.player-now-playing {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 28%;
  min-width: 200px;
}

.player-artwork {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

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

.player-episode-title {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-sub-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.player-podcast-title {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sync-badge {
  font-size: 10.5px;
  color: var(--emerald);
  font-weight: 600;
  flex-shrink: 0;
}

/* Player Center: Transport & Scrubber */
.player-center {
  flex: 1;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.transport-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.transport-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.15s ease;
}

.transport-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.transport-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.play-main-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: #06131f;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
}

.play-main-btn:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: scale(1.04);
}

.play-main-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.timeline-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}

.time-label {
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  min-width: 44px;
  text-align: center;
}

.seek-slider,
.speed-slider,
.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 999px;
  background: var(--bg-elevated);
  outline: none;
  cursor: pointer;
}

.seek-slider {
  flex: 1;
}

.seek-slider::-webkit-slider-thumb,
.speed-slider::-webkit-slider-thumb,
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

/* Player Right: Granular Speed + Volume + Download */
.player-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  width: 28%;
  min-width: 220px;
}

.speed-control-group {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: visible;
}

.speed-step-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 700;
  padding: 5px 9px;
  cursor: pointer;
  line-height: 1;
}

.speed-step-btn:hover {
  color: var(--accent);
  background: var(--bg-elevated);
}

.speed-badge-btn {
  background: transparent;
  border-left: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  border-top: none;
  border-bottom: none;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 5px 10px;
  min-width: 48px;
  cursor: pointer;
}

.speed-badge-btn:hover {
  background: var(--accent-soft);
}

/* Popovers (Granular Speed Slider & Skip Config) */
.skip-config-wrapper {
  position: relative;
}

.popover {
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
  z-index: 50;
}

.speed-popover {
  width: 250px;
}

.skip-popover {
  width: 210px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

.popover-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.popover-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.speed-readout {
  font-size: 14px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.speed-slider {
  width: 100%;
  margin: 6px 0;
}

.speed-scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.speed-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.speed-chip {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: 4px;
  padding: 4px 0;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.speed-chip:hover,
.speed-chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.skip-config-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0;
  font-size: 12px;
}

.skip-config-row input {
  width: 64px;
  background: var(--bg-base);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  color: var(--text-primary);
  padding: 4px 6px;
  text-align: center;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 6px;
}

.volume-slider {
  width: 72px;
}

.text-muted {
  color: var(--text-muted);
}

.text-xs {
  font-size: 11px;
}

.mobile-only {
  display: none;
}

/* ---------------------------------------------------------------------------
   Authentication & Credentials Modals
   --------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 18, 0.88);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

.auth-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.auth-header-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.auth-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.auth-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
}

.auth-error {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  font-size: 12.5px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-field input {
  background: var(--bg-base);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
}

.form-field input:focus {
  border-color: var(--accent);
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

/* Responsive Adjustments */
@media (max-width: 900px) {
  .hide-md {
    display: none;
  }
  .sidebar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 25;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .mobile-only {
    display: inline-flex;
  }
  .player-now-playing {
    width: 24%;
    min-width: 140px;
  }
  .player-right {
    width: auto;
    min-width: auto;
  }
}

@media (max-width: 640px) {
  .hide-sm {
    display: none;
  }
  .top-header {
    flex-wrap: wrap;
    height: auto;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px 12px;
    gap: 8px;
  }
  .brand-group {
    min-width: 0;
    gap: 8px;
  }
  .subtitle-meta {
    display: none;
  }
  .header-actions {
    gap: 4px;
  }
  .header-actions .btn {
    padding: 6px 8px;
  }
  .discover-bar {
    order: 3;
    max-width: 100%;
    flex-basis: 100%;
  }
  .feed-toolbar {
    padding: 10px 12px;
    gap: 8px;
  }
  .filter-controls {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
  .episode-filter-box {
    flex: 1;
  }
  .episode-filter-box input {
    width: 100%;
  }
  .episodes-container {
    padding: 10px 12px 18px 12px;
  }
  .episode-row {
    padding: 10px 12px;
  }
  .episode-main {
    align-items: flex-start;
    gap: 10px;
  }
  .ep-artwork {
    display: none;
  }
  .ep-actions {
    gap: 5px;
    align-self: flex-start;
  }
  /* Mobile 2-Row Persistent Bottom Player */
  .player-bar {
    height: auto;
    flex-wrap: wrap;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)) 12px;
    gap: 8px 10px;
  }
  .player-now-playing {
    order: 1;
    flex: 1;
    width: auto;
    min-width: 0;
    gap: 9px;
  }
  .player-artwork {
    width: 38px;
    height: 38px;
  }
  .player-episode-title {
    font-size: 12.5px;
  }
  .player-podcast-title {
    font-size: 11px;
  }
  .player-right {
    order: 2;
    width: auto;
    min-width: 0;
    gap: 6px;
  }
  .player-center {
    order: 3;
    flex-basis: 100%;
    max-width: 100%;
    gap: 6px;
  }
  .transport-controls {
    gap: 12px;
  }
  .play-main-btn {
    width: 38px;
    height: 38px;
  }
  .speed-popover {
    right: 0;
    left: auto;
    width: 235px;
  }
  .skip-popover {
    left: auto;
    right: -40px;
    transform: none;
  }
}
