/* ─── PÁGINA DE AULA ─────────────────────────────── */

.btn-back {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.15s;
  cursor: pointer;
}

.btn-back:hover { color: var(--text); }

.aula-nav-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-nav-top {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r999);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.btn-nav-top:hover {
  color: var(--text);
  border-color: var(--border-hi);
  background: var(--bg-elevated);
}

.btn-nav-top:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background: transparent;
}

.btn-nav-top--next {
  color: var(--green);
  border-color: var(--green-line);
  background: var(--green-dim);
}

.btn-nav-top--next:hover {
  filter: brightness(1.1);
  color: var(--green);
}

/* ─── LAYOUT ─────────────────────────────────────── */

.aula-main {
  flex: 1;
  padding-bottom: 72px;
}

.aula-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 28px 0;
  display: grid;
  grid-template-columns: 1fr 300px;
  grid-template-rows: auto 1fr;
  gap: 0 24px;
}

/* Wrapper coluna do player */
.player-col {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
}

/* ─── NAV ACIMA DO PLAYER ────────────────────────── */

.aula-nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

/* Player ocupa toda a primeira coluna */
.player-box {
  grid-column: unset;
  grid-row: unset;
  background: #000;
  border-radius: var(--r12);
  /* overflow: hidden removido — bloqueia o fullscreen do vturb */
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  /* clip-path preserva o arredondamento sem quebrar fullscreen */
  clip-path: inset(0 round var(--r12));
}

.player-box vturb-smartplayer {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}

/* Fullscreen: remove clip e border-radius pra ocupar a tela toda */
.player-box:fullscreen,
.player-box:-webkit-full-screen,
.player-box vturb-smartplayer:fullscreen,
.player-box vturb-smartplayer:-webkit-full-screen {
  clip-path: none;
  border-radius: 0;
  width: 100vw !important;
  height: 100vh !important;
  aspect-ratio: unset;
}

/* Info abaixo do player */
.aula-info {
  grid-column: 1;
  grid-row: 2;
  padding: 24px 0 0;
}

.aula-info-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.aula-eyebrow {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 4px;
}

.aula-title {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.aula-tag-done {
  flex-shrink: 0;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--r999);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--green-dim);
  border: 1px solid var(--green-line);
  color: var(--green);
  display: flex;
  align-items: center;
  white-space: nowrap;
  margin-top: 4px;
}

.aula-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 24px;
}

.aula-desc strong {
  color: var(--text);
  font-weight: 600;
}

/* ─── DESCRIÇÃO DA AULA ──────────────────────────── */

.aula-desc {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.desc-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-mid);
  border-radius: var(--r8);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.desc-link:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--border-hi);
  transform: translateY(-1px);
}

.desc-link--support {
  border-color: rgba(34,197,94,0.2);
  color: var(--green);
}

.desc-link--support:hover {
  background: var(--green-dim);
  border-color: var(--green-line);
}

/* ─── CARD TELEGRAM ──────────────────────────────── */

.tg-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: linear-gradient(135deg, #1a73e8 0%, #1565c0 50%, #0d47a1 100%);
  border-radius: var(--r12);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s var(--ease), filter 0.2s var(--ease);
  box-shadow: 0 8px 28px rgba(36,129,204,0.4), 0 2px 8px rgba(0,0,0,0.3);
}

.tg-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 60%);
  pointer-events: none;
}

.tg-card:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.tg-card:active { transform: scale(0.99); }

.tg-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: tg-pulse 2.4s ease-in-out infinite;
}

.tg-card-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tg-card-title {
  font-size: 0.9375rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

.tg-card-sub {
  font-size: 0.775rem;
  color: rgba(255,255,255,0.75);
}

.tg-card > svg {
  color: rgba(255,255,255,0.7);
  flex-shrink: 0;
}

@keyframes tg-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.3); }
  50%       { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
}

/* ─── CARD DE CUPOM ──────────────────────────────── */

.cupom-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 20px 14px;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 40%, #dc2626 100%);
  border-radius: var(--r12);
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s var(--ease), filter 0.2s var(--ease);
  box-shadow: 0 8px 32px rgba(249,115,22,0.35), 0 2px 8px rgba(0,0,0,0.4);
}

.cupom-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 60%);
  pointer-events: none;
}

.cupom-card:hover {
  transform: translateY(-2px) scale(1.01);
  filter: brightness(1.08);
}

.cupom-card:active {
  transform: scale(0.99);
}

.cupom-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--r999);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  text-transform: uppercase;
}

.cupom-headline {
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
  line-height: 1.4;
  max-width: 340px;
}

.cupom-headline strong {
  color: #fff;
  font-weight: 800;
}

.cupom-code {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
  padding: 10px 16px;
  background: rgba(255,255,255,0.15);
  border: 2px dashed rgba(255,255,255,0.5);
  border-radius: var(--r8);
  backdrop-filter: blur(4px);
}

.cupom-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
}

.cupom-valor {
  font-size: 1.625rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
  animation: cupom-pulse 2.2s ease-in-out infinite;
}

.cupom-sub {
  font-size: 0.725rem;
  font-weight: 700;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.04em;
}

.cupom-cta {
  font-size: 0.8125rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
  padding: 7px 22px;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--r999);
  transition: background 0.15s;
}

