/* ==========================================================================
   TASK ACADEMY QUALITOR - DESIGN SYSTEM & TELA PRINCIPAL (TOUR V3)
   Design Source: tour_v3.png / banner.png
   Aesthetic: Corporate Modern / High Performance / WCAG AAA Compliant
   ========================================================================== */

:root {
  /* Brand Burgundy Colors */
  --primary: #841b17;
  --primary-hover: #6a1310;
  --primary-light: #fef2f2;
  --primary-border: #fca5a5;
  --primary-glow: rgba(132, 27, 23, 0.15);

  /* Surface & Background Tiers */
  --bg-page: #f8fafc;
  --surface-card: #ffffff;
  --surface-subtle: #f1f5f9;
  --border-subtle: #e2e8f0;
  --border-card: #e5e9f0;

  /* Typography Colors */
  --text-main: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  /* Semantic Status Colors */
  --status-success: #15803d;
  --status-success-bg: #dcfce7;
  --status-success-border: #86efac;

  --status-in-progress: #1d4ed8;
  --status-in-progress-bg: #eff6ff;
  --status-in-progress-border: #bfdbfe;

  --status-pending: #64748b;
  --status-pending-bg: #f1f5f9;
  --status-pending-border: #e2e8f0;

  --circle-empty: #cbd5e1;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  --shadow-card: 0 4px 6px -1px rgba(15, 23, 42, 0.04), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
  --shadow-hover: 0 10px 15px -3px rgba(132, 27, 23, 0.07), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
  --shadow-modal: 0 20px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.05);

  /* Geometry & Rhythm */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Fonts */
  --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ==========================================================================
   DARK THEME DESIGN TOKENS
   ========================================================================== */
[data-theme="dark"] {
  --primary: #e05252;
  --primary-hover: #ef4444;
  --primary-light: rgba(224, 82, 82, 0.15);
  --primary-border: rgba(224, 82, 82, 0.35);
  --primary-glow: rgba(224, 82, 82, 0.25);

  --bg-page: #090e17;
  --surface-card: #111a29;
  --surface-subtle: #19253a;
  --border-subtle: #233450;
  --border-card: #1c2b43;

  --text-main: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #8ea1bc;
  --text-light: #5f7494;

  --status-success: #4ade80;
  --status-success-bg: rgba(74, 222, 128, 0.15);
  --status-success-border: rgba(74, 222, 128, 0.3);

  --status-in-progress: #60a5fa;
  --status-in-progress-bg: rgba(96, 165, 250, 0.15);
  --status-in-progress-border: rgba(96, 165, 250, 0.3);

  --status-pending: #94a3b8;
  --status-pending-bg: rgba(148, 163, 184, 0.1);
  --status-pending-border: #233450;

  --circle-empty: #475569;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.25);
  --shadow-hover: 0 10px 22px -3px rgba(0, 0, 0, 0.55);
  --shadow-modal: 0 25px 35px -5px rgba(0, 0, 0, 0.7);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   TOPO LINHA 1: BARRA BRANCA SUPERIOR (NAVBAR)
   ========================================================================== */
.top-navbar-strip {
  background-color: var(--surface-card);
  border-bottom: 1px solid var(--border-subtle);
  width: 100%;
  position: relative;
  z-index: 50;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.top-navbar-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 100%;
}

.navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  outline-offset: 4px;
}

.navbar-logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
}

.nav-tab-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 64px;
  padding: 0 14px;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-tab-item:hover {
  color: var(--primary);
  background-color: var(--primary-light);
}

.nav-tab-item.is-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 700;
}

.nav-tab-item .nav-icon {
  flex-shrink: 0;
  transition: stroke 0.2s ease;
}

.nav-tab-item.is-active .nav-icon {
  stroke: var(--primary);
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Botão de Tema */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background-color: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  outline-offset: 3px;
}

.theme-toggle-btn:hover {
  background-color: var(--border-subtle);
  color: var(--text-main);
  border-color: var(--text-light);
}

.theme-icon-sun,
.theme-icon-moon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.theme-icon-moon {
  display: none;
}

[data-theme="dark"] .theme-icon-sun {
  display: none;
}

[data-theme="dark"] .theme-icon-moon {
  display: block;
}

/* ==========================================================================
   TOPO LINHA 2: BANNER HERO COM banner.png DE FUNDO
   ========================================================================== */
