:root {
  --bg: #0c0c0c;
  --surface: #141414;
  --border: #2a2a2a;
  --text: #f2f2f2;
  --muted: #8a8a8a;
  --accent: #ffffff;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  justify-content: center;
  padding: 2rem 1.25rem 3rem;
}

.wrap {
  width: 100%;
  max-width: 32rem;
}

.head {
  text-align: center;
  margin-bottom: 2rem;
}

.logo {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.logo .vpn {
  font-weight: 500;
  color: var(--muted);
}

.tagline {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.steps h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.steps p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.steps p strong {
  color: var(--text);
  font-weight: 500;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: #0c0c0c;
  border-color: var(--accent);
}

.btn-primary:hover:not(:disabled) {
  background: #e8e8e8;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: #5a5a5a;
  background: #1a1a1a;
}

.btn-ghost {
  margin-top: 0.75rem;
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
}

.btn-ghost:hover:not(:disabled) {
  color: var(--text);
  border-color: #5a5a5a;
}

.hint {
  min-height: 1.5rem;
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.hint.ok {
  color: #c8c8c8;
}

.hint.err {
  color: #d4d4d4;
}

.lbl {
  display: block;
  margin: 1.25rem 0 0.4rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.keybox {
  width: 100%;
  padding: 0.75rem 0.85rem;
  font-family: ui-monospace, monospace;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--text);
  background: #0a0a0a;
  border: 1px solid var(--border);
  border-radius: 8px;
  resize: vertical;
  min-height: 5rem;
}

.keybox::placeholder {
  color: #555;
}

.foot {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #444;
}

.btn-block {
  width: 100%;
}

.download-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.download-grid .btn {
  width: 100%;
}

body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  position: fixed;
  z-index: 101;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 2rem);
  max-width: 22rem;
  max-height: min(90vh, 32rem);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
}

.modal[hidden] {
  display: none;
}

.modal-inner {
  padding: 1.35rem 1.25rem 1.25rem;
}

.modal-badge {
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.modal-badge.ok {
  color: #b0b0b0;
}

.modal-badge.warn {
  color: #a8a8a8;
}

.modal-title {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
}

.modal-desc {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}

.modal-steps {
  margin: 0 0 1.25rem;
  padding-left: 1.2rem;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}

.modal-steps li {
  margin-bottom: 0.45rem;
}

.modal-steps strong {
  color: var(--text);
  font-weight: 500;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.modal-actions .btn {
  margin: 0;
}

.modal-close {
  margin-top: 0.25rem !important;
}
