:root {
  --bg: #05060d;
  --panel: rgba(16, 18, 35, 0.86);
  --text: #f3f4ff;
  --muted: #b7c0ff;
  --accent-soft: #9f9dff;
  --border: rgba(255, 255, 255, 0.2);
  --shadow: 0 16px 36px rgba(3, 7, 28, 0.65);
  --radius-large: 24px;
}

@font-face {
  font-family: "Doctor Glitch";
  src: url("../assets/fonts/Doctor Glitch.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  padding: 0 0.75rem;
  display: grid;
  place-items: center;
  background:
    linear-gradient(125deg, rgba(6, 9, 24, 0.8), rgba(3, 6, 20, 0.94)),
    url("../assets/images/background.avif") center / cover no-repeat;
}

.landing {
  width: min(680px, calc(100% - 1.5rem));
  max-width: 100%;
  min-height: 100dvh;
  display: grid;
  place-items: center;
}

.landing-panel {
  text-align: center;
  width: min(440px, calc(100% - 0.75rem));
  max-width: 100%;
  padding: clamp(1rem, 4vw, 2rem);
  border-radius: var(--radius-large);
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  display: grid;
  gap: 1.2rem;
}

.landing-panel.is-hidden {
  display: none;
}

.landing-title,
.panel-title {
  margin: 0;
  font-family: "Doctor Glitch", "Segoe UI", sans-serif;
  line-height: 1.1;
  width: 100%;
  max-width: 100%;
}

.landing-title {
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  font-size: clamp(1.1rem, 4.5vw, 2.5rem);
}

.panel-title {
  font-size: clamp(1rem, 4vw, 2rem);
  letter-spacing: 0.04em;
}

.role-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.login-form {
  text-align: left;
  display: grid;
  gap: 0.6rem;
}

.login-form label {
  font-size: 0.9rem;
  color: var(--muted);
}

.login-form input {
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  border-radius: 12px;
  padding: 0.75rem;
  min-height: 44px;
  font-size: 1rem;
}

.login-form input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(125, 231, 255, 0.22);
  border-color: rgba(125, 231, 255, 0.8);
}

.btn {
  border: 1px solid var(--accent-soft);
  background: linear-gradient(130deg, rgba(125, 231, 255, 0.2), rgba(159, 157, 255, 0.18));
  color: var(--text);
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  font-family: "Doctor Glitch", "Segoe UI", sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  min-width: 150px;
  min-height: 48px;
  cursor: pointer;
}

.btn:hover,
.btn:focus-visible {
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(125, 231, 255, 0.25);
}

.btn-link {
  min-width: 120px;
  background: rgba(255, 255, 255, 0.1);
  border-color: transparent;
}

.feedback {
  margin: 0;
  min-height: 1.2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.feedback.ok {
  color: #76f0a5;
}

.feedback.error {
  color: #ff9090;
}

.invite-text {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 520px) {
  .landing-panel {
    width: min(440px, calc(100vw - 1.5rem));
  }

  .role-actions,
  .landing-panel .btn {
    width: 100%;
  }

  .role-actions {
    flex-direction: column;
  }
}
