:root {
  --bg:       #ffffff;
  --text:     #000000;
  --border:   #000000;
  --hover:    #f5f5f5;
  --active:   #e0e0e0;
  --input-bg: #ffffff;
  --error:    #cc0000;
}
body.dark {
  --bg:       #121212;
  --text:     #e0e0e0;
  --border:   #555555;
  --hover:    #1e1e1e;
  --active:   #2a2a2a;
  --input-bg: #1e1e1e;
  --error:    #ff4444;
}

* { box-sizing: border-box; }

body {
  font-family: monospace;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.box {
  border: 1px solid var(--border);
  padding: 48px 40px;
  width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.box h1 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  letter-spacing: 0.02em;
}

.box input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  padding: 10px 12px;
  font-family: monospace;
  font-size: 14px;
  outline: none;
  text-align: center;
}

.box input:focus { background: var(--active); }

.btn {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--text);
  color: var(--bg);
  padding: 10px;
  cursor: pointer;
  font-family: monospace;
  font-size: 14px;
  letter-spacing: 0.04em;
}
.btn:hover    { opacity: 0.85; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.error {
  color: var(--error);
  font-size: 12px;
  min-height: 16px;
  text-align: center;
}

.hint {
  font-size: 11px;
  opacity: 0.5;
  text-align: center;
}

.theme-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  font-family: monospace;
  font-size: 11px;
  color: var(--text);
  padding: 4px 8px;
  opacity: 0.4;
}
.theme-btn:hover { opacity: 1; }