* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #0f1419; color: #eef2f5; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-text-size-adjust: 100%; }
.app { min-height: 100vh; display: flex; flex-direction: column; }
.cab { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: #1a222c; border-bottom: 1px solid #2b3642; position: sticky; top: 0; z-index: 2; }
.cab-titulo { font-weight: 600; font-size: 15px; letter-spacing: .02em; }
.cab-pos { font-size: 13px; color: #9fb0c0; font-variant-numeric: tabular-nums; }
.cuerpo { flex: 1; padding: 16px; }
.pie { padding: 10px 16px; text-align: center; font-size: 12px; color: #7f8f9f; border-top: 1px solid #2b3642; background: #1a222c; }
.ind::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #34c759; margin-right: 6px; animation: pulso 1.6s infinite; }
.ind-err::before { background: #ff9f0a; animation: none; }
.ind-fin::before { background: #6c7a89; animation: none; }
@keyframes pulso { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.pg { animation: aparecer .35s ease; }
@keyframes aparecer { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.pg-escena { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: #8fa3b8; margin-bottom: 6px; }
.pg-titulo { font-size: 26px; line-height: 1.2; margin: 0 0 14px; font-weight: 700; }
.pg-media { margin: 0 0 16px; border-radius: 12px; overflow: hidden; background: #000; }
.pg-media img, .pg-media video { display: block; width: 100%; height: auto; max-height: 70vh; object-fit: contain; }
.pg-embed { position: relative; padding-top: 56.25%; }
.pg-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pg-audio { background: #1a222c; padding: 14px; }
.pg-audio audio { width: 100%; }
.pg-texto { font-size: 18px; line-height: 1.6; color: #dbe3ea; }
.pg-texto p { margin: 0 0 1em; }
.pg-texto img { max-width: 100%; height: auto; border-radius: 8px; }
.pg-vacia { color: #8fa3b8; text-align: center; padding: 40px 0; }

.pg-msg { text-align: center; padding: 60px 12px; }
.pg-msg h1 { font-size: 28px; margin: 0 0 12px; }
.pg-msg p { font-size: 18px; color: #c6d0da; line-height: 1.5; }
.pg-icono { width: 72px; height: 72px; border-radius: 50%; background: #34c759; color: #fff; font-size: 40px; line-height: 72px; margin: 0 auto 20px; }
.pg-terminada h1 { color: #ff9f0a; }

/* Login */
.login-box { max-width: 360px; margin: 10vh auto; padding: 28px; background: #1a222c; border-radius: 14px; }
.login-box h1 { margin: 0 0 4px; font-size: 22px; }
.login-box .sub { margin: 0 0 20px; color: #8fa3b8; font-size: 14px; }
.login-box label { display: block; font-size: 13px; color: #9fb0c0; margin-bottom: 12px; }
.login-box input { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border-radius: 8px; border: 1px solid #2b3642; background: #0f1419; color: #fff; font-size: 16px; }
.login-box button { width: 100%; padding: 12px; border: 0; border-radius: 8px; background: #2f80ed; color: #fff; font-size: 16px; font-weight: 600; margin-top: 6px; }
.login-box .err { background: #5c1f1f; color: #ffd9d9; padding: 10px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; }

.pg-texto h2 { font-size: 1.35em; margin: 1em 0 .4em; }
.pg-texto h3 { font-size: 1.15em; margin: .9em 0 .3em; }
.pg-texto ul, .pg-texto ol { padding-left: 1.4em; margin: 0 0 1em; }
.pg-texto blockquote { border-left: 3px solid #4a5a6a; margin: 0 0 1em; padding-left: 12px; color: #b7c3ce; font-style: italic; }
.pg-texto a { color: #6db3ff; }

/* ---- Efectos ---- */
.fxt-fundido { animation: fxFundido 1.2s ease both; }
.fxt-subir   { animation: fxSubir .8s cubic-bezier(.2,.7,.2,1) both; }
.fxt-zoom    { animation: fxZoom .9s cubic-bezier(.2,.7,.2,1) both; }
.fxt-palabras .fx-w { display: inline-block; opacity: 0; animation: fxSubir .5s ease both; }
.fx-cursor::after { content: "▍"; animation: fxParpadeo .8s steps(1) infinite; color: #6db3ff; }

.fxm-fundido  { animation: fxFundido 1.2s ease both; }
.fxm-zoom     { animation: fxZoom 1s cubic-bezier(.2,.7,.2,1) both; }
.fxm-deslizar { animation: fxDeslizar .8s cubic-bezier(.2,.7,.2,1) both; }
.fxm-pulso    { animation: fxPulso 1.6s ease-in-out 2; }
.fxm-kenburns img, .fxm-kenburns video { animation: fxKenBurns 18s ease-in-out both; transform-origin: center; }
.fxm-kenburns { overflow: hidden; }

@keyframes fxFundido  { from { opacity: 0; } to { opacity: 1; } }
@keyframes fxSubir    { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes fxZoom     { from { opacity: 0; transform: scale(.75); } to { opacity: 1; transform: none; } }
@keyframes fxDeslizar { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: none; } }
@keyframes fxPulso    { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes fxKenBurns { from { transform: scale(1); } to { transform: scale(1.18); } }
@keyframes fxParpadeo { 50% { opacity: 0; } }

/* ---- Voz en directo ---- */
.voz-barra { position: sticky; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #14301f; border-top: 1px solid #1f4a30; }
.voz-btn { flex: 0 0 auto; padding: 12px 18px; border: 0; border-radius: 999px; background: #34c759; color: #fff; font-size: 16px; font-weight: 600; }
.voz-btn:disabled { opacity: .6; }
.voz-estado { font-size: 13px; color: #a8d8b5; }

/* ---- Reproductor de audio ---- */
.pg-audio { background: #1a222c; padding: 18px 16px; }
.rp { display: flex; align-items: center; gap: 16px; }
.rp-play { flex: 0 0 auto; width: 84px; height: 84px; border-radius: 50%; border: 0; background: #2f80ed; color: #fff; font-size: 34px; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(47,128,237,.45); cursor: pointer; }
.rp-play:active { transform: scale(.95); }
.rp-ico-play { margin-left: 5px; }
.rp-ico-pause { display: none; font-size: 26px; letter-spacing: -4px; }
.rp-on .rp-ico-play { display: none; }
.rp-on .rp-ico-pause { display: inline; }
.rp-on .rp-play { background: #34c759; box-shadow: 0 6px 18px rgba(52,199,89,.45); animation: rpPulso 1.4s ease-in-out infinite; }
.rp-der { flex: 1 1 auto; min-width: 0; }
.rp-barra { height: 10px; border-radius: 5px; background: #2b3642; overflow: hidden; cursor: pointer; }
.rp-prog { height: 100%; width: 0; background: #6db3ff; border-radius: 5px; transition: width .2s linear; }
.rp-tiempo { display: flex; justify-content: space-between; margin-top: 8px; font-size: 14px; color: #9fb0c0; font-variant-numeric: tabular-nums; }
@keyframes rpPulso { 0%,100% { box-shadow: 0 6px 18px rgba(52,199,89,.45); } 50% { box-shadow: 0 6px 28px rgba(52,199,89,.8); } }

/* ---- Compartir ---- */
.pg-media { position: relative; }
.pg-share { position: absolute; top: 10px; right: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 0; border-radius: 999px; background: rgba(15,20,25,.75); color: #fff; font-size: 14px; font-weight: 600; backdrop-filter: blur(4px); cursor: pointer; }
.pg-share-ico { width: 22px; height: 22px; flex: 0 0 auto; }
.pg-audio .rp { flex-wrap: wrap; }
.pg-audio .pg-share { position: static; order: 3; width: 100%; justify-content: center; margin-top: 14px; padding: 14px 18px; background: #2b3642; font-size: 17px; border-radius: 14px; }
.pg-audio .pg-share .pg-share-ico { width: 26px; height: 26px; }
.pg-share-fila { margin-top: 14px; text-align: right; }
.pg-share-fila .pg-share { position: static; background: #2b3642; }
.pg-firma { margin-top: 28px; padding-top: 14px; border-top: 1px solid #2b3642; font-size: 13px; color: #7f8f9f; text-align: center; }
.share-menu { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: #1a222c; border: 1px solid #2b3642; border-radius: 14px; padding: 8px; display: flex; flex-wrap: wrap; gap: 6px; z-index: 50; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.share-menu a, .share-menu button { padding: 10px 14px; border-radius: 10px; border: 0; background: #2b3642; color: #fff; font-size: 14px; text-decoration: none; cursor: pointer; }

/* ---- Marca de la empresa ---- */
:root { --marca: #2f80ed; }
.cab-logo { height: 22px; width: auto; vertical-align: middle; margin-right: 8px; border-radius: 4px; }
.rp-play { background: var(--marca); box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.login-box button { background: var(--marca); }
.pg-share-fila .pg-share, .pg-audio .pg-share { background: var(--marca); }
