body { padding: 0; margin: 0 }
#unity-container { position: absolute }
#unity-container { width: 100%; height: 100% }
#unity-canvas { background: #231F20 }
#unity-loading-bar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none }
#unity-logo { width: 154px; height: 130px; background: url('unity-logo-dark.png') no-repeat center }
#unity-progress-bar-empty { width: 141px; height: 18px; margin-top: 10px; margin-left: 6.5px; background: url('progress-bar-empty-dark.png') no-repeat center }
#unity-progress-bar-full { width: 0%; height: 18px; margin-top: 10px; background: url('progress-bar-full-dark.png') no-repeat center }
#unity-footer { position: fixed; width: 100%; bottom: 0; margin-top: 5px; line-height: 38px; }
#unity-webgl-logo { float:left; width: 204px; height: 38px; background: url('webgl-logo.png') no-repeat center }
#unity-build-title { float: right; margin-right: 10px; line-height: 38px; font-family: arial; font-size: 18px }
#unity-fullscreen-button { cursor:pointer; float: right; width: 38px; height: 38px; background: url('fullscreen-button.png') no-repeat center }
#unity-webxr-link { float: left; margin-right: 10px; line-height: 38px; font-family: arial; font-size: 18px }

/* Sala de calma: botón grande y legible para entrar en VR */
#entervr { float: right; height: 38px; padding: 0 16px; margin-left: 8px; border: 0; border-radius: 6px; font: 600 16px system-ui, sans-serif; }
#entervr:enabled { background-color: #123d2f; color: #faf5eb; cursor: pointer; }
#entervr:disabled { background-color: #e4ddd2; color: #8a8278; }
#enterar { display: none; }

/* ───────── Portada de la Sala de calma ───────── */
#portada {
  position: fixed; inset: 0; z-index: 10;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  padding: 24px 20px;
  background: radial-gradient(circle at 50% 30%, #f6f8ef 0%, #e4ecd9 70%, #d6e2c8 100%);
  color: #123d2f;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-y: auto;
  opacity: 1; transition: opacity .6s ease;
}
#portada.portada-oculta { opacity: 0; pointer-events: none; }

