/* ==========================================================================
   Recursos de Pau Martí — Estilo Blanco Puro con Acentos Vivos de Google
   ========================================================================== */

:root {
  /* Google 4-Color Brand Palette */
  --google-blue: #1a73e8;
  --google-blue-hover: #1557b0;
  --google-blue-subtle: #e8f0fe;
  --google-blue-text: #1967d2;
  --google-blue-border: #aecbfa;

  --google-red: #ea4335;
  --google-red-hover: #d93025;
  --google-red-subtle: #fce8e6;
  --google-red-text: #c5221f;
  --google-red-border: #f6aea9;

  --google-yellow: #fbbc04;
  --google-yellow-hover: #f29900;
  --google-yellow-subtle: #fef7e0;
  --google-yellow-text: #b06000;
  --google-yellow-border: #fde293;

  --google-green: #34a853;
  --google-green-hover: #1e8e3e;
  --google-green-subtle: #e6f4ea;
  --google-green-text: #137333;
  --google-green-border: #a8dab5;

  /* Fondo Blanco Puro y Superficies */
  --bg-main: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-variant: #f8f9fa;
  --bg-code: #ffffff;
  --bg-chip: #f1f3f4;
  --bg-chip-hover: #e8eaed;
  --bg-active-pill: #1a73e8;
  --text-active-pill: #ffffff;

  /* Bordes Limpios y Delgados */
  --border-color: #e5e7eb;
  --border-subtle: #f3f4f6;
  --border-strong: #d1d5db;
  --border-focus: #1a73e8;

  /* Tipografía de Alto Contraste */
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;

  /* Sombras Delicadas */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 1px 3px rgba(60, 64, 67, 0.08), 0 1px 2px rgba(60, 64, 67, 0.04);
  --shadow-card-hover: 0 6px 16px rgba(60, 64, 67, 0.12);
  --shadow-toast: 0 4px 20px rgba(0, 0, 0, 0.18);

  /* Radios Cuadrados (Diseño Limpio y Geométrico) */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-pill: 4px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  --font-title: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --header-height: 72px;
}

[data-theme="dark"] {
  /* Modo Oscuro con Acentos Vivos */
  --bg-main: #0c0d10;
  --bg-surface: #14161b;
  --bg-surface-variant: #1a1d24;
  --bg-code: #121418;
  --bg-chip: #1f232b;
  --bg-chip-hover: #292e38;
  --bg-active-pill: #8ab4f8;
  --text-active-pill: #0c0d10;

  --google-blue: #8ab4f8;
  --google-blue-hover: #a8c7fa;
  --google-blue-subtle: #1b3761;
  --google-blue-text: #d3e3fd;
  --google-blue-border: #284c7e;

  --google-red: #f28b82;
  --google-red-hover: #f6aea9;
  --google-red-subtle: #5c1d18;
  --google-red-text: #fce8e6;
  --google-red-border: #752924;

  --google-yellow: #fdd663;
  --google-yellow-hover: #feefc3;
  --google-yellow-subtle: #573e04;
  --google-yellow-text: #feefc3;
  --google-yellow-border: #70520b;

  --google-green: #81c995;
  --google-green-hover: #a8dab5;
  --google-green-subtle: #133e21;
  --google-green-text: #ceead6;
  --google-green-border: #1c592f;

  --border-color: #242832;
  --border-subtle: #1a1d24;
  --border-strong: #373e4d;
  --border-focus: #8ab4f8;

  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 6px 18px rgba(0, 0, 0, 0.5);
  --shadow-toast: 0 6px 24px rgba(0, 0, 0, 0.8);
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.15s ease, color 0.15s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Barra superior delgada con los 4 colores de Google */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #4285F4 0%, #4285F4 25%, #EA4335 25%, #EA4335 50%, #FBBC05 50%, #FBBC05 75%, #34A853 75%, #34A853 100%);
  z-index: 1000;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Encabezado */
.site-header {
  position: sticky;
  top: 3px;
  z-index: 100;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--header-height);
}

.header-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.logo-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

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

.header-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-center-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.15s ease;
}

.brand-center-link:hover {
  opacity: 0.85;
}

.brand-name {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1;
}

.brand-slash {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--border-strong);
  line-height: 1;
  user-select: none;
  padding: 0 0.15rem;
}

