:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #f2f2f2;
  background: #000;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: #000;
}

button,
input {
  font: inherit;
}

#fl-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #000 center center / cover no-repeat;
}

#fl-background video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fl-app {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.fl-stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1920px;
  height: 1080px;
  transform: translate(-50%, -50%) scale(var(--fl-scale, 1));
  transform-origin: center center;
}

.fl-panel-background {
  position: absolute;
  left: 1049px;
  top: 353px;
  width: 679px;
  height: 374px;
  display: block;
  user-select: none;
  pointer-events: none;
}

.fl-portrait-mask {
  position: absolute;
  left: 1132px;
  top: 423px;
  width: 175px;
  height: 174px;
  overflow: hidden;
  background: #fff url("../ui/portrait-background.png") center / cover no-repeat;
}

.fl-portrait {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 0%;
  background: #fff;
}

.fl-portrait-frame {
  position: absolute;
  left: 1122px;
  top: 418px;
  width: 191px;
  height: 182px;
  display: block;
  pointer-events: none;
  user-select: none;
}

.fl-label {
  position: absolute;
  z-index: 2;
  color: #f1f1f1;
  font-size: 19px;
  line-height: 1;
  text-shadow: 0 1px 2px #000;
  white-space: nowrap;
}

.fl-label-user {
  left: 1318px;
  top: 474px;
}

.fl-label-password {
  left: 1331px;
  top: 525px;
}

.fl-user-picker {
  position: absolute;
  left: 1396px;
  top: 463px;
  width: 260px;
  z-index: 6;
}

.fl-user-control {
  position: relative;
  width: 260px;
  height: 41px;
  margin: 0;
  padding: 0 48px 0 13px;
  border: 0;
  outline: 0;
  display: flex;
  align-items: center;
  background-image: url("../ui/user-field-frame.webp"), url("../ui/user-field-background.webp");
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  background-size: 260px 41px, 255px 37px;
  color: #f5f5f5;
  cursor: pointer;
  text-align: left;
}

.fl-user-control:focus-visible {
  filter: brightness(1.18);
}

.fl-user-value {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  text-shadow: 0 1px 2px #000;
}

.fl-user-arrow {
  position: absolute;
  right: 0;
  top: 0;
  width: 41px;
  height: 41px;
  pointer-events: none;
  user-select: none;
}

.fl-user-control[aria-expanded="true"] .fl-user-arrow {
  transform: rotate(180deg);
}

.fl-user-menu {
  position: absolute;
  left: 1px;
  top: 43px;
  width: 258px;
  max-height: 250px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid #747474;
  background: rgba(18, 18, 18, 0.97);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.75);
}

.fl-user-option {
  width: 100%;
  min-height: 34px;
  padding: 6px 9px;
  border: 0;
  background: transparent;
  color: #e8e8e8;
  text-align: left;
  cursor: pointer;
}

.fl-user-option:hover,
.fl-user-option:focus-visible,
.fl-user-option[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.fl-user-option .fl-option-gm {
  margin-left: 6px;
  font-size: 11px;
  opacity: 0.68;
}

.fl-password-wrap {
  position: absolute;
  left: 1396px;
  top: 513px;
  width: 260px;
  height: 42px;
  background-image: url("../ui/password-field-frame.webp"), url("../ui/password-field-background.webp");
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  background-size: 260px 42px, 255px 37px;
}

.fl-password {
  width: 100%;
  height: 100%;
  padding: 0 13px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: 16px;
  text-shadow: 0 1px 2px #000;
}

.fl-password:focus-visible {
  filter: brightness(1.18);
}

.fl-connect {
  position: absolute;
  left: 1294px;
  top: 626px;
  width: 189px;
  height: 52px;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent url("../ui/join-button.webp") center / 189px 52px no-repeat;
  cursor: pointer;
}

.fl-connect:hover,
.fl-connect:focus-visible {
  background-image: url("../ui/join-button-hover.webp");
}

.fl-connect:disabled {
  filter: grayscale(1);
  opacity: 0.6;
  cursor: wait;
}

.fl-message {
  position: absolute;
  left: 1315px;
  top: 570px;
  width: 340px;
  min-height: 34px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffbcbc;
  font-size: 14px;
  text-align: center;
  text-shadow: 0 1px 2px #000;
}

.fl-loading {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 24px;
  color: rgba(255, 255, 255, 0.82);
  background: #000;
  font-size: 16px;
  text-align: center;
}

.fl-departure-loading {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  overflow: hidden;
  background: #000;
  pointer-events: all;
}

.fl-departure-loading-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 50%;
  border: 0;
}

.fl-loading-message {
  position: absolute;
  left: 50%;
  bottom: clamp(36px, 6vh, 72px);
  z-index: 3;
  max-width: min(760px, calc(100vw - 48px));
  transform: translateX(-50%);
  padding: 12px 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(10, 10, 10, 0.72);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.96);
  font-size: clamp(14px, 1.15vw, 18px);
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
  white-space: normal;
  pointer-events: none;
}

/* Em navegadores Chromium modernos, a transição entre /join e /game mantém
   o último quadro do documento antigo enquanto o novo documento é pintado. */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: fabula-hold-old-page 650ms ease both;
  z-index: 2;
}

::view-transition-new(root) {
  animation: fabula-reveal-new-page 650ms ease both;
  z-index: 1;
}

@keyframes fabula-hold-old-page {
  from { opacity: 1; }
  to { opacity: 1; }
}

@keyframes fabula-reveal-new-page {
  from { opacity: 0; }
  to { opacity: 1; }
}