.hero-banner-strip {
  width: 100%;
  /*
   * banner.png = 2064 x 512px (proporção ~4.03:1)
   * Para nunca recortar a ALTURA e permitir recorte apenas na LARGURA:
   *   - height fixo = largura do container / proporção da imagem
   *   - background-size: auto 100% → image fills container height, width crops as needed
   *   - background-position: right center → ancora à direita (preserva a foto e ícones Task)
   * Calculo: container max-width = 1380px → 1380 / 4.03 ≈ 342px
   * Para monitores mais largos, usamos 340px como referência segura.
   */
  height: 340px;
  background-color: #f8fafc;
  background-image: url('../banner.png');
  background-repeat: no-repeat;
  background-position: right center;
  background-size: auto 100%;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  position: relative;
}

[data-theme="dark"] .hero-banner-strip {
  background-image: linear-gradient(90deg, rgba(9, 14, 23, 0.96) 0%, rgba(9, 14, 23, 0.88) 55%, rgba(9, 14, 23, 0.35) 100%), url('../banner.png');
  background-color: #090e17;
  background-size: auto 100%;
}

.hero-banner-container {
  max-width: 1380px;
  margin: 0 auto;
  width: 100%;
  padding: 38px 24px;
  position: relative;
  z-index: 2;
}

.hero-banner-content {
  max-width: 620px;
}

.hero-pretitle {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #475569;
  margin-bottom: 8px;
}

[data-theme="dark"] .hero-pretitle {
  color: #94a3b8;
}

.hero-main-title {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.15;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

[data-theme="dark"] .hero-main-title {
  color: #ffffff;
}

.hero-subtitle {
  font-size: 15.5px;
  color: #334155;
  line-height: 1.5;
  font-weight: 400;
}

[data-theme="dark"] .hero-subtitle {
  color: #cbd5e1;
}

/* ==========================================================================
   CORPO PRINCIPAL: GRID DE CONTEÚDO
   ========================================================================== */
.app-main-layout {
  flex: 1;
  padding: 28px 0 44px;
}

.app-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.main-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 1fr);
  gap: 24px;
  align-items: start;
}

/* Cards Base */
.card {
  background-color: var(--surface-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

/* ==========================================================================
   COLUNA ESQUERDA: PLAYER WIDESCREEN E DETALHES
   ========================================================================== */
.video-column-wrapper {
  display: flex;
  flex-direction: column;
}

.player-main-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Proporção Widescreen 16:9 */
.player-aspect-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #000000;
  overflow: hidden;
}

/*
 * Facade do player: capa com thumbnail e botão de play na marca, exibida antes
 * da reprodução. O iframe do YouTube só é injetado no clique de play — assim a
 * interface do YouTube (chip "Watch on YouTube", título flutuante) não aparece
 * na capa, independente do aspecto do vídeo.
 */
.player-facade {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  padding: 0;
  background-color: #000000;
  cursor: pointer;
  display: block;
  text-align: center;
  /* acima dos overlays do YouTube (z 9-11): os patches só se aplicam durante a
     reprodução, quando o facade está oculto */
  z-index: 12;
}

.player-facade.is-hidden {
  display: none;
}

.facade-thumb-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.facade-shade {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.05) 0%, rgba(15, 23, 42, 0.35) 100%);
}

.facade-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 76px;
  height: 54px;
  border: none;
  border-radius: var(--radius-md);
  background-color: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(132, 27, 23, 0.45);
  transition: transform 0.2s ease, background-color 0.2s ease;
  outline-offset: 4px;
}

.player-facade:hover .facade-play-btn {
  background-color: var(--primary-hover);
  transform: translate(-50%, -50%) scale(1.06);
}

.player-widescreen-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.player-widescreen-iframe.is-hidden {
  display: none;
}

/*
 * Barra de controles própria: o embed é criado com controls=0, o que remove
 * todo o chrome do YouTube (ícone "copiar link", logo, pílula de fundo, chips).
 * Esta barra assume play/pause, progresso, tempo, mudo e tela cheia via
 * postMessage (comandos do IFrame API). Fica sobre a borda inferior do vídeo
 * com degradê, padrão de players de vídeo.
 */
.cc-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.85) 100%);
}

.cc-bar.is-hidden {
  display: none;
}

.cc-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: opacity 0.15s ease;
  outline-offset: 2px;
}

.cc-btn:hover {
  opacity: 0.8;
}

.cc-btn svg.is-hidden {
  display: none;
}

