:root {
  --bg: #f8f7f3;
  --surface: #ffffff;
  --surface-muted: #f1efe9;
  --border: #e3dfd6;
  --border-strong: #cfc9bc;
  --text: #1c2430;
  --text-muted: #596373;
  --primary: #1b3b6f;
  --primary-hover: #142c54;
  --primary-soft: #eaf0fa;
  --accent: #b45309;
  --accent-soft: #fef3c7;
  --whatsapp: #15803d;
  --whatsapp-soft: #dcfce7;
  --danger: #b91c1c;
  --danger-soft: #fee2e2;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(28, 36, 48, 0.06);
  --shadow-md: 0 6px 20px rgba(28, 36, 48, 0.08);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding-bottom: 130px; /* espaço para o player fixo */
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
}

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Cabeçalho limpo e reverente */
.site-header {
  background: linear-gradient(180deg, #16315c 0%, #1b3b6f 100%);
  color: #ffffff;
  padding: 24px 0 28px;
  border-bottom: 3px solid #d97706;
}

.header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand-title {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-subtitle {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.98rem;
  max-width: 540px;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  transition: background 0.15s ease;
}

.header-btn:hover {
  background: rgba(255, 255, 255, 0.24);
}

/* Barra de Busca e Filtros */
.search-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-top: -18px;
  box-shadow: var(--shadow-md);
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
}

.search-input {
  width: 100%;
  padding: 13px 42px 13px 44px;
  font-size: 1.02rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: #fcfbf9;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(27, 59, 111, 0.14);
}

.clear-search-btn {
  position: absolute;
  right: 10px;
  background: var(--surface-muted);
  border: none;
  border-radius: 999px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  display: none;
  align-items: center;
  justify-content: center;
}

.filters-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.year-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.city-select {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  min-width: 185px;
  cursor: pointer;
}

/* Banner Continuar Ouvindo */
.resume-banner {
  margin-top: 18px;
  background: var(--primary-soft);
  border: 1px solid #c5d6f0;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.resume-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.resume-btn {
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

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

/* Lista de Conferências */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 12px;
}

.section-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.results-count {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.conferences-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.conf-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.conf-card.featured {
  border: 1.5px solid #d97706;
  box-shadow: var(--shadow-md);
}

.conf-header {
  width: 100%;
  background: transparent;
  border: none;
  text-align: left;
  padding: 18px 20px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.conf-header:hover {
  background: rgba(241, 239, 233, 0.45);
}

.conf-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.badge-latest {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-meta {
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

.conf-title {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--text);
}

.conf-theme {
  margin: 4px 0 0;
  font-size: 0.98rem;
  color: var(--text-muted);
}

.conf-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  padding-top: 4px;
}

.chevron {
  transition: transform 0.2s ease;
}

.conf-card.expanded .chevron {
  transform: rotate(180deg);
}

.conf-body {
  display: none;
  border-top: 1px solid var(--border);
  padding: 8px 16px 16px;
  background: #fdfcfa;
}

.conf-card.expanded .conf-body {
  display: block;
}

.conf-description {
  margin: 8px 4px 12px;
  font-size: 0.94rem;
  color: var(--text-muted);
}

.conf-actions-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 6px;
}

/* Linhas de Reunião / Áudio */
.track-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.track-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.15s, background 0.15s;
}

.track-item:hover {
  border-color: var(--border-strong);
}

.track-item.playing {
  background: var(--primary-soft);
  border-color: var(--primary);
}

.track-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.play-circle-btn {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
  box-shadow: 0 2px 6px rgba(27, 59, 111, 0.22);
}

.play-circle-btn:hover {
  background: var(--primary-hover);
  transform: scale(1.04);
}

.track-item.playing .play-circle-btn {
  background: var(--accent);
}

.track-details {
  min-width: 0;
  flex: 1;
}

.track-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text);
}

.track-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 3px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.bible-tag {
  background: #eef2ff;
  color: #3730a3;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
}

.saved-progress-tag {
  color: var(--accent);
  font-weight: 600;
}

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

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 600;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.action-btn:hover {
  background: var(--surface-muted);
}

.action-btn.whatsapp {
  color: var(--whatsapp);
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.action-btn.whatsapp:hover {
  background: var(--whatsapp-soft);
}

/* Estado vazio */
.empty-state {
  text-align: center;
  padding: 44px 20px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}

/* Player Fixo no Rodapé (Sticky Player) */
.sticky-player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #13294b;
  color: #ffffff;
  border-top: 2px solid #d97706;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.22);
  z-index: 100;
  transform: translateY(110%);
  transition: transform 0.25s ease;
}

.sticky-player.visible {
  transform: translateY(0);
}

.player-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 12px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.player-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.player-track-title {
  font-weight: 700;
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-conf-name {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.76);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.ctrl-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  height: 38px;
  padding: 0 12px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.ctrl-btn.main-play {
  width: 44px;
  height: 44px;
  padding: 0;
  background: #f59e0b;
  color: #13294b;
  border: none;
}

.ctrl-btn.main-play:hover {
  background: #fbbf24;
}

.player-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.time-label {
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.85);
  min-width: 42px;
}

.seek-slider {
  flex: 1;
  accent-color: #f59e0b;
  height: 6px;
  cursor: pointer;
}

/* Painel Admin */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 20px;
}

.card-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.card-box h2 {
  margin: 0 0 6px;
  font-size: 1.25rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

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

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.field input,
.field select,
.field textarea {
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.96rem;
  font-family: inherit;
  background: #fcfbf9;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
}

.dropzone {
  border: 2px dashed var(--primary);
  background: var(--primary-soft);
  border-radius: var(--radius-md);
  padding: 28px 18px;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 12px;
}

.dropzone.dragover {
  background: #dbeafe;
}

.primary-submit-btn {
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

.primary-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.upload-queue {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.queue-item {
  background: #fcfbf9;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: grid;
  grid-template-columns: 64px 1fr 180px auto;
  gap: 10px;
  align-items: center;
}

.progress-bar-wrap {
  height: 8px;
  background: var(--surface-muted);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-bar-fill {
  height: 100%;
  background: var(--whatsapp);
  width: 0%;
  transition: width 0.2s ease;
}

.status-banner {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  margin-top: 14px;
  display: none;
}

.status-banner.success {
  display: block;
  background: var(--whatsapp-soft);
  color: var(--whatsapp);
}

.status-banner.error {
  display: block;
  background: var(--danger-soft);
  color: var(--danger);
}

.danger-btn {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid #fecaca;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 640px) {
  .track-item {
    flex-direction: column;
    align-items: stretch;
  }

  .track-actions {
    justify-content: flex-end;
    border-top: 1px solid var(--surface-muted);
    padding-top: 10px;
  }

  .action-btn {
    flex: 1;
    justify-content: center;
  }

  .player-top {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .player-controls {
    justify-content: space-between;
  }

  .queue-item {
    grid-template-columns: 1fr;
  }
}