.brand-subtitle-text {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.btn-icon {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-icon:hover {
  color: var(--google-blue);
  border-color: var(--google-blue);
  background-color: var(--google-blue-subtle);
}

[data-theme="dark"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
:root:not([data-theme="dark"]) .icon-moon { display: block; }
:root:not([data-theme="dark"]) .icon-sun { display: none; }

/* Contenedor Principal */
.main-content {
  flex: 1;
  padding-top: 2.25rem;
  padding-bottom: 5rem;
}

.view-section {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
  animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   HERO BANNER CON IMAGEN GRANDE EN EL INICIO
   ========================================================================== */
.home-hero-banner {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.hero-image-wrapper {
  width: 100%;
  background: var(--bg-surface);
  position: relative;
  overflow: hidden;
  display: block;
}

.home-hero-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   BANNER DESTACADO MÁXIMO IMPACTO: ACADEMIA DE PAU MARTÍ (SKOOL)
   ========================================================================== */
.academia-banner-card {
  background: #ffffff;
  border: 2px solid var(--google-blue);
  border-radius: var(--radius-md);
  padding: 3rem 3rem 3.25rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 12px 36px -8px rgba(26, 115, 232, 0.22), 0 0 0 1px rgba(26, 115, 232, 0.15);
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .academia-banner-card {
  background: #14161b;
  border-color: #38bdf8;
  box-shadow: 0 12px 40px -8px rgba(56, 189, 248, 0.3);
}

.academia-banner-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #4285F4 0%, #EA4335 33%, #FBBC05 66%, #34A853 100%);
}

.academia-content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  max-width: 820px;
}

.academia-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  background: var(--bg-surface);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

.academia-badge:hover {
  border-color: var(--border-strong);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.badge-sparkle-icon {
  flex-shrink: 0;
  display: block;
}

.academia-badge-text {
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}

.academia-title {
  font-family: var(--font-title);
  font-size: 2.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.2;
}

.academia-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 740px;
}

.academia-cta-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.75rem;
  width: 100%;
}

.btn-academia-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%);
  color: #ffffff !important;
  font-family: var(--font-title);
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 1.25rem 3rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 26px rgba(26, 115, 232, 0.45), 0 2px 6px rgba(26, 115, 232, 0.25);
  animation: ctaBreath 2.8s infinite;
  white-space: nowrap;
}

@keyframes ctaBreath {
  0% { box-shadow: 0 8px 24px rgba(26, 115, 232, 0.4); }
  50% { box-shadow: 0 12px 34px rgba(26, 115, 232, 0.65), 0 0 0 6px rgba(26, 115, 232, 0.15); }
  100% { box-shadow: 0 8px 24px rgba(26, 115, 232, 0.4); }
}

.btn-academia-cta:hover {
  background: linear-gradient(135deg, #1557b0 0%, #0d47a1 100%);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 36px rgba(26, 115, 232, 0.6), 0 0 0 8px rgba(26, 115, 232, 0.2);
}

.academia-sub-info {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.academia-sub-info strong {
  color: var(--google-blue);
}

.academia-detail-cta {
  margin-top: 1rem;
}

/* Buscador Minimalista Cuadrado con Detalle Google */
.google-search-bar {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.35rem 1.15rem;
  min-height: 48px;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}

.google-search-bar:hover {
  border-color: var(--border-strong);
}

.google-search-bar:focus-within {
  border-color: var(--google-blue);
  box-shadow: 0 0 0 2px var(--google-blue-subtle);
}

.google-search-icon {
  color: var(--google-blue);
  flex-shrink: 0;
  margin-right: 0.8rem;
}

.google-search-bar input {
  width: 100%;
  padding: 0.6rem 0;
  font-size: 1rem;
  font-family: var(--font-sans);
  border: none;
  background: transparent;
  color: var(--text-primary);
  outline: none;
}

.google-search-bar input::placeholder {
  color: var(--text-muted);
}

.google-sparkle-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.35rem;
}

.btn-clear {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.35rem;
  cursor: pointer;
  padding: 0 0.5rem;
  line-height: 1;
}

.btn-clear:hover {
  color: var(--google-red);
}

/* Barra de Filtros y Estadísticas */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pill {
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill:hover {
  background: var(--google-blue-subtle);
  border-color: var(--google-blue-border);
  color: var(--google-blue-text);
}

.pill.active {
  background: var(--google-blue) !important;
  color: #ffffff !important;
  border-color: var(--google-blue) !important;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(26, 115, 232, 0.25);
}

.stats-counter {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.stats-counter strong {
  color: var(--google-blue);
}

/* Encabezado de la sección de vídeos */
.section-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.section-header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-bottom: 2px solid var(--border-subtle);
  padding-bottom: 0.65rem;
}

.section-main-heading {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.section-sub-hint {
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* ==========================================================================
   CAJITAS DE VÍDEO CON ACENTOS DE COLOR DE GOOGLE
   ========================================================================== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 1.5rem;
}

.video-grid-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--google-blue);
  border-radius: var(--radius-sm);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.35rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
  position: relative;
}

.video-grid-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

/* Variaciones de color por temática */
.video-grid-card.theme-blue {
  border-top-color: var(--google-blue);
}
.video-grid-card.theme-blue:hover {
  border-color: var(--google-blue);
}
.video-grid-card.theme-blue .card-cat-badge {
  background: var(--google-blue-subtle);
  color: var(--google-blue-text);
  border-color: var(--google-blue-border);
}
.video-grid-card.theme-blue .card-action-btn {
  color: var(--google-blue);
}

.video-grid-card.theme-green {
  border-top-color: var(--google-green);
}
.video-grid-card.theme-green:hover {
  border-color: var(--google-green);
}
.video-grid-card.theme-green .card-cat-badge {
  background: var(--google-green-subtle);
  color: var(--google-green-text);
  border-color: var(--google-green-border);
}
.video-grid-card.theme-green .card-action-btn {
  color: var(--google-green);
}

.video-grid-card.theme-red {
  border-top-color: var(--google-red);
}
.video-grid-card.theme-red:hover {
  border-color: var(--google-red);
}
.video-grid-card.theme-red .card-cat-badge {
  background: var(--google-red-subtle);
  color: var(--google-red-text);
  border-color: var(--google-red-border);
}
.video-grid-card.theme-red .card-action-btn {
  color: var(--google-red);
}

.video-grid-card.theme-yellow {
  border-top-color: var(--google-yellow);
}
.video-grid-card.theme-yellow:hover {
  border-color: var(--google-yellow);
}
.video-grid-card.theme-yellow .card-cat-badge {
  background: var(--google-yellow-subtle);
  color: var(--google-yellow-text);
  border-color: var(--google-yellow-border);
}
.video-grid-card.theme-yellow .card-action-btn {
  color: var(--google-yellow-text);
}

.card-top-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.card-cat-badge {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-color);
}

.card-prompts-badge {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-surface-variant);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-xs);
}

