:root {
  color-scheme: dark;
  --text: #f6fbff;
  --muted: rgba(246, 251, 255, 0.64);
  --field: rgba(5, 13, 22, 0.3);
  --panel: rgba(208, 218, 216, 0.1);
  --bevel-light: rgba(255, 255, 255, 0.36);
  --bevel-mid: rgba(255, 255, 255, 0.16);
  --bevel-dark: rgba(0, 0, 0, 0.58);
  --accent: #b8ded8;
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Tahoma, "MS Sans Serif", Geneva, Verdana, sans-serif;
  letter-spacing: 0;
  color: var(--text);
  background: #071018;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.home {
  position: relative;
  overflow: hidden;
  background: #071018;
}

.home::before {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  content: "";
  background: linear-gradient(115deg, rgba(1, 9, 16, 0.76), rgba(1, 12, 19, 0.32) 46%, rgba(0, 0, 0, 0.68));
}

.scene-image {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  max-width: none;
  pointer-events: none;
  user-select: none;
  will-change: transform, width, height;
}

.login-shell {
  position: fixed;
  top: var(--login-y, 32vh);
  left: var(--login-x, 56vw);
  z-index: 2;
  width: min(calc(100vw - 36px), 298px);
  margin: 0;
  transform: translate(-50%, -50%) scale(var(--login-scale, 1));
  transform-origin: center;
}

.login-box {
  display: grid;
  gap: 9px;
  width: 100%;
  padding: 18px;
  border: 0;
  border-radius: 0;
  background: var(--panel);
  box-shadow:
    inset 1px 1px var(--bevel-light),
    inset -1px -1px var(--bevel-dark),
    inset 2px 2px var(--bevel-mid),
    var(--shadow);
  backdrop-filter: blur(10px) saturate(118%);
}

label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 34px;
  padding: 0 8px;
  border: 0;
  border-radius: 0;
  color: var(--text);
  background: var(--field);
  outline: none;
  box-shadow:
    inset 1px 1px var(--bevel-dark),
    inset -1px -1px var(--bevel-light);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:focus {
  background: rgba(5, 13, 22, 0.5);
  box-shadow:
    inset 1px 1px var(--bevel-dark),
    inset -1px -1px var(--bevel-light),
    0 0 0 1px rgba(246, 251, 255, 0.24);
}

button {
  justify-self: end;
  min-width: 76px;
  min-height: 30px;
  margin-top: 4px;
  padding: 0 12px;
  border: 0;
  border-radius: 0;
  color: rgba(246, 251, 255, 0.86);
  background: rgba(220, 226, 224, 0.14);
  box-shadow:
    inset 1px 1px var(--bevel-light),
    inset -1px -1px var(--bevel-dark);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

button:hover {
  background: rgba(220, 226, 224, 0.2);
}

button:active {
  box-shadow:
    inset 1px 1px var(--bevel-dark),
    inset -1px -1px var(--bevel-light);
}

.site-footer,
.rights-link {
  position: fixed;
  z-index: 2;
  bottom: 8px;
  color: rgba(255, 255, 255, 0.34);
  font-size: 0.68rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.site-footer {
  left: 10px;
  max-width: calc(100vw - 96px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rights-link {
  right: 10px;
  text-decoration: none;
  transition: color 140ms ease;
}

.rights-link:hover,
.rights-link:focus-visible {
  color: rgba(255, 255, 255, 0.82);
}

.rights {
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(115deg, rgba(1, 9, 16, 0.86), rgba(1, 12, 19, 0.68)),
    url("assets/christmas-island.jpg") 56% 32% / cover no-repeat fixed;
}

.rights-panel {
  width: min(100%, 680px);
  padding: 32px;
  border: 0;
  border-radius: 0;
  background: rgba(7, 14, 20, 0.68);
  box-shadow:
    inset 1px 1px var(--bevel-light),
    inset -1px -1px var(--bevel-dark),
    var(--shadow);
  backdrop-filter: blur(18px) saturate(132%);
}

.rights-panel h1 {
  margin: 0 0 20px;
  font-size: 2rem;
  line-height: 1;
}

.rights-panel p {
  margin: 0 0 14px;
  color: rgba(246, 251, 255, 0.84);
  line-height: 1.6;
}

.rights-panel a {
  color: var(--accent);
  text-decoration-color: rgba(159, 231, 220, 0.42);
  text-underline-offset: 3px;
}

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 0.86rem;
}

@media (max-width: 520px) {
  .home,
  .rights {
    padding: 18px;
  }

  .rights-panel {
    padding: 24px;
  }

  .rights-panel h1 {
    font-size: 1.75rem;
  }

  .site-footer {
    max-width: calc(100vw - 96px);
  }
}
