/* ============================================================
   tutoriais.css — Estilos da Central de Tutoriais & Academy
   CryptoMinds Pro IA (v2)
   Tema: Deep Cyber Navy / Forest & Gold / Tech Green
   ============================================================ */

.academy-page {
  background: var(--bg-primary, #010409);
  color: var(--text-primary, #f0ece6);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
}

/* ── Hero da Academy ─────────────────────────────────────── */
.academy-hero {
  position: relative;
  padding: 40px 24px 24px;
  max-width: 1280px;
  margin: 0 auto;
}

.academy-hero-glow {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 250px;
  background: radial-gradient(ellipse at center, rgba(79, 185, 129, 0.15) 0%, rgba(44, 154, 207, 0.08) 50%, transparent 70%);
  filter: blur(50px);
  pointer-events: none;
  z-index: 0;
}

.academy-header-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 820px;
  margin: 0 auto 32px;
}

.academy-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(79, 185, 129, 0.1);
  border: 1px solid rgba(79, 185, 129, 0.25);
  color: #4FB981;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.academy-badge .badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4FB981;
  box-shadow: 0 0 10px #4FB981;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.academy-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 14px;
  color: #f9fafb;
}

.academy-title .gradient-gold {
  background: linear-gradient(135deg, #EEB714 0%, #4FB981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.academy-subtitle {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary, rgba(240, 236, 230, 0.75));
  margin: 0 auto;
}

/* ── Gamification / Barra de Progresso ───────────────────── */
.academy-progress-card {
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, rgba(10, 19, 33, 0.9) 0%, rgba(1, 4, 9, 0.95) 100%);
  border: 1px solid rgba(44, 154, 207, 0.2);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.progress-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-icon {
  font-size: 26px;
}

.progress-title {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #f0ece6;
  margin: 0 0 2px;
}

.progress-desc {
  font-size: 13px;
  color: var(--text-muted, rgba(240, 236, 230, 0.5));
  margin: 0;
}

.progress-metrics {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.progress-percentage {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #EEB714;
}

.progress-count {
  font-size: 13px;
  color: var(--text-secondary, rgba(240, 236, 230, 0.75));
}

.progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4FB981 0%, #EEB714 100%);
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(238, 183, 20, 0.4);
}

/* ── Seletor de Modo (Abas Principais) ────────────────────── */
.academy-mode-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
}

.mode-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 24px;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary, rgba(240, 236, 230, 0.75));
  cursor: pointer;
  transition: all 0.25s ease;
}

.mode-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(79, 185, 129, 0.3);
  color: #ffffff;
}

.mode-tab-btn.active {
  background: linear-gradient(135deg, rgba(44, 154, 207, 0.2) 0%, rgba(79, 185, 129, 0.25) 100%);
  border-color: #4FB981;
  color: #ffffff;
  box-shadow: 0 0 20px rgba(79, 185, 129, 0.2);
}

.mode-tab-badge {
  background: rgba(238, 183, 20, 0.15);
  border: 1px solid rgba(238, 183, 20, 0.3);
  color: #EEB714;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
}

/* ── Barra de Filtros & Busca ────────────────────────────── */
.academy-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.academy-filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary, rgba(240, 236, 230, 0.7));
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-pill-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  border-color: rgba(44, 154, 207, 0.3);
}

.filter-pill-btn.active {
  background: rgba(79, 185, 129, 0.15);
  border-color: #4FB981;
  color: #4FB981;
  font-weight: 600;
}

.academy-search-box {
  position: relative;
  min-width: 260px;
}

.academy-search-box input {
  width: 100%;
  background: rgba(10, 19, 33, 0.8);
  border: 1px solid rgba(44, 154, 207, 0.2);
  border-radius: 10px;
  padding: 10px 14px 10px 38px;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.academy-search-box input:focus {
  border-color: #4FB981;
  box-shadow: 0 0 10px rgba(79, 185, 129, 0.25);
}

.academy-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

/* ── Grid dos 20 Módulos em Pílulas ──────────────────────── */
.academy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.tutorial-card {
  background: linear-gradient(135deg, rgba(10, 19, 33, 0.7) 0%, rgba(1, 4, 9, 0.85) 100%);
  border: 1px solid rgba(44, 154, 207, 0.15);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.tutorial-card:hover {
  transform: translateY(-4px);
  border-color: rgba(79, 185, 129, 0.4);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.tutorial-card.is-completed {
  border-color: rgba(79, 185, 129, 0.3);
}

.tutorial-card.is-completed::after {
  content: '✓ Visto';
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(79, 185, 129, 0.9);
  color: #010409;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  z-index: 3;
}

.card-thumb-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #050b14;
  overflow: hidden;
  cursor: pointer;
}

.card-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.tutorial-card:hover .card-thumb-img {
  transform: scale(1.04);
}

.card-thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.6) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.tutorial-card:hover .card-thumb-overlay {
  opacity: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.75) 100%);
}

