/* rugby-tacticboard.css */


:root {
  /* =========================
     IDENTIDAD CLUB
     ========================= */

  --primary-50: #edf7fb;
  --primary-100: #cfe9f3;
  --primary-500: rgb(0, 98, 132);      /* azul club */
  --primary-600: #0086b8;              /* más luminoso */
  --primary-700: #006b93;

  --club-red: rgb(189, 57, 54);

  /* =========================
     FONDOS GENERALES
     ========================= */

  /* Azul noche más claro, menos “cueva” */
  --bg-darker: #0a1d2b;
  --bg-dark: #10283a;

  /* Superficies */
  --bg-card: rgba(24, 40, 56, 0.94);
  --bg-card-hover: rgba(36, 58, 78, 0.97);

  /* =========================
     CAMPO DE JUEGO
     ========================= */

  /* Verde un punto más vivo */
  --field-green: #0e7a55;
  --field-green-light: #13a173;

  /* Líneas un poco más nítidas */
  --field-line: rgba(241, 245, 249, 0.7);
  --field-line-bold: rgba(241, 245, 249, 0.9);

  /* =========================
     TEXTO
     ========================= */

  --text-primary: #f9fafb;
  --text-secondary: #e2e8f0;
  --text-muted: #9aaec2;

  /* =========================
     EQUIPOS
     ========================= */

  --team-a: rgb(0, 98, 132);
  --team-a-dark: #005571;

  --team-b: rgb(189, 57, 54);
  --team-b-dark: #a63330;

  --team-selected: #facc15;

  /* =========================
     BORDES / SOMBRAS
     ========================= */

  --border-radius: 16px;
  --border-radius-sm: 8px;

  /* Bordes más visibles (mejora lectura) */
  --border-color: rgba(148, 163, 184, 0.45);

  --shadow-lg: 0 16px 34px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 22px 46px rgba(0, 0, 0, 0.5);

  /* =========================
     TRANSICIONES
     ========================= */

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}


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

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow: hidden;
}

html,
body {
  height: 100%;
}


/* Layout principal */

.app {
  position: relative;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  width: 100%;
  height: 100vh;
  padding: 12px 16px;
  box-sizing: border-box;
}

.board-container {
  flex: 1;
  display: flex;
  align-items: stretch;
}

#icon-1 {
  width: 15%;
}

/* Panel del campo */
.board-wrapper {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 10px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;

  /* Layout interno */
  display: flex;
  flex-direction: column;

  /* El campo debe ocupar siempre ~70-80% del ancho visible */
  width: 80%;

}

/* Branding / título */
.board-wrapper h1 {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}


.board-wrapper .tag {
  font-weight: 500;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.20);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #e0f2fe;
  width: 15%;
}



/* Canvas del campo */
#board {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: radial-gradient(circle at 10% 20%, #022c22 0%, #022c33 40%, #020617 100%);
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.9),
    0 40px 80px rgba(15, 23, 42, 0.9);
}

/* Panel derecho */
.panel {
  flex: 1;
  min-width: 310px;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  height: 100%;
  overflow-y: auto;
  /* scroll solo dentro */
  padding-right: 14px;

}


.panel>.tab-content {
  padding-right: 12px;
  padding-bottom: 20px;
}

/* Splash Screen */
#splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #006284 0%, #004a66 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.8s ease-out;
}

.splash-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 40px;
  animation: fadeInUp 1s ease-out;
}

/* Logo del splash responsive */
.splash-logo img {
  display: block;
  max-width: min(520px, 70vw);
  height: auto;
}

/* ===== Splash adaptado a móvil (vertical) ===== */
@media (max-width: 500px) {
  #splash-screen {
    padding: 24px 16px;
  }

  .splash-logo img {
    max-width: 60vw;
    /* un pelín más pequeño en móvil */
  }

  .app-title {
    font-size: 1rem !important;
    margin-top: 16px;
    text-align: center;
  }

  .loading-bar {
    width: min(260px, 80vw);
    margin-top: 24px;
  }

  .loading-text {
    font-size: 0.8rem;
  }
}