#portada-tarjeta {
  max-width: 660px; width: 100%;
  background: rgba(255, 253, 249, .82);
  border: 1px solid rgba(34, 51, 58, .10);
  border-radius: 18px;
  padding: 32px 34px 26px;
  box-shadow: 0 12px 40px rgba(34, 51, 58, .10);
  text-align: center;
}
/* Los dos proyectos, uno junto a otro: BIVALIA (en color) sobre blanco y UPRAISE (en negativo) sobre una banda oscura */
#portada-logos { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: stretch; margin-bottom: 20px; }
#portada-logo-marco, #portada-logo-marco-oscuro {
  display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; padding: 10px 20px;
}
#portada-logo-marco { background: #fff; border: 1px solid rgba(18,61,47,.12); }
#portada-logo-marco-oscuro { background: #123d2f; }
#portada-logo { height: 54px; width: auto; display: block; }
.portada-logo-upraise { height: 40px; width: auto; display: block; }
#portada-logo-texto { font-weight: 700; letter-spacing: .12em; font-size: 22px; color: #123d2f; }
.portada-logo-texto-claro { font-weight: 700; letter-spacing: .22em; font-size: 22px; color: #faf5eb; }

#portada h1 { margin: 0; font-size: 42px; font-weight: 600; letter-spacing: .01em; }
.portada-lema { margin: 6px 0 18px; font-size: 18px; color: #5b6b70; }
.portada-texto { margin: 0 0 14px; font-size: 17px; line-height: 1.55; text-align: left; }
.portada-texto strong { font-weight: 600; }
.portada-como { margin: 0 0 24px; font-size: 15px; line-height: 1.5; color: #5b6b70; text-align: left; }

#portada-botones { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
#portada-botones button {
  font: 600 18px/1 system-ui, sans-serif;
  padding: 16px 30px; min-height: 52px;
  border: 0; border-radius: 10px; cursor: pointer;
  transition: background-color .2s ease, transform .1s ease;
}
#portada-entrar { background: #123d2f; color: #faf5eb; }
#portada-entrar:hover:enabled { background: #1b5541; }
#portada-entrar:disabled { background: #cfc5b6; color: #7c7468; cursor: progress; }
#portada-vr { background: #f29a2e; color: #123d2f; }
#portada-vr:hover { background: #f5ae55; }
#portada-tutorial { background: transparent; color: #123d2f; box-shadow: inset 0 0 0 2px #123d2f; }
#portada-tutorial:hover { background: rgba(18, 61, 47, .08); }
#portada-tutorial span { font-weight: 400; opacity: .75; }
#portada-botones button:active:enabled { transform: translateY(1px); }
#portada-botones button:focus-visible { outline: 3px solid #1f7a3c; outline-offset: 3px; }

#portada-progreso { height: 4px; margin-top: 18px; border-radius: 2px; background: rgba(34, 51, 58, .12); overflow: hidden; }
#portada-progreso-relleno { width: 0; height: 100%; background: #1f7a3c; transition: width .2s ease; }

/* Pie claro: los logotipos del grupo y del laboratorio son en positivo */
#portada-pie {
  max-width: 660px; width: 100%;
  background: rgba(255, 253, 249, .9); color: #3f4f49;
  border: 1px solid rgba(18, 61, 47, .10);
  border-radius: 14px; padding: 16px 22px;
  font-size: 13px; line-height: 1.5; text-align: center;
}
#portada-pie p { margin: 0 0 4px; }
#portada-pie strong { color: #123d2f; font-weight: 600; }
#portada-pie a { color: #1f7a3c; }
#portada-pie-marcas { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 28px; margin-bottom: 12px; }
.portada-marca { height: 46px; width: auto; }
.portada-financiacion { color: #6c7a74; font-size: 11.5px; }

@media (max-width: 520px) {
  #portada-tarjeta { padding: 24px 20px 20px; }
  #portada h1 { font-size: 32px; }
  .portada-texto { font-size: 16px; }
  #portada-botones button { width: 100%; }
  #portada-logo { height: 44px; }
  .portada-logo-upraise { height: 32px; }
  .portada-marca { height: 38px; }
}

/* Vídeo de cómo se juega */
#tutorial { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(10, 24, 19, .82); }
#tutorial[hidden] { display: none; }
#tutorial-caja { width: min(960px, 100%); background: #0f2a21; border-radius: 14px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45); }
#tutorial-cabecera { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 10px 20px; color: #faf5eb; }
#tutorial-cabecera h2 { margin: 0; font: 600 18px/1.2 system-ui, sans-serif; }
#tutorial-cerrar { width: 40px; height: 40px; border: 0; border-radius: 8px; background: rgba(250, 245, 235, .12);
  color: #faf5eb; font-size: 18px; cursor: pointer; }
#tutorial-cerrar:hover { background: rgba(250, 245, 235, .22); }
#tutorial-cerrar:focus-visible { outline: 3px solid #f29a2e; outline-offset: 2px; }
#tutorial-video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
#tutorial-aparte { margin: 0; padding: 8px 20px 12px; font: 14px/1.4 system-ui, sans-serif; color: rgba(250, 245, 235, .75); }
#tutorial-aparte a { color: #f29a2e; }
/* Selector de versión de los paneles */
#portada-version { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 18px; padding: 4px;
  background: rgba(18, 61, 47, .07); border-radius: 12px; flex-wrap: wrap; justify-content: center; }
.portada-version-titulo { font: 600 14px/1 system-ui, sans-serif; color: #5b6b70; padding: 0 10px 0 8px; }
#portada-version button { font: 500 15px/1 system-ui, sans-serif; color: #123d2f; background: transparent;
  border: 0; border-radius: 9px; padding: 10px 14px; cursor: pointer; }
#portada-version button:hover { background: rgba(18, 61, 47, .08); }
#portada-version button[aria-checked="true"] { background: #fffdf9; box-shadow: 0 1px 4px rgba(18, 61, 47, .18); font-weight: 600; }
#portada-version button:focus-visible { outline: 3px solid #1f7a3c; outline-offset: 2px; }
.portada-version-plus { display: inline-block; margin-left: 4px; padding: 3px 7px; border-radius: 6px; background: #f29a2e;
  color: #123d2f; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; vertical-align: 1px; }
@media (max-width: 520px) { #portada-version { display: flex; } .portada-version-titulo { width: 100%; text-align: center; padding: 4px 0; } }