.card-video-title {
  font-family: var(--font-title);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  line-height: 1.35;
}

.card-video-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.card-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.card-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 700;
  transition: gap 0.15s ease;
}

.video-grid-card:hover .card-action-btn {
  gap: 0.65rem;
}

/* Resultados de búsqueda */
.search-results-section {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.search-results-header h3 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ==========================================================================
   VISTA 2: PÁGINA DEDICADA DE CADA VÍDEO (DETAIL VIEW)
   ========================================================================== */
.detail-top-nav {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  padding-bottom: 0.25rem;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--google-blue);
  background: var(--google-blue-subtle);
  border: 1px solid var(--google-blue-border);
  text-decoration: none;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.btn-back:hover {
  background: var(--google-blue);
  color: #ffffff;
  transform: translateX(-2px);
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Cabecera del Vídeo */
.detail-header {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-top: 4px solid var(--google-blue);
  border-radius: var(--radius-sm);
  padding: 2rem 2.25rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.detail-header.theme-green { border-top-color: var(--google-green); }
.detail-header.theme-red { border-top-color: var(--google-red); }
.detail-header.theme-yellow { border-top-color: var(--google-yellow); }

.detail-header-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.category-badge {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--google-blue-text);
  background: var(--google-blue-subtle);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--google-blue-border);
}

.detail-video-title {
  font-family: var(--font-title);
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.3;
}

.detail-video-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 860px;
}

.detail-doc-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--google-blue);
  background: var(--google-blue-subtle);
  border: 1px solid var(--google-blue-border);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-xs);
  text-decoration: none;
  transition: all 0.15s ease;
}

.detail-doc-link:hover {
  background: var(--google-blue);
  color: #ffffff;
}

/* Reglas destacadas */
.detail-rules-box {
  background: var(--google-yellow-subtle);
  border: 1px solid var(--google-yellow-border);
  border-radius: var(--radius-xs);
  padding: 1rem 1.25rem;
  margin-top: 0.25rem;
}

.detail-rules-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--google-yellow-text);
  margin-bottom: 0.35rem;
}

.detail-rules-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.detail-rules-list li {
  font-size: 0.88rem;
  color: var(--text-primary);
  position: relative;
  padding-left: 1.2rem;
}

.detail-rules-list li::before {
  content: "•";
  position: absolute;
  left: 0.25rem;
  color: var(--google-yellow-text);
  font-weight: bold;
}

