:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-border: #262b36;
  --text: #e6e9ef;
  --muted: #9aa3b2;
  --accent: #4f8cff;
  --accent-hover: #3b74e0;
  --success: #3ddc84;
  --danger: #ff5c5c;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem 3rem;
}

header {
  text-align: center;
  max-width: 720px;
  margin-bottom: 1.5rem;
}

h1 {
  margin: 0 0 0.35rem;
  font-size: 1.9rem;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
}

.tagline {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
}

.panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  width: 100%;
  max-width: 1100px;
}

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

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: 0.4rem;
}

label:first-of-type {
  margin-top: 0;
}

textarea,
input[type="password"],
input[type="text"] {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
}

textarea:focus,
input:focus {
  outline: none;
  border-color: var(--accent);
}

textarea::placeholder,
input::placeholder {
  color: #5c6472;
}

textarea[readonly] {
  color: var(--text);
}

.count {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: right;
  min-height: 1rem;
}

.pass-row {
  display: flex;
  gap: 0.5rem;
}

.pass-row input {
  flex: 1;
}

.toggle {
  flex-shrink: 0;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 0 0.9rem;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
}

.toggle:hover {
  color: var(--text);
  border-color: var(--accent);
}

button.primary {
  margin-top: 0.75rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

button.primary:hover {
  background: var(--accent-hover);
}

button.primary:disabled {
  opacity: 0.6;
  cursor: progress;
}

button.ghost {
  align-self: flex-start;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
}

button.ghost:hover:not(:disabled) {
  border-color: var(--accent);
}

button.ghost:disabled {
  color: #5c6472;
  cursor: not-allowed;
}

.status {
  max-width: 1100px;
  width: 100%;
  text-align: center;
  font-weight: 600;
  min-height: 1.5rem;
  margin: 1.25rem 0 0;
}

.status.error {
  color: var(--danger);
}

.status.success {
  color: var(--success);
}

footer {
  max-width: 720px;
  margin-top: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}

footer p {
  margin: 0.25rem 0;
}
