:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  background: #05080b;
}

.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* The images ARE the whole page — they fill the viewport edge to edge,
   no borders, and cross-fade from one to the next. */
.bg-rotator {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 1.8s ease-in-out;
}

.bg.is-active {
  opacity: 1;
}

/* Gentle top-left wash so the logo stays legible over bright water/snow. */
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(
    80% 70% at 10% 92%,
    rgba(0, 0, 0, 0.55),
    rgba(0, 0, 0, 0) 60%
  );
}

.logo {
  position: absolute;
  bottom: clamp(20px, 3.5vw, 56px);
  left: clamp(20px, 3.5vw, 56px);
  z-index: 3;
  width: min(41vw, 476px);
  height: auto;
  opacity: 0.65;
  filter: drop-shadow(0 12px 34px rgba(0, 0, 0, 0.7));
}

/* Login button — bottom center, glassy. */
.login-btn {
  position: absolute;
  bottom: clamp(28px, 4vw, 56px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  padding: 16px 40px;
  font: inherit;
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s ease, transform 0.1s ease;
}
.login-btn:hover {
  background: rgba(0, 0, 0, 0.78);
}
.login-btn:active {
  transform: translateX(-50%) scale(0.97);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  padding: 20px;
}
.modal-overlay.is-open {
  display: flex;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: #0d1218;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 32px 28px 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65);
}

.modal h2 {
  margin: 0 0 20px;
  font-size: 1.35rem;
  color: #fff;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover {
  color: #fff;
}

.modal label {
  display: block;
  margin: 0 0 6px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
}
.modal input {
  width: 100%;
  margin: 0 0 16px;
  padding: 11px 13px;
  font: inherit;
  color: #fff;
  background: #161d26;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
}
.modal input:focus {
  outline: none;
  border-color: rgba(120, 170, 255, 0.8);
}

.modal-hint {
  margin: 0 0 18px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

.modal-submit {
  width: 100%;
  padding: 12px;
  font: inherit;
  font-weight: 600;
  color: #05080b;
  background: #eaf2ff;
  border: none;
  border-radius: 9px;
  cursor: pointer;
}
.modal-submit:hover {
  background: #fff;
}
.modal-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

.modal-message {
  margin: 14px 0 0;
  font-size: 0.85rem;
  min-height: 1.1em;
}
.modal-message.is-error {
  color: #ff9a9a;
}
.modal-message.is-success {
  color: #9affc0;
}
