/* DocGato · capa "moderno" (14 nov 2026)
   Solo presentación: botones vivos, transiciones entre páginas y carga suave.
   Se carga DESPUÉS de docgato-pro.css. Si se quita, todo vuelve a como estaba. */

/* ---------- 1. Transición suave al cambiar de página (Chrome, Edge, Safari 18+) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root){ animation: dg-out .22s cubic-bezier(.4,0,1,1) both; }
::view-transition-new(root){ animation: dg-in .38s cubic-bezier(.2,.75,.2,1) both; }
.docgato-app .sidebar, .sidebar { view-transition-name: dg-sidebar; }
@keyframes dg-out { to { opacity: 0; transform: translateY(-6px) scale(.995); filter: blur(2px); } }
@keyframes dg-in  { from { opacity: 0; transform: translateY(10px); filter: blur(3px); } }

/* Fallback para navegadores sin view transitions: el contenido entra deslizándose */
.docgato-app .content, .docgato-app main { animation: dg-in .45s cubic-bezier(.2,.75,.2,1) both; }
.docgato-app .content > * { animation: dg-in .5s cubic-bezier(.2,.75,.2,1) both; }
.docgato-app .content > *:nth-child(2){ animation-delay: .04s }
.docgato-app .content > *:nth-child(3){ animation-delay: .08s }
.docgato-app .content > *:nth-child(4){ animation-delay: .12s }
.docgato-app .content > *:nth-child(n+5){ animation-delay: .16s }

/* Barra de progreso arriba mientras carga la siguiente página */
.dg-progress{position:fixed;top:0;left:0;height:3px;width:0;z-index:9999;pointer-events:none;
  background:linear-gradient(90deg,var(--dg-accent,#33e3cf),var(--dg-accent-2,#7ff3e5));
  box-shadow:0 0 12px var(--dg-accent,#33e3cf);transition:width .6s cubic-bezier(.2,.75,.2,1),opacity .3s}
.dg-progress.go{width:78%}
.dg-progress.done{width:100%;opacity:0}

/* Pantalla de carga: en vez de texto plano, un pulso */
.boot{gap:14px;align-content:center;font-weight:600;letter-spacing:.2px}
.boot::before{content:"";width:46px;height:46px;border-radius:50%;justify-self:center;
  border:3px solid rgba(51,227,207,.18);border-top-color:var(--dg-accent,#33e3cf);
  animation:dg-spin .8s linear infinite}
@keyframes dg-spin{to{transform:rotate(360deg)}}

/* ---------- 2. Botones vivos ---------- */
html .docgato-app .primary, html .docgato-app .secondary, html .docgato-app .text-button,
html .docgato-app .logout, html .docgato-app .modal-close, html .docgato-app .sim-number,
html .primary, html .secondary{
  border-radius: 14px !important;
  transition: transform .18s var(--dg-ease,cubic-bezier(.2,.75,.2,1)),
              box-shadow .2s ease, background-color .2s ease, border-color .2s ease, filter .2s ease, color .2s ease !important;
  will-change: transform; position: relative; overflow: hidden;
}
html .docgato-app .primary:hover:not(:disabled), html .primary:hover:not(:disabled){
  transform: translateY(-2px) !important;
  box-shadow: 0 0 0 1px rgba(51,227,207,.55), 0 14px 32px -8px rgba(51,227,207,.55) !important;
  filter: brightness(1.07);
}
html .docgato-app .secondary:hover:not(:disabled), html .secondary:hover:not(:disabled),
html .docgato-app .logout:hover{
  transform: translateY(-2px) !important;
  border-color: var(--dg-line-hot, #40e8d6) !important;
  box-shadow: 0 10px 24px -10px rgba(51,227,207,.45) !important;
}
html .docgato-app .text-button:hover{ transform: translateX(2px) !important; }
html .docgato-app .primary:active:not(:disabled), html .docgato-app .secondary:active:not(:disabled),
html .docgato-app .text-button:active, html .primary:active, html .secondary:active{
  transform: translateY(0) scale(.97) !important; transition-duration: .08s !important;
}
/* brillo que cruza el botón principal al pasar el cursor */
html .docgato-app .primary::after{content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(110deg,transparent 30%,rgba(255,255,255,.35) 50%,transparent 70%);
  transform:translateX(-120%);transition:transform .6s ease}
html .docgato-app .primary:hover::after{transform:translateX(120%)}
/* onda al hacer clic (la crea docgato-moderno.js) */
.dg-ripple{position:absolute;border-radius:50%;pointer-events:none;transform:scale(0);
  background:rgba(255,255,255,.35);animation:dg-ripple .55s ease-out forwards}
@keyframes dg-ripple{to{transform:scale(2.6);opacity:0}}

/* ---------- 3. Tarjetas, alternativas y menú ---------- */
html .docgato-app .mode, html .docgato-app .module-tile, html .docgato-app .theory-tile,
html .docgato-app .specialty-tile, html .docgato-app .room-topic, html .docgato-app .room-entry,
html .docgato-app .study-room-card, html .docgato-app .home-room, html .docgato-app button.card{
  transition: transform .22s var(--dg-ease,cubic-bezier(.2,.75,.2,1)), box-shadow .22s ease, border-color .22s ease !important;
}
html .docgato-app .mode:hover, html .docgato-app .module-tile:not(:disabled):hover,
html .docgato-app .theory-tile:hover, html .docgato-app .specialty-tile:hover,
html .docgato-app .room-topic:hover, html .docgato-app .room-entry:hover,
html .docgato-app .study-room-card:hover, html .docgato-app .home-room:hover, html .docgato-app button.card:hover{
  transform: translateY(-4px) !important;
  border-color: var(--dg-line-hot, #40e8d6) !important;
  box-shadow: 0 22px 44px -18px rgba(0,0,0,.55), 0 0 0 1px rgba(51,227,207,.25) !important;
}
html .docgato-app .answer{ border-radius: 14px !important; transition: transform .16s ease, border-color .16s ease, background-color .16s ease !important; }
html .docgato-app .answer:hover:not(:disabled){ transform: translateX(4px) !important; border-color: var(--dg-line-hot,#40e8d6) !important; }
html .docgato-app .answer.correct{ animation: dg-pop .35s ease; }
html .docgato-app .answer.wrong{ animation: dg-shake .35s ease; }
@keyframes dg-pop{50%{transform:scale(1.02)}}
@keyframes dg-shake{25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}

html .docgato-app .nav a{ transition: background-color .18s ease, color .18s ease, transform .18s ease !important; }
html .docgato-app .nav a:hover{ transform: translateX(3px); }

/* foco visible y bonito al usar teclado */
html .docgato-app :is(.primary,.secondary,.text-button,.answer,.nav a,button):focus-visible{
  outline: 2px solid var(--dg-accent-2,#7ff3e5) !important; outline-offset: 3px !important;
}

/* ---------- 4. Respeta a quien pide menos movimiento ---------- */
@media (prefers-reduced-motion: reduce){
  @view-transition { navigation: none; }
  *, *::before, *::after{ animation: none !important; transition-duration: .01ms !important; }
  html .docgato-app *:hover{ transform: none !important; }
}
