/* Aspecto común de la página de videos y el panel de clips (los sirve /estilo.css).
   Página completa con aire tecnológico: fondo oscuro con cuadrícula y luces, tarjetas de vidrio,
   acentos cian y violeta. En computador, "Subir video" y "Mis videos" van lado a lado. */
:root {
  --papel: #0b0d12;
  --campo: rgba(11, 13, 18, 0.75);
  --superficie: rgba(20, 24, 33, 0.72);
  --superficie-2: rgba(29, 33, 48, 0.7);
  --tinta: #f2f4f8;
  --tinta-suave: #a3abbd;
  --linea: rgba(255, 255, 255, 0.08);
  --linea-fuerte: rgba(179, 166, 255, 0.3);
  --cian: #b3a6ff;
  --violeta: #8f7cff;
  --degradado: linear-gradient(120deg, #d6ceff 0%, #b3a6ff 40%, #8f7cff 100%);
  --degradado-boton: linear-gradient(120deg, #9d8cff 0%, #8f7cff 50%, #6d5cf5 100%);
  --boton: #8f7cff;
  --sobre-boton: #FFFFFF;
  --elegido: #8f7cff;
  --bien: #34D399; --bien-suave: rgba(52, 211, 153, 0.12);
  --espera: #FBBF24; --espera-suave: rgba(251, 191, 36, 0.12);
  --mal: #F87171; --mal-suave: rgba(248, 113, 113, 0.12);
  --trabajando: #b3a6ff; --trabajando-suave: rgba(179, 166, 255, 0.12);
  --f-titulo: "Sora", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-texto: "Manrope", "Helvetica Neue", Arial, system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--papel); color: var(--tinta); font-family: var(--f-texto); font-size: 17px; line-height: 1.5; min-height: 100vh; overflow-x: hidden; }
h1, h2, h3 { font-family: var(--f-titulo); margin: 0; line-height: 1.12; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--cian); }
button, input, select, textarea { font: inherit; color: inherit; }
.centro { width: 100%; max-width: 1280px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
@media (min-width: 720px) { .centro { padding-left: 32px; padding-right: 32px; } }

/* Fondo: cuadrícula que se desvanece y dos luces de color. */
.fondo-tec { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.fondo-tec::before { content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 85%); -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 85%); }
.fondo-tec i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; }
.fondo-tec i:nth-child(1) { width: 520px; height: 520px; background: #8f7cff; top: -220px; left: -160px; opacity: 0.32; }
.fondo-tec i:nth-child(2) { width: 560px; height: 560px; background: #3b4fd8; top: 30%; right: -260px; opacity: 0.22; }
.fondo-tec i:nth-child(3) { width: 420px; height: 420px; background: #6d5cf5; bottom: -260px; left: 30%; opacity: 0.16; }

/* Barra de arriba */
.barra { position: sticky; top: 0; z-index: 10; padding-top: env(safe-area-inset-top); background: rgba(11, 13, 18, 0.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--linea); }
.barra .centro { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 14px; flex-wrap: wrap; }
.marca { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-titulo); font-weight: 800; font-size: 24px; letter-spacing: -0.03em; color: var(--tinta); text-decoration: none; }
.marca b { color: var(--violeta); }
.marca .logo-k { width: 36px; height: 36px; border-radius: 10px; background: #0b0d12; border: 1px solid rgba(255,255,255,0.1); display: inline-flex; align-items: flex-end; justify-content: center; gap: 2px; padding-bottom: 9px; font-size: 21px; line-height: 0.74; letter-spacing: 0; box-shadow: 0 0 22px rgba(143, 124, 255, 0.35); }
.marca .logo-k i { width: 4px; height: 4px; border-radius: 50%; background: var(--violeta); }
.marca .chip { font-family: var(--f-texto); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cian); border: 1px solid var(--linea-fuerte); background: rgba(143, 124, 255, 0.1); border-radius: 999px; padding: 3px 10px; margin-left: 4px; }
.quien { display: flex; align-items: center; gap: 14px; font-size: 15px; color: var(--tinta-suave); flex-wrap: wrap; }
.quien a { color: var(--tinta); text-decoration: none; font-weight: 600; }
.quien a:hover { color: var(--cian); }
.quien button { background: transparent; border: 1px solid var(--linea-fuerte); color: var(--tinta); border-radius: 999px; padding: 6px 16px; cursor: pointer; }
.quien button:hover { border-color: var(--cian); }
.quien .tokens { font-weight: 700; color: var(--tinta); background: var(--superficie-2); border: 1px solid var(--linea-fuerte); border-radius: 999px; padding: 5px 12px; white-space: nowrap; }

/* Portada */
.portada { padding-block: 56px 28px; display: grid; gap: 40px; align-items: center; }
.portada-texto { display: grid; gap: 18px; }
@media (min-width: 980px) { .portada:has(#entrar:not([hidden])) { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); padding-block: 88px 72px; } }
.portada #entrar { justify-self: stretch; max-width: 460px; }
@media (min-width: 980px) { .portada #entrar { justify-self: end; } }
.portada .etiqueta { justify-self: start; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--cian); border: 1px solid rgba(179, 166, 255, 0.35); background: rgba(179, 166, 255, 0.08); border-radius: 999px; padding: 5px 14px; }
.portada .etiqueta::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cian); box-shadow: 0 0 10px var(--cian); }
.portada h1 { font-size: clamp(38px, 6vw, 72px); font-weight: 800; letter-spacing: -0.025em; max-width: 14ch; }
.portada h1 .brillo { background: var(--degradado); -webkit-background-clip: text; background-clip: text; color: transparent; }
.portada p { color: var(--tinta-suave); font-size: clamp(17px, 2vw, 20px); max-width: 52ch; }
.virtudes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.virtudes span { font-size: 15px; font-weight: 600; padding: 8px 14px; border-radius: 999px; background: var(--superficie); border: 1px solid var(--linea); }

main { padding-block: 8px 72px; display: grid; gap: 24px; }
.tablero { display: grid; gap: 24px; align-items: start; }
@media (min-width: 1040px) { .tablero { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.tarjeta { background: var(--superficie); border: 1px solid var(--linea); border-radius: 20px; padding: 24px; display: grid; gap: 20px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04); }
.tarjeta .tarjeta { background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.tarjeta > h2, .tarjeta h2 { font-size: 26px; font-weight: 700; }
#entrar { max-width: 460px; width: 100%; justify-self: center; }
.ayuda { color: var(--tinta-suave); font-size: 15px; }
label.titulo, .titulo { font-weight: 700; display: block; margin-bottom: 10px; }
.campo { display: grid; gap: 0; }
input[type=text], input[type=password], input[type=url], textarea, select {
  width: 100%; border: 1px solid var(--linea-fuerte); border-radius: 12px; background: var(--campo); padding: 14px; font-size: 17px; }
select option { background: #0F1626; }
input::placeholder, textarea::placeholder { color: #66748C; }
input:hover, textarea:hover, select:hover { border-color: rgba(179, 166, 255, 0.45); }
textarea { min-height: 90px; resize: vertical; }
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, .archivo:focus-within, a:focus-visible { outline: 2px solid var(--cian); outline-offset: 2px; }

/* Botones */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 0 26px; border-radius: 14px; border: 0; background: var(--degradado-boton); color: var(--sobre-boton); font-weight: 700; font-size: 18px; cursor: pointer; text-decoration: none; box-shadow: 0 8px 28px rgba(143, 124, 255, 0.4); }
.boton:hover { filter: brightness(1.12); }
.boton.ancho { width: 100%; }
.boton.suave { background: var(--superficie-2); color: var(--tinta); border: 1px solid var(--linea-fuerte); min-height: 46px; font-size: 16px; box-shadow: none; }
.boton.suave:hover { border-color: var(--cian); filter: none; }
.boton[disabled] { opacity: 0.5; cursor: wait; }

/* Elegir archivo */
.archivo { position: relative; border: 1.5px dashed var(--linea-fuerte); border-radius: 16px; padding: 28px 20px; text-align: center; background: linear-gradient(180deg, rgba(179, 166, 255, 0.05), rgba(143, 124, 255, 0.05)); cursor: pointer; display: grid; gap: 4px; justify-items: center; }
.archivo::before { content: ""; width: 44px; height: 44px; border-radius: 12px; margin-bottom: 6px; background: var(--degradado) center / 100% no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='17 8 12 3 7 8'/%3E%3Cline x1='12' y1='3' x2='12' y2='15'/%3E%3C/svg%3E") center / 70% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='17 8 12 3 7 8'/%3E%3Cline x1='12' y1='3' x2='12' y2='15'/%3E%3C/svg%3E") center / 70% no-repeat; }
.archivo:hover { border-color: var(--cian); }
.archivo input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.archivo strong { display: block; font-size: 19px; }
.archivo.lleno { border-style: solid; border-color: var(--bien); background: var(--bien-suave); }

/* Opciones como botones */
.opciones { display: flex; flex-wrap: wrap; gap: 10px; }
.opciones label { position: relative; }
.opciones input { position: absolute; opacity: 0; inset: 0; }
.opciones span { display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--linea-fuerte); background: var(--campo); font-weight: 600; cursor: pointer; }
.opciones span:hover { border-color: rgba(179, 166, 255, 0.55); }
.opciones input:checked + span { background: var(--degradado-boton); color: var(--sobre-boton); border-color: transparent; box-shadow: 0 0 20px rgba(143, 124, 255, 0.45); }
.opciones input:focus-visible + span { outline: 2px solid var(--cian); outline-offset: 2px; }
#campo-tipo-animacion { margin-top: 16px; padding: 16px; border-radius: 14px; border: 1px solid var(--linea); background: var(--superficie-2); }

.barra-progreso { height: 10px; border-radius: 999px; background: var(--superficie-2); overflow: hidden; }
.barra-progreso div { height: 100%; width: 0; background: var(--degradado); box-shadow: 0 0 12px var(--cian); }
.aviso { border-radius: 12px; padding: 12px 14px; font-size: 16px; border: 1px solid transparent; }
.aviso.mal { background: var(--mal-suave); color: var(--mal); border-color: rgba(248, 113, 113, 0.3); }
.aviso.bien { background: var(--bien-suave); color: var(--bien); border-color: rgba(52, 211, 153, 0.3); }
.aviso.espera { background: var(--espera-suave); color: var(--espera); border-color: rgba(251, 191, 36, 0.3); }

/* Mis videos */
.lista { display: grid; gap: 14px; }
.video { border: 1px solid var(--linea); border-radius: 16px; padding: 18px; display: grid; gap: 12px; background: var(--superficie-2); }
.video:hover { border-color: var(--linea-fuerte); }
.video .cabeza { display: flex; justify-content: space-between; align-items: start; gap: 10px; flex-wrap: wrap; }
.video .cabeza[data-abrir] { cursor: pointer; }
.video .cabeza[data-abrir]:hover h3 { color: var(--cian); }
.video.cerrado { padding-block: 14px; }
.estado-y-flecha { display: inline-flex; align-items: center; gap: 10px; }
.flecha { color: var(--tinta-suave); font-size: 18px; line-height: 1; }
.video.abierto .flecha { transform: rotate(180deg); }
/* En computador, "Mis videos" se queda quieto al lado y su lista se recorre por dentro. */
@media (min-width: 1040px) {
  #mis-videos { position: sticky; top: 88px; max-height: calc(100vh - 112px); grid-template-rows: auto minmax(0, 1fr); }
  #mis-videos .lista { overflow-y: auto; padding-right: 6px; margin-right: -6px; overscroll-behavior: contain; align-content: start; }
  #mis-videos .lista::-webkit-scrollbar { width: 8px; }
  #mis-videos .lista::-webkit-scrollbar-thumb { background: var(--linea-fuerte); border-radius: 999px; }
}
.video h3 { font-size: 18px; font-weight: 700; word-break: break-word; }
.video .detalle { color: var(--tinta-suave); font-size: 14px; }
.estado { font-weight: 700; font-size: 13px; padding: 4px 12px; border-radius: 999px; white-space: nowrap; border: 1px solid currentColor; }
.estado.listo { background: var(--bien-suave); color: var(--bien); }
.estado.en-cola, .estado.subiendo { background: var(--espera-suave); color: var(--espera); }
.estado.editando, .estado.revisando, .estado.exportando { background: var(--trabajando-suave); color: var(--trabajando); }
.estado.problema { background: var(--mal-suave); color: var(--mal); }
.pasos { display: flex; gap: 6px; }
.pasos i { flex: 1; height: 6px; border-radius: 999px; background: var(--superficie); border: 1px solid var(--linea); }
.pasos i.hecho { background: var(--bien); border-color: transparent; }
.pasos i.ahora { background: var(--cian); border-color: transparent; box-shadow: 0 0 10px var(--cian); }
.version { border-top: 1px solid var(--linea); padding-top: 12px; display: grid; gap: 10px; }
.version video { width: 100%; max-height: 70vh; border-radius: 12px; background: #000; border: 1px solid var(--linea); }
.descargas { display: flex; flex-wrap: wrap; gap: 8px; }
/* Clips de un grupo en "Mis videos", para verlos, descargarlos o mandarlos a editar. */
.mini-clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.mini-clip { display: grid; gap: 8px; align-content: start; padding: 10px; border-radius: 14px; border: 1px solid var(--linea); background: var(--campo); }
.mini-clip video { width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; border-radius: 10px; }
.mini-clip strong { font-size: 15px; line-height: 1.25; }
.mini-clip .boton { min-height: 42px; font-size: 15px; padding: 0 12px; }
.clip-elegido { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: var(--trabajando-suave); border: 1px solid rgba(179, 166, 255, 0.35); }
.clip-elegido .boton { min-height: 38px; font-size: 14px; padding: 0 14px; }
.cambios { display: grid; gap: 8px; }
details summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
details summary:hover { color: var(--cian); }
.vacio { text-align: center; color: var(--tinta-suave); padding: 28px; border: 1px dashed var(--linea); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
td, th { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--linea); }
th { color: var(--tinta-suave); font-weight: 600; }
.tabla { overflow-x: auto; }
.pestanas { display: flex; gap: 8px; }
.pestanas .boton.activa { background: var(--degradado-boton); color: var(--sobre-boton); border-color: transparent; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: no-preference) {
  .barra-progreso div { transition: width 0.3s; }
  .boton, .opciones span, .archivo, input, textarea, select, .video { transition: border-color 0.2s, filter 0.2s, box-shadow 0.2s; }
  .fondo-tec i { animation: flotar 18s ease-in-out infinite alternate; }
  .fondo-tec i:nth-child(2) { animation-duration: 22s; }
  @keyframes flotar { to { transform: translate(60px, 40px) scale(1.1); } }
}