.cupom-card:hover .cupom-cta {
  background: rgba(0,0,0,0.35);
}

@keyframes cupom-pulse {
  0%, 100% { transform: scale(1);   text-shadow: 0 2px 12px rgba(0,0,0,0.3); }
  50%       { transform: scale(1.04); text-shadow: 0 4px 20px rgba(0,0,0,0.5); }
}

/* ─── BOTÃO CONCLUIR ─────────────────────────────── */

.btn-concluir {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  margin-bottom: 20px;
  border-radius: var(--r8);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: var(--green-dim);
  border: 1px solid var(--green-line);
  color: var(--green);
  cursor: pointer;
  transition: background 0.15s, filter 0.15s, transform 0.1s;
}

.btn-concluir:hover {
  background: rgba(34,197,94,0.18);
  filter: brightness(1.05);
}

.btn-concluir:active { transform: scale(0.99); }

.btn-concluir:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ─── CTA TELEGRAM ───────────────────────────────── */

.cta-telegram {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  background: rgba(36,129,204,0.08);
  border: 1px solid rgba(36,129,204,0.22);
  border-radius: var(--r12);
  margin-bottom: 28px;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  cursor: pointer;
}

.cta-telegram:hover {
  background: rgba(36,129,204,0.14);
  border-color: rgba(36,129,204,0.38);
  transform: translateY(-1px);
}

.cta-telegram:active { transform: translateY(0); }

.cta-telegram-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r8);
  background: #2481cc;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cta-telegram-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cta-telegram-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.cta-telegram-sub {
  font-size: 0.775rem;
  color: var(--text-muted);
}

.cta-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ─── NAV ENTRE AULAS ────────────────────────────── */

.aula-nav-btns {
  display: flex;
  gap: 10px;
}

.btn-aula-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--r8);
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--bg-elevated);
  border: 1px solid var(--border-mid);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.btn-aula-nav:hover {
  border-color: var(--border-hi);
  color: var(--text);
}

.btn-aula-nav.primary {
  background: var(--green);
  border-color: var(--green);
  color: #0c1120;
  font-weight: 700;
}

.btn-aula-nav.primary:hover { filter: brightness(1.08); }

/* ─── SIDEBAR DE AULAS ───────────────────────────── */

.aula-sidebar {
  grid-column: 2;
  grid-row: 1 / 3;
  padding-top: 0;
}

.sidebar-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.sidebar-aulas {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-aula-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--r8);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.sidebar-aula-item:hover {
  background: var(--bg-elevated);
}

.sidebar-aula-item.active {
  background: var(--bg-elevated);
  border-color: var(--green-line);
}

.sidebar-aula-thumb {
  width: 52px;
  height: 36px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-elevated);
}

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

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

.sidebar-aula-num {
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-aula-status {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
  margin-top: 1px;
}

.sidebar-aula-status.done { color: var(--green); }

.sidebar-check {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green);
  color: #0c1120;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── RESPONSIVE ─────────────────────────────────── */

@media (max-width: 860px) {
  .aula-wrap {
    grid-template-columns: 1fr;
    padding: 16px 16px 0;
  }

  .player-box { grid-column: 1; }
  .aula-info  { grid-column: 1; }

  .aula-sidebar {
    grid-column: 1;
    grid-row: auto;
    padding-top: 28px;
    border-top: 1px solid var(--border);
    margin-top: 28px;
  }

  .sidebar-aulas {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
}

@media (max-width: 480px) {
  .aula-title { font-size: 1.125rem; }
  .aula-nav-btns { flex-direction: column; }
  .btn-aula-nav { justify-content: center; }
  .sidebar-aulas { grid-template-columns: 1fr; }
}

/* ─── COMENTÁRIOS ────────────────────────────────── */

.aula-comments {
  margin-bottom: 28px;
}

.comments-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.comments-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
}

.comments-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: var(--r999);
  background: var(--bg-elevated);
  border: 1px solid var(--border-mid);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.comment-thread {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.comment-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
}

.comment-reply {
  padding-left: 46px;
}

.comment-replies {
  display: flex;
  flex-direction: column;
  border-left: 2px solid var(--border);
  margin-left: 17px;
  padding-left: 2px;
}

.comment-avatar {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 800;
  color: #0c1120;
}

.comment-reply .comment-avatar {
  width: 28px;
  height: 28px;
  font-size: 0.75rem;
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.comment-name {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text);
}

.comment-time {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.comment-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 6px;
}

.comment-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.comment-likes {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ─── COMENTÁRIO DO AUTOR ────────────────────────── */

.comment-item--author {
  position: relative;
}

.comment-avatar--author {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green-dim);
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--green);
  flex-shrink: 0;
}

.comment-body--author {
  background: rgba(34,197,94,0.05);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: var(--r8);
  padding: 11px 14px;
}

.comment-name--author {
  color: var(--green) !important;
}

.comment-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: var(--r999);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.comment-badge--verified {
  background: rgba(34,197,94,0.15);
  color: var(--green);
  padding: 3px;
  border-radius: 50%;
}

.comment-badge--autor {
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.3);
  color: var(--green);
  text-transform: uppercase;
}

/* Quando qualquer elemento está em fullscreen, remove transforms dos pais */
:fullscreen .aula-wrap,
:-webkit-full-screen .aula-wrap {
  transform: none !important;
  filter: none !important;
}