/* Navegación de secciones */
.detail-sections-nav {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  box-shadow: var(--shadow-sm);
}

.sections-nav-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--google-blue);
}

.sections-nav-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.section-chip-link {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-xs);
  background: var(--bg-surface-variant);
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid var(--border-color);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.section-chip-link:hover {
  background: var(--google-blue-subtle);
  color: var(--google-blue-text);
  border-color: var(--google-blue-border);
}

/* Contenido de secciones */
.detail-content {
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
}

.detail-section-group {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  scroll-margin-top: 90px;
}

.detail-section-title {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--border-subtle);
}

.detail-prompts-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ==========================================================================
   RECUADRO DE PROMPT (BLANCO PURO, CUADRADO & COPIABLE)
   ========================================================================== */
.prompt-box {
  background: var(--bg-code);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1.35rem 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.prompt-box:hover {
  border-color: var(--google-blue);
  box-shadow: var(--shadow-sm);
}

.prompt-box-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.15rem;
}

.prompt-title-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.prompt-title {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Badges */
.badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
  background: var(--bg-chip);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.badge-star {
  background: var(--google-yellow-subtle) !important;
  color: var(--google-yellow-text) !important;
  border-color: var(--google-yellow-border) !important;
}

.badge-base {
  background: var(--google-blue-subtle) !important;
  color: var(--google-blue-text) !important;
  border-color: var(--google-blue-border) !important;
}

.badge-truco {
  background: var(--google-green-subtle) !important;
  color: var(--google-green-text) !important;
  border-color: var(--google-green-border) !important;
}

/* Acciones en recuadro */
.prompt-box-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.btn-link-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-xs);
  background-color: var(--google-blue);
  color: #ffffff !important;
  text-decoration: none;
  transition: all 0.15s ease;
  box-shadow: 0 2px 4px rgba(26, 115, 232, 0.25);
}

.btn-link-action:hover {
  background-color: var(--google-blue-hover);
  transform: translateY(-1px);
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-copy:hover {
  background: var(--google-blue-subtle);
  color: var(--google-blue-text);
  border-color: var(--google-blue);
}

.btn-copy.copied {
  background: var(--google-green-subtle) !important;
  color: var(--google-green-text) !important;
  border-color: var(--google-green) !important;
  font-weight: 700;
  pointer-events: none;
}

/* Contenido del texto del prompt */
.prompt-content {
  font-family: var(--font-sans);
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Resaltado de [variables entre corchetes] */
.prompt-content .variable-token {
  display: inline-block;
  background: var(--google-yellow-subtle);
  color: var(--google-yellow-text);
  font-weight: 600;
  padding: 0.05rem 0.4rem;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 0.86em;
  margin: 0 0.15rem;
  border: 1px solid var(--google-yellow-border);
}

/* Paginación entre vídeos */
.detail-footer-pagination {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-color);
}

.pagination-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  padding: 1.25rem 1.35rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: all 0.15s ease;
}

.pagination-card:hover {
  border-color: var(--google-blue);
  background: var(--google-blue-subtle);
  transform: translateY(-1px);
}

.pagination-card.next {
  text-align: right;
}

.pagination-direction {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--google-blue);
}

.pagination-title {
  font-family: var(--font-title);
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Estado Vacío */
.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  background: var(--bg-surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.25rem;
}

.empty-state h3 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  color: var(--text-primary);
}

.empty-state p {
  color: var(--text-muted);
  max-width: 420px;
}

.btn-primary {
  background-color: var(--google-blue);
  color: #ffffff;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.btn-primary:hover {
  background-color: var(--google-blue-hover);
}

/* Toast flotante */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  background: var(--text-primary);
  color: var(--bg-main);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-toast);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all 0.15s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast svg {
  color: var(--google-green);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
  padding: 2rem 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-home-link {
  color: var(--google-blue);
  text-decoration: none;
  font-weight: 600;
}

.footer-home-link:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 860px) {
  .academia-banner-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.75rem;
  }

  .academia-banner-right {
    width: 100%;
    align-items: flex-start;
  }

  .btn-academia-cta {
    width: 100%;
    justify-content: center;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .detail-header {
    padding: 1.35rem;
  }

  .detail-video-title {
    font-size: 1.4rem;
  }

  .detail-footer-pagination {
    grid-template-columns: 1fr;
  }

  .pagination-card.next {
    text-align: left;
  }

  .prompt-box {
    padding: 1.15rem;
  }

  .prompt-box-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .prompt-box-actions {
    width: 100%;
    justify-content: flex-start;
  }
}