/* ===== Splash adaptado a móvil en horizontal (tu caso de uso) ===== */
@media (max-width: 900px) and (orientation: landscape) {
  #splash-screen {
    padding: 24px 16px;
  }

  .splash-logo img {
    max-width: 40vw;
  }

  .app-title {
    font-size: 1rem !important;
    text-align: center;
    margin-top: 5px !important;
  }

  .loading-bar {
    width: min(260px, 80vw);
    margin-top: 5px !important;

  }

  .loading-text {
    font-size: 0.8rem;
  }
}



.club-name {
  font-size: 3.5rem;
  font-weight: bold;
  color: white;
  text-align: center;
  line-height: 1.2;
  margin-bottom: 10px;
}

.club-name span {
  display: block;
  font-size: 2rem;
  letter-spacing: 4px;
}

.club-subtitle {
  font-size: 1.5rem;
  color: white;
  text-align: center;
  margin-top: 10px;
  opacity: 0.9;
}

.app-title {
  font-size: 2rem;
  color: white;
  text-align: center;
  margin-top: 30px;
  font-weight: 300;
  animation: fadeIn 1.5s ease-out 0.5s both;
}

.loading-bar {
  width: 300px;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  margin-top: 40px;
  overflow: hidden;
  animation: fadeIn 1s ease-out 1s both;
}

.loading-progress {
  height: 100%;
  width: 0%;
  background-color: white;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.loading-text {
  color: white;
  margin-top: 15px;
  font-size: 0.9rem;
  opacity: 0.8;
  animation: fadeIn 1s ease-out 1.2s both;
}

/* Animaciones del Splash Screen */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Transición de la aplicación principal */
.app {
  opacity: 0;
  transition: opacity 0.5s ease-in;
}

.app.loaded {
  opacity: 1;
}


/* Side panel tabs */
.side-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.side-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  padding: 0 2px;
}

.side-tab {
  flex: 1;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-dark);
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.side-tab.active {
  background: var(--primary-600);
  color: #ffffff;
  border-color: transparent;
}

.side-panel-section {
  display: none;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  overflow-y: auto;
  padding: 4px 4px 12px 0;
}

.side-panel-section.active {
  display: flex;
}

/* Bloques internos (Detalle jugada, Reproducción, Notas...) */
.panel-block {
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: var(--border-radius);
  background: rgba(15, 23, 42, 0.96);
  /* tarjeta ligeramente más clara */
  border: 1px solid rgba(51, 65, 85, 0.7);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

/* separación extra entre tarjetas */
.panel-block+.panel-block {
  margin-top: 8px;
}

.panel-block:last-child {
  margin-bottom: 0;
}

/* Títulos de bloques dentro del panel */
.panel-block h2 {
  font-size: 1rem;
  margin-bottom: 8px;
}

/* Botones de control dentro de Jugadas */
.panel-block .controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
  margin-bottom: 15px;
}

/* Timeline y textos de estado */
.timeline {
  margin-top: 10px;
  margin-bottom: 10px;
}

.status {
  margin-top: 8px;
}

.multi-select-info {
  margin-top: 6px;
  font-size: 0.78rem;
  line-height: 1.4;
}

/* Inputs y botones en panel */
.input-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

input[type="text"],
input[type="number"],
select {
  padding: 8px 12px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-dark);
  color: var(--text-primary);
  font-size: 0.8rem;
  outline: none;
  flex: 1;
}

/* === Personalización (Ajustes) === */
.color-setting {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.35);
}

.color-setting span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.color-setting input[type="color"] {
  width: 44px;
  height: 34px;
  border: 0;
  background: transparent;
  padding: 0;
}

.check-setting {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.35);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.check-setting input[type="checkbox"] {
  transform: translateY(1px);
}

#boardPasswordInput {
  border-radius: 7px;
  padding: 5px;
}

/* Lista de jugadas */
.plays-list {
  border-radius: var(--border-radius-sm);
  border: 1px dashed var(--border-color-soft);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.play-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--border-radius-sm);
  background: var(--bg-card);
  border: 1px solid transparent;
  font-size: 0.8rem;
}