.cc-time {
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cc-seek {
  flex: 1;
  position: relative;
  height: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  border-radius: var(--radius-full);
  outline-offset: 2px;
}

.cc-seek::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 5px;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.35);
}

.cc-seek-fill {
  position: relative;
  height: 5px;
  border-radius: var(--radius-full);
  background-color: var(--primary);
  width: 0%;
  z-index: 1;
}

/*
 * Overlay 2: cobre a área principal do vídeo (acima da barra de controles).
 * Intercepta o clique direito (menu "Copiar link" / "Assistir no YouTube") nessa área.
 * pointer-events: none → cliques normais passam para o iframe (play/pause nativo).
 * O bloqueio do menu é feito via JS (contextmenu event no container pai).
 */
.yt-context-blocker {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 46px;
  /* acima da barra de controles do YouTube */
  z-index: 9;
  background: transparent;
  pointer-events: none;
  /* não bloqueia cliques normais (play/pause) */
  cursor: default;
  -webkit-user-select: none;
  user-select: none;
}

/* Painel Abaixo do Player */
.player-bottom-panel {
  padding: 22px 24px 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

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

.module-order-tag {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
}

.current-module-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 6px;
}

.current-module-description {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Painel de Ações e Status */
.player-actions-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
  flex-shrink: 0;
}

/* Pílula de Status Dinâmica e Clicável */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  outline-offset: 2px;
}

.status-pill:hover {
  transform: translateY(-1px);
  filter: brightness(0.96);
  box-shadow: var(--shadow-sm);
}

.status-pill.status-completed {
  background-color: var(--status-success-bg);
  color: var(--status-success);
  border-color: var(--status-success-border);
}

.status-pill.status-in-progress {
  background-color: var(--status-in-progress-bg);
  color: var(--status-in-progress);
  border-color: var(--status-in-progress-border);
}

.status-pill.status-pending {
  background-color: var(--status-pending-bg);
  color: var(--status-pending);
  border-color: var(--status-pending-border);
}

.status-pill-icon {
  flex-shrink: 0;
}

/* Pulso animado para "Em andamento" */
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--status-in-progress);
  animation: pulse-ring 1.8s infinite ease-out;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    opacity: 0.9;
    box-shadow: 0 0 0 0 rgba(29, 78, 216, 0.4);
  }

  70% {
    transform: scale(1.05);
    opacity: 1;
    box-shadow: 0 0 0 6px rgba(29, 78, 216, 0);
  }

  100% {
    transform: scale(0.95);
    opacity: 0.9;
    box-shadow: 0 0 0 0 rgba(29, 78, 216, 0);
  }
}

/* Botões de Navegação Anterior e Próximo */
.player-nav-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  outline-offset: 3px;
  font-family: var(--font-body);
}

.btn-nav-prev {
  background-color: var(--surface-card);
  color: #475569;
  border: 1.5px solid #cbd5e1;
}

[data-theme="dark"] .btn-nav-prev {
  background-color: var(--surface-subtle);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-nav-prev:hover:not(:disabled) {
  background-color: var(--surface-subtle);
  border-color: #94a3b8;
  color: var(--text-main);
}

.btn-nav-prev:disabled,
.btn-nav-prev.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-nav-next {
  background-color: var(--primary);
  color: #ffffff;
  border: 1.5px solid var(--primary);
  box-shadow: 0 2px 5px rgba(132, 27, 23, 0.25);
}

.btn-nav-next:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(132, 27, 23, 0.3);
}

/* ==========================================================================
   COLUNA DIREITA: CARD DE CONTEÚDO DA TRILHA
   ========================================================================== */
.playlist-column-wrapper {
  display: flex;
  flex-direction: column;
}

.playlist-main-card {
  padding: 22px 20px;
}

/* Cabeçalho do Card */
.playlist-header {
  margin-bottom: 16px;
}

.playlist-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.playlist-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.playlist-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #991b1b, #841b17);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(132, 27, 23, 0.2);
}

