:root {
  color-scheme: dark;
  --bg: #070b14;
  --bg-soft: #0b1220;
  --panel: rgba(13, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --panel-soft: rgba(30, 41, 59, 0.72);
  --border: rgba(148, 163, 184, 0.18);
  --border-strong: rgba(125, 211, 252, 0.34);
  --text: #f8fafc;
  --muted: #9aa8bd;
  --muted-strong: #cbd5e1;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --danger: #fb7185;
  --weak: #f97316;
  --warning: #facc15;
  --strong: #22c55e;
  --very-strong: #2dd4bf;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(14, 165, 233, 0.28), transparent 34rem),
    radial-gradient(circle at 88% 12%, rgba(45, 212, 191, 0.16), transparent 28rem),
    linear-gradient(180deg, #08111f 0%, var(--bg) 54%, #05070d 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent 76%);
}

button,
input {
  font: inherit;
}

button {
  min-height: 46px;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid rgba(56, 189, 248, 0.8);
  outline-offset: 3px;
}

.page-shell {
  display: flex;
  flex-direction: column;
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(56, 189, 248, 0.42);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.2), rgba(45, 212, 191, 0.08));
  color: #e0f2fe;
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.18);
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.68);
  color: var(--muted-strong);
  font-size: 0.84rem;
  font-weight: 700;
}

.app-shell {
  flex: 1;
  padding: 28px 0 34px;
}

.hero {
  max-width: 820px;
  margin-bottom: 22px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 9px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(2.25rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

h2 {
  margin-bottom: 0;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.subtitle {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted-strong);
  font-size: clamp(1rem, 1.8vw, 1.16rem);
  line-height: 1.7;
}

.security-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  padding: 26px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.92)),
    var(--panel-strong);
  box-shadow: var(--shadow);
}

.card-glow {
  position: absolute;
  top: -120px;
  right: -120px;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.16);
  filter: blur(18px);
}

.card-header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.checker-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 20px;
}

.analyzer-panel,
.checks-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.68);
}

.analyzer-panel {
  padding: 22px;
}

.checks-panel {
  padding: 22px;
}

.password-form {
  display: grid;
  gap: 14px;
}

label {
  color: var(--muted-strong);
  font-weight: 800;
}

.password-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: var(--radius-sm);
  padding: 15px 16px;
  background: rgba(2, 6, 23, 0.74);
  color: var(--text);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

input::placeholder {
  color: #64748b;
}

input:focus {
  border-color: var(--accent);
  box-shadow:
    0 0 0 4px rgba(56, 189, 248, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

button {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 850;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}

.primary-button {
  width: 100%;
  background: linear-gradient(135deg, #67e8f9, var(--accent-strong));
  color: #03111d;
  box-shadow: 0 18px 38px rgba(14, 165, 233, 0.22);
}

.primary-button:hover {
  box-shadow: 0 20px 44px rgba(14, 165, 233, 0.3);
}

.ghost-button {
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(30, 41, 59, 0.86);
  color: var(--text);
}

.score-block {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.result-panel {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius);
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(30, 41, 59, 0.74), rgba(2, 6, 23, 0.62));
}

.result-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.level-text {
  display: block;
  color: var(--muted-strong);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.score-text {
  margin: 10px 0 0;
  color: var(--muted-strong);
  font-weight: 700;
}

.score-meter {
  display: grid;
  gap: 8px;
}

.score-scale {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.score-bar {
  position: relative;
  overflow: hidden;
  height: 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(251, 113, 133, 0.22), rgba(249, 115, 22, 0.2), rgba(250, 204, 21, 0.2), rgba(34, 197, 94, 0.2), rgba(45, 212, 191, 0.22)),
    rgba(2, 6, 23, 0.72);
  box-shadow: inset 0 1px 8px rgba(0, 0, 0, 0.38);
}

.score-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--danger);
  box-shadow: 0 0 24px currentColor;
  transition: width 0.28s ease, background 0.28s ease;
}

.state-very-weak .level-text {
  color: var(--danger);
}

.state-weak .level-text {
  color: var(--weak);
}

.state-medium .level-text {
  color: var(--warning);
}

.state-strong .level-text {
  color: var(--strong);
}

.state-very-strong .level-text {
  color: var(--very-strong);
}

.advice-box {
  margin-top: 22px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(8, 47, 73, 0.24);
}

.advice-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.advice-heading span {
  color: var(--accent);
  font-weight: 900;
}

.advice-box p {
  margin-bottom: 0;
  color: var(--muted-strong);
  line-height: 1.65;
}

.checks-heading {
  margin-bottom: 14px;
}

.checks-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 11px;
  align-items: start;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  padding: 12px;
  background: rgba(2, 6, 23, 0.38);
}

.check-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 950;
}

.check-item.pass {
  border-color: rgba(34, 197, 94, 0.24);
}

.check-item.fail {
  border-color: rgba(251, 113, 133, 0.18);
}

.check-item.pass .check-icon {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
}

.check-item.fail .check-icon {
  background: rgba(251, 113, 133, 0.15);
  color: #fda4af;
}

.check-label {
  display: block;
  color: #e2e8f0;
  font-weight: 850;
  line-height: 1.35;
}

.check-detail {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.info-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(15, 23, 42, 0.66);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
}

.info-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: 12px;
  background: rgba(8, 47, 73, 0.38);
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 900;
}

.info-card h2 {
  margin-bottom: 8px;
}

.info-card p {
  margin-bottom: 0;
  color: var(--muted-strong);
  line-height: 1.6;
}

.site-footer {
  padding: 18px 0 28px;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

@media (max-width: 940px) {
  .checker-grid {
    grid-template-columns: 1fr;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .page-shell {
    width: min(100% - 24px, 1180px);
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 0;
  }

  .app-shell {
    padding-top: 16px;
  }

  .security-card {
    border-radius: 18px;
    padding: 16px;
  }

  .card-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .analyzer-panel,
  .checks-panel {
    padding: 16px;
  }

  .password-row {
    grid-template-columns: 1fr;
  }

  .ghost-button {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .brand {
    align-items: flex-start;
  }

  .brand span:last-child {
    line-height: 1.25;
  }

  .level-text {
    font-size: 2rem;
  }
}