.play-item:hover {
  border-color: rgba(148, 163, 184, 0.4);
  background: rgba(30, 41, 59, 0.9);
}

.play-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.play-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.play-actions {
  display: flex;
  gap: 4px;
}

/* Botones generales */

button {
  border-radius: 999px;
  border: none;
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  background: var(--primary-600);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition:
    background var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.6);
}

button:hover:not(:disabled) {
  background: var(--primary-700);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.8);
}

button:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.7);
}

button:disabled {
  opacity: 0.5;
  cursor: default;
  box-shadow: none;
}

/* Botones secundarios / estados */
button.secondary {
  background: rgba(15, 23, 42, 0.95);
  color: var(--text-secondary);
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: none;
}

button.secondary:hover:not(:disabled) {
  background: rgba(30, 41, 59, 0.95);
}

button.success {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

button.warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

button.danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* Controles */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.controls label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: end;
}

#quickNotes {
  width: 90%;
  border-radius: 10px;
  padding: 10px;
}

/* Timeline */
.timeline {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline span {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.timeline-track {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.8);
}

.timeline-progress {
  position: absolute;
  inset: 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #22d3ee, #22c55e);
  background-size: 200% 100%;
  animation: timelineGlow 1s linear infinite;
}

@keyframes timelineGlow {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 200% 50%;
  }
}

/* Paso actual */
.step-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.5);
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* Lista de pasos */
.recording-steps {
  margin-top: 12px;
  border-radius: var(--border-radius-sm);
  border: 1px dashed var(--border-color-soft);
  padding: 8px;
  max-height: 180px;
  overflow-y: auto;
  font-size: 0.8rem;
}

/* Utilidades del tablero */
.board-utils {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.8rem;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.checkbox input {
  width: 14px;
  height: 14px;
}

/* Sliders */
input[type="range"] {
  width: 100%;
}

/* Tooltips / Notas */
.hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Estados / status */
.status {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Scrollbar personalizado */
.side-panel-section::-webkit-scrollbar,
.recording-steps::-webkit-scrollbar,
.plays-list::-webkit-scrollbar {
  width: 6px;
}

.side-panel-section::-webkit-scrollbar-track,
.recording-steps::-webkit-scrollbar-track,
.plays-list::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.9);
}

.side-panel-section::-webkit-scrollbar-thumb,
.recording-steps::-webkit-scrollbar-thumb,
.plays-list::-webkit-scrollbar-thumb {
  background: rgba(51, 65, 85, 0.9);
  border-radius: 999px;
}



.status {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.multi-select-info {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
}


/* ====== Sección Entrenamiento ====== */

#panel-training .panel-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#panel-training h2 {
  font-size: 1rem;
  margin-bottom: 4px;
}

#panel-training .panel-block h3 {
  font-size: 0.9rem;
  margin-bottom: 6px;
}

/* Grupos de botones de entrenamiento */
.training-tools,
.training-draw-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.training-tools button,
.training-draw-tools button {
  flex: 1 1 calc(50% - 4px);
  /* 2 columnas en tablet */
  justify-content: center;
}


#trainingClear {
  flex: 1 0 100%;
}

/* Hint más respirado */
#panel-training .hint {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.training-tools button.active,
.training-draw-tools button.active {
  outline: 2px solid #006284;
  font-weight: 600;
}

/* =========================
   Quick toolbar flotante
   ========================= */

.board-header {
  display: flex;
  align-items: end;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

#icon-2 {
  width: 50%;
  margin-bottom: 10px;
}

.board-toolbar {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: var(--bg-card);
  border-radius: 18px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xl);
  z-index: 960;
  width: 10%;
}

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

.toolbar-divider {
  height: 1px;
  width: 100%;
  background: rgba(148, 163, 184, 0.35);
  margin: 4px 0;
}


/* =========================
   Panel deslizante + overlay
   ========================= */