.playlist-heading {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.completion-pill-green {
  background-color: var(--status-success-bg);
  color: var(--status-success);
  border: 1px solid var(--status-success-border);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* Barra de Progresso da Playlist */
.playlist-progress-block {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 2px;
}

.progress-label-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

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

.progress-track-wrapper {
  flex: 1;
  height: 6px;
  background-color: var(--border-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
  min-width: 110px;
}

.progress-fill-red {
  height: 100%;
  background-color: var(--primary);
  border-radius: var(--radius-full);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-percent-val {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
  min-width: 36px;
  text-align: right;
}

/* Lista de Módulos (Playlist) */
.modules-playlist-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
}

.module-playlist-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-card);
  background-color: var(--surface-card);
  cursor: pointer;
  transition: all 0.2s ease;
  outline-offset: 2px;
}

.module-playlist-item:hover {
  background-color: var(--surface-subtle);
  border-color: #cbd5e1;
}

[data-theme="dark"] .module-playlist-item:hover {
  border-color: var(--text-light);
}

/* Módulo Ativo com Fundo Salmão/Avermelhado e Borda Vermelha */
.module-playlist-item.is-active {
  background-color: #fff5f5;
  border: 1.5px solid #f87171;
  box-shadow: 0 2px 8px rgba(132, 27, 23, 0.08);
}

[data-theme="dark"] .module-playlist-item.is-active {
  background-color: rgba(224, 82, 82, 0.12);
  border: 1.5px solid rgba(224, 82, 82, 0.5);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Miniatura do Vídeo */
.item-thumb-wrapper {
  position: relative;
  width: 105px;
  height: 62px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #1e293b;
  flex-shrink: 0;
}

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

.item-thumb-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.module-playlist-item:hover .item-thumb-overlay {
  transform: translate(-50%, -50%) scale(1.1);
  background-color: var(--primary);
}

/* Informações de Texto */
.item-text-info {
  flex: 1;
  min-width: 0;
}

.item-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Metadados e Círculo Clicável */
.item-meta-col {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  margin-left: auto;
}

.item-duration {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.item-check-btn {
  background: transparent;
  border: none;
  padding: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: transform 0.18s ease;
  outline-offset: 3px;
}

.item-check-btn:hover {
  transform: scale(1.2);
}

/* ==========================================================================
   RODAPÉ
   ========================================================================== */
.app-footer {
  border-top: 1px solid var(--border-subtle);
  background-color: var(--surface-card);
  padding: 20px 0;
  font-size: 13.5px;
  color: var(--text-muted);
}

.footer-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* ==========================================================================
   MODAIS
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.is-open {
  display: flex;
}

.modal-container {
  background-color: var(--surface-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: 540px;
  overflow: hidden;
  animation: modal-appear 0.22s ease-out;
}

@keyframes modal-appear {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.modal-close-btn:hover {
  background-color: var(--surface-subtle);
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.modal-body h4 {
  color: var(--text-main);
  margin-top: 14px;
  margin-bottom: 4px;
  font-size: 15px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
}

/* ==========================================================================
   RESPONSIVIDADE (TABLET / MOBILE)
   ========================================================================== */
@media (max-width: 1080px) {
  .main-content-grid {
    grid-template-columns: 1fr;
  }

  .hero-banner-strip {
    min-height: 240px;
    background-position: 85% center;
  }
}

@media (max-width: 768px) {
  .top-navbar-container {
    height: auto;
    padding: 12px 16px;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .navbar-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
  }

  .navbar-nav {
    flex-wrap: wrap;
    gap: 6px;
    height: auto;
  }

  .nav-tab-item {
    height: 40px;
    padding: 0 10px;
    border-bottom: none;
    border-radius: var(--radius-md);
  }

  .nav-tab-item.is-active {
    border-bottom: none;
    background-color: var(--primary-light);
  }

  .navbar-right {
    width: 100%;
    justify-content: flex-end;
  }

  .hero-banner-strip {
    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.88) 70%, rgba(255, 255, 255, 0.5) 100%), url('../banner.png');
    padding: 24px 0;
  }

  [data-theme="dark"] .hero-banner-strip {
    background-image: linear-gradient(90deg, rgba(9, 14, 23, 0.98) 0%, rgba(9, 14, 23, 0.92) 70%, rgba(9, 14, 23, 0.6) 100%), url('../banner.png');
  }

  .hero-main-title {
    font-size: 28px;
  }

  .player-bottom-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .player-actions-panel {
    align-items: stretch;
  }

  .player-nav-group {
    justify-content: space-between;
  }

  .btn-nav {
    flex: 1;
  }
}

/* ==========================================================================
   ACESSIBILIDADE: MOVIMENTO REDUZIDO
   Respeita usuários que desativam animações no sistema operacional.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .pulse-dot {
    animation: none;
    opacity: 1;
  }
}