.card-play-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(79, 185, 129, 0.9);
  color: #010409;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 24px rgba(79, 185, 129, 0.5);
  transition: transform 0.2s ease, background 0.2s ease;
}

.tutorial-card:hover .card-play-btn {
  transform: scale(1.12);
  background: #EEB714;
  box-shadow: 0 0 28px rgba(238, 183, 20, 0.6);
}

.card-duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f0ece6;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-header-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.card-category-tag {
  font-size: 11px;
  font-weight: 600;
  color: #4FB981;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-slide-badge {
  background: rgba(44, 154, 207, 0.15);
  border: 1px solid rgba(44, 154, 207, 0.35);
  color: #2C9ACF;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: #f9fafb;
  margin: 0 0 8px;
}

.card-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary, rgba(240, 236, 230, 0.7));
  margin: 0 0 16px;
  flex-grow: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-card-watch {
  background: linear-gradient(135deg, #2C9ACF 0%, #4FB981 100%);
  color: #010409;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s, transform 0.2s;
}

.btn-card-watch:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-card-tool {
  background: transparent;
  color: var(--text-secondary, rgba(240, 236, 230, 0.75));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.btn-card-tool:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* ── Aba Masterclass Completa ─────────────────────────────── */
.academy-masterclass-section {
  display: none;
  background: linear-gradient(135deg, rgba(10, 19, 33, 0.8) 0%, rgba(1, 4, 9, 0.95) 100%);
  border: 1px solid rgba(44, 154, 207, 0.2);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 48px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.academy-masterclass-section.active {
  display: block;
}

.masterclass-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: center;
}

@media (max-width: 900px) {
  .masterclass-grid {
    grid-template-columns: 1fr;
  }
}

.masterclass-player-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #030712;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(79, 185, 129, 0.25);
  position: relative;
}

.masterclass-player-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.masterclass-cover {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
  overflow: hidden;
  background: #050b14;
}

.masterclass-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.masterclass-cover:hover .masterclass-cover-img {
  transform: scale(1.03);
}

.masterclass-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.75) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: background 0.2s ease;
}

.masterclass-cover:hover .masterclass-cover-overlay {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.6) 100%);
}

.masterclass-play-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #EEB714 0%, #4FB981 100%);
  color: #010409;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  padding-left: 4px;
  box-shadow: 0 0 30px rgba(238, 183, 20, 0.5);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.masterclass-cover:hover .masterclass-play-btn {
  transform: scale(1.1);
  box-shadow: 0 0 40px rgba(79, 185, 129, 0.7);
}

.masterclass-play-hint {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #f9fafb;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  background: rgba(1, 4, 9, 0.6);
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.masterclass-info h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #f9fafb;
  margin: 0 0 8px;
}

.masterclass-info .masterclass-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.meta-pill {
  background: rgba(238, 183, 20, 0.15);
  border: 1px solid rgba(238, 183, 20, 0.3);
  color: #EEB714;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

.masterclass-info p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.masterclass-chapters {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  max-height: 240px;
  overflow-y: auto;
}

.masterclass-chapters h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #4FB981;
  margin: 0 0 10px;
}

.chapter-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.2s;
}

.chapter-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

/* ── Modal Player de Vídeo ───────────────────────────────── */
.tutorial-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.tutorial-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.tutorial-modal-window {
  width: 100%;
  max-width: 960px;
  background: #0A1321;
  border: 1px solid rgba(79, 185, 129, 0.3);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modal-pop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modal-pop {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 16px 20px;
  background: rgba(1, 4, 9, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-slide-tag {
  background: rgba(44, 154, 207, 0.2);
  border: 1px solid rgba(44, 154, 207, 0.35);
  color: #2C9ACF;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: 'Outfit', sans-serif;
}

.modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #f9fafb;
  margin: 0;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}

.modal-player-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #010409;
}

.modal-player-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.modal-placeholder-notice {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  background: radial-gradient(circle at center, rgba(10, 19, 33, 0.95) 0%, rgba(1, 4, 9, 1) 100%);
}

.modal-placeholder-notice .notice-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.modal-placeholder-notice h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  color: #EEB714;
  margin: 0 0 8px;
}

.modal-placeholder-notice p {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 0 16px;
  line-height: 1.5;
}

.modal-placeholder-notice code {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 8px;
  border-radius: 6px;
  color: #4FB981;
  font-size: 12px;
}

.modal-footer {
  padding: 16px 20px;
  background: rgba(1, 4, 9, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.modal-complete-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
}

.modal-complete-toggle input {
  accent-color: #4FB981;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.modal-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-modal-nav {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-modal-nav:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(79, 185, 129, 0.4);
}

.btn-modal-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-modal-open-tool {
  background: rgba(79, 185, 129, 0.15);
  border: 1px solid #4FB981;
  color: #4FB981;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-modal-open-tool:hover {
  background: #4FB981;
  color: #010409;
}
