:root {
  --bg-0: #040b1a;
  --bg-1: #07142b;
  --ink: #d6e4ff;
  --muted: #8aa4d6;
  --panel-bg: rgba(7, 17, 36, 0.58);
  --panel-border: rgba(135, 170, 235, 0.22);
  --ok: #5bc5a7;
  --warn: #7fa2d4;
  --bad: #d17893;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% 20%, var(--bg-1), var(--bg-0));
  color: var(--ink);
  font-family: "Segoe UI", Inter, Roboto, Arial, sans-serif;
}

#heroSvg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
}

.overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  padding: clamp(18px, 3vw, 36px);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.badbugsPlaque {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -46%);
  z-index: 3;
  pointer-events: auto;
  line-height: 0;
  text-decoration: none;
  color: inherit;
  border-radius: 14px;
  outline-offset: 6px;
  transition: transform 0.18s ease, filter 0.18s ease;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.45));
}

.badbugsPlaque:hover {
  transform: translate(-50%, -46%) scale(1.02);
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.5));
}

.badbugsPlaque:focus {
  outline: none;
}

.badbugsPlaque:focus-visible {
  outline: 3px solid rgba(127, 162, 212, 0.95);
  outline-offset: 8px;
}

.badbugsPlaque__svg {
  display: block;
  width: min(560px, 90vw);
  height: auto;
  max-height: min(268px, 38vh);
}

@media (max-height: 620px) {
  .badbugsPlaque {
    top: 52%;
    transform: translate(-50%, -40%);
  }

  .badbugsPlaque:hover {
    transform: translate(-50%, -40%) scale(1.02);
  }

  .badbugsPlaque__svg {
    max-height: min(220px, 32vh);
  }
}

.brand {
  position: relative;
  z-index: 4;
  pointer-events: auto;
  padding: 10px 14px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: var(--panel-bg);
  backdrop-filter: blur(5px);
}

.brand h1 {
  margin: 0;
  font-size: clamp(18px, 2.2vw, 28px);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.brand p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: clamp(11px, 1.3vw, 14px);
  letter-spacing: 0.06em;
  text-transform: lowercase;
}

.statusPanel {
  position: relative;
  z-index: 4;
  pointer-events: auto;
  min-width: 300px;
  max-width: 340px;
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: var(--panel-bg);
  backdrop-filter: blur(6px);
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.authForm {
  margin-top: 2px;
  display: grid;
  gap: 8px;
}

.formTitle {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.authForm input {
  width: 100%;
  border: 1px solid rgba(129, 156, 206, 0.34);
  background: rgba(7, 19, 41, 0.65);
  color: var(--ink);
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 12px;
}

.authForm select {
  width: 100%;
  border: 1px solid rgba(129, 156, 206, 0.34);
  background: rgba(7, 19, 41, 0.65);
  color: var(--ink);
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 12px;
}

.passwordRow {
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.passwordRow input {
  flex: 1;
  min-width: 0;
}

.togglePasswordBtn {
  flex-shrink: 0;
  min-width: 52px;
  border: 1px solid rgba(132, 165, 219, 0.35);
  background: rgba(35, 62, 109, 0.45);
  color: var(--ink);
  border-radius: 8px;
  padding: 7px 8px;
  cursor: pointer;
  font-size: 11px;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

.authForm input::placeholder {
  color: #7591c2;
}

.loginFieldsGroup {
  display: grid;
  gap: 8px;
}

.authForm.isAuthenticated .loginFieldsGroup {
  display: none;
}

.logoutRow {
  display: none;
}

.authForm.isAuthenticated .logoutRow {
  display: block;
}

.guestOnly {
  display: grid;
}

.authOnly {
  display: none;
}

.statusPanel.isAuthenticated .guestOnly {
  display: none;
}

.statusPanel.isAuthenticated .authOnly {
  display: block;
}

.settingsSection {
  border-top: 1px solid rgba(129, 156, 206, 0.25);
  margin-top: 4px;
  padding-top: 8px;
}

.settingsHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.settingsHeader .logoutWideBtn {
  width: calc(50% - 4px);
  padding: 6px 10px;
}

.settingsHeader .loginSubmitBtn {
  width: calc(50% - 4px);
  padding: 6px 10px;
}

.fieldLabel {
  font-size: 11px;
  color: var(--muted);
  text-transform: lowercase;
  letter-spacing: 0.03em;
}

.modalBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 17, 0.62);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  z-index: 20;
}

.modalBackdrop.isOpen {
  display: flex;
}

.modalCard {
  width: min(460px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: rgba(7, 17, 36, 0.9);
  backdrop-filter: blur(6px);
  display: grid;
  gap: 10px;
}

.modalHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.loginSubmitBtn,
.logoutWideBtn {
  border: 1px solid rgba(132, 165, 219, 0.35);
  background: rgba(35, 62, 109, 0.45);
  color: var(--ink);
  border-radius: 8px;
  padding: 7px 8px;
  cursor: pointer;
  font-size: 12px;
  text-transform: lowercase;
  width: 100%;
}

.statusItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: lowercase;
}

.badge.isOk {
  color: #e9fff8;
  background: rgba(42, 104, 93, 0.34);
  border-color: rgba(91, 197, 167, 0.36);
}

.badge.isWarn,
.badge.isUnknown {
  color: #e7f0ff;
  background: rgba(65, 88, 125, 0.35);
  border-color: rgba(127, 162, 212, 0.33);
}

.badge.isBad {
  color: #ffeef4;
  background: rgba(108, 49, 76, 0.38);
  border-color: rgba(209, 120, 147, 0.42);
}