.panel {
  position: fixed;
  top: 0;
  right: -520px;
  height: 100vh;
  max-width: 500px;
  width: 100%;
  z-index: 980;
  border-radius: 0;
  box-shadow: -12px 0 30px rgba(15, 23, 42, 0.7);
  background: var(--bg-darker);
  /* fondo sólido oscuro para el menú */
  transition: right 0.35s ease, box-shadow 0.35s ease;
}

.panel.panel-open {
  right: 0;
}

.overlay {
  position: fixed;
  inset: 0;
  background: transparent;
  /* por defecto transparente */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 970;
}

.overlay.overlay-active {
  opacity: 1;
  pointer-events: all;
  /* oscurecemos/difuminamos TODO el fondo menos el panel */
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(2px);
}

#tutorialBtn{
  width: 15%;
}

/* Botón rápido de eliminar (toolbar) */
.toolbar-btn.danger-outline {
  background: transparent;
  color: #fecaca;
  border: 1px solid #ef4444;
  box-shadow: none;
}

.toolbar-btn.danger-outline:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.16);
  color: #fee2e2;
}


/* === Modo demo / onboarding TacticBoard === */

#rtb-demo-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: auto;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#rtb-demo-overlay .rtb-demo-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65); /* azul oscuro translúcido */
  backdrop-filter: blur(2px);
}

#rtb-demo-overlay .rtb-demo-highlight {
  position: absolute;
  border-radius: 8px;
  border: 2px solid rgba(59, 130, 246, 0.9); /* azul */
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.35);
  pointer-events: none;
  transition: all 0.25s ease;
}

#rtb-demo-overlay .rtb-demo-card {
  position: absolute;
  background: rgba(15, 23, 42, 0.98);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.6);
  color: #e5e7eb;
  font-size: 13px;
  line-height: 1.4;
  border: 1px solid rgba(148, 163, 184, 0.5);
}

#rtb-demo-overlay .rtb-demo-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px;
  color: #bfdbfe;
}

#rtb-demo-overlay .rtb-demo-text {
  margin: 0 0 10px;
}

#rtb-demo-overlay .rtb-demo-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

#rtb-demo-overlay .rtb-demo-actions button {
  border-radius: 999px;
  border: none;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}

#rtb-demo-overlay .rtb-demo-skip {
  background: transparent;
  color: #9ca3af;
  border: 1px solid rgba(156, 163, 175, 0.5);
}

#rtb-demo-overlay .rtb-demo-next {
  background: #3b82f6;
  color: white;
  font-weight: 500;
}

#rtb-demo-overlay .rtb-demo-skip:hover {
  background: rgba(15, 23, 42, 0.9);
}

#rtb-demo-overlay .rtb-demo-next:hover {
  background: #2563eb;
}



/* =========================
   RESPONSIVE
   ========================= */

/* Tablet */
@media (min-width: 1000px) and (max-width: 1199px) {

  .app {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .board-wrapper {
    width: 90%;
  }

  .board-toolbar {
    flex-direction: unset;
    width: 90% !important;
    gap: 4px !important;
    margin-top: 15px;
  }

  #icon-2 {
    display: none;
  }

  .toolbar-divider {
    display: none;
  }


}

/* movil */
@media (min-width: 350px) and (max-width: 599px) {
  .app {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .board-wrapper {
    width: 90%;
  }

  .board-toolbar {
    flex-direction: column !important;
    width: 90% !important;
    gap: 4px !important;
    margin-top: 15px;
  }

  #icon-2 {
    display: none;
  }

  .toolbar-divider {
    display: none;
  }

  .tag {
    display: none;
  }

  #icon-1 {
    width: 20%;
  }

  #togglePanelBtn {
    display: unset !important;
  }

  .panel {
    max-width: 200px;
  }

}

@media (min-width: 600px) and (max-width: 899px) {

  .board-toolbar {
    width: 15% !important;
    gap: 4px !important;
    padding: 5px;
    /* height: 100vh; */
    /* OJO: mantiene el panel siempre visible */
    overflow-y: auto;
    /* <--- El scroll SOLO aquí */
    overflow-x: hidden;
    display: flex;
    align-items: center !important;
    justify-content: center !important;

  }

  #icon-2 {
    display: none;
  }

  .toolbar-divider {
    display: none;
  }

  .tag {
    display: none;
  }

  .panel {
    max-width: 400px;
  }

}

/* === Modal genérico RTB (inputs) === */
.rtb-modal-overlay{
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(2px);
}

.rtb-modal-card{
  width: min(320px, 90vw);
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 25px 55px rgba(0,0,0,0.55);
}

.rtb-modal-title{
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.rtb-modal-input{
  width: 100%;
  margin-bottom: 14px;
}

.rtb-modal-actions{
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.rtb-modal-confirm{
  background: var(--primary-600);
  color: #fff;
}


/* =========================
   Modo Presentación
   ========================= */
body.presentation-mode .panel,
body.presentation-mode .board-toolbar,
body.presentation-mode #togglePanelBtn,
body.presentation-mode #tutorialBtn,
body.presentation-mode #presentationBtn {
  display: none !important;
}

#presentationBtn{
  width: 15%;

}

body.presentation-mode .board-header {
  display: none !important;
}

body.presentation-mode .app {
  padding: 8px;
}

body.presentation-mode .board-wrapper {
  width: 100% !important;
  padding: 8px;
}

body.presentation-mode #board {
  border-radius: 16px;
}

/* Controles flotantes */
.presentation-controls {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 1500;
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.35);
  backdrop-filter: blur(6px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
}

.presentation-controls[aria-hidden="true"]{
  display:none;
}

.presentation-controls .toolbar-btn{
  width: auto;
  min-width: 52px;
  padding: 10px 14px;
  font-size: 1rem;
}

/* =========================
   Overlay exportación vídeo
   ========================= */

.video-export-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(4px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-export-box {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 16px;
  padding: 24px 28px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}

.video-export-box p {
  margin-top: 14px;
  font-size: 0.9rem;
  color: #e5e7eb;
}

.video-export-box small {
  color: #94a3b8;
  font-size: 0.75rem;
}

/* Spinner */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: #22c55e;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.video-export-overlay[hidden] { 
  display: none !important; 
}


/* =========================
   Quitar highlight azul (tap / focus)
   ========================= */

/* Móvil / táctil */
* {
  -webkit-tap-highlight-color: transparent;
}

/* Botones y elementos interactivos */
button,
a,
input,
textarea,
select {
  outline: none;
}

/* Evitar borde azul al hacer click */
button:focus,
button:focus-visible {
  outline: none;
  box-shadow: none;
}


/* Evitar selección de texto accidental */
button,
.toolbar-btn,
.presentation-controls {
  user-select: none;
  -webkit-user-select: none;
}




/* =========================
   PWA Install Prompt (Android + iOS)
   ========================= */

.pwa-install-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.62);
  z-index: 9998;
}

.pwa-install-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 9999;
  padding: 16px;
}

.pwa-install-modal.hidden,
.pwa-install-backdrop.hidden {
  display: none;
}

.pwa-install-card {
  width: min(520px, 92vw);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.pwa-install-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.7);
}

.pwa-install-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.pwa-install-close {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(2, 6, 23, 0.25);
  color: var(--text-secondary);
  box-shadow: none;
}

.pwa-install-close:hover:not(:disabled) {
  background: rgba(30, 41, 59, 0.9);
}

.pwa-install-body {
  padding: 14px 16px 10px 16px;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.pwa-install-body p {
  margin-bottom: 10px;
}

.pwa-install-platform.hidden {
  display: none;
}

.pwa-install-body ol {
  margin: 8px 0 0 18px;
}

.pwa-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(2, 6, 23, 0.25);
  color: var(--text-primary);
  font-size: 0.82rem;
}

.pwa-install-actions {
  display: flex;
  gap: 10px;
  padding: 12px 16px 14px 16px;
}

.pwa-install-btn {
  flex: 1;
  border-radius: 999px;
  padding: 10px 12px;
  font-size: 0.85rem;
}

.pwa-install-btn.secondary {
  background: rgba(15, 23, 42, 0.95);
  color: var(--text-secondary);
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: none;
}

.pwa-install-foot {
  padding: 0 16px 14px 16px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
