*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0d1117; --surface: #161b22; --border: #30363d;
  --text: #c9d1d9; --muted: #8b949e; --accent: #58a6ff;
  --success: #3fb950; --warn: #d29922; --danger: #f85149;
  --font: 'Courier New', Courier, monospace;
  --max-w: 760px;
}

body {
  background: var(--bg); color: var(--text); font-family: var(--font);
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; padding: 2rem 1rem;
}

header { width: 100%; max-width: var(--max-w); margin-bottom: 2rem; }
header h1 { font-size: 1.5rem; color: var(--accent); letter-spacing: 0.05em; }
header p { color: var(--muted); font-size: 0.85rem; margin-top: 0.25rem; }
header a { color: var(--muted); font-size: 0.85rem; text-decoration: none; }
header a:hover { color: var(--accent); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 1.5rem; width: 100%; max-width: var(--max-w);
}

label {
  display: block; font-size: 0.8rem; color: var(--muted);
  margin-bottom: 0.4rem; text-transform: uppercase; letter-spacing: 0.05em;
}

textarea, input[type="password"], input[type="text"] {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text); font-family: var(--font);
  font-size: 0.9rem; padding: 0.65rem 0.75rem; resize: vertical; outline: none;
  transition: border-color 0.15s;
}
textarea:focus, input:focus { border-color: var(--accent); }
textarea { min-height: 280px; overflow-y: auto; }

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 8rem; -webkit-text-security: disc; }
.pw-wrap input.pw-visible { -webkit-text-security: none; }
.pw-actions {
  position: absolute; right: 0.4rem; top: 50%; transform: translateY(-50%);
  display: flex; gap: 0.2rem;
}
.pw-btn {
  font-size: 0.68rem; padding: 0.2rem 0.4rem;
  background: transparent; border: 1px solid var(--border);
  color: var(--muted); border-radius: 4px; white-space: nowrap;
}
.pw-btn:hover { border-color: var(--accent); color: var(--accent); opacity: 1; }

.row { display: flex; gap: 1rem; margin-top: 1rem; align-items: flex-end; }
.row .field { flex: 1; }

button {
  font-family: var(--font); font-size: 0.9rem; padding: 0.65rem 1.4rem;
  border: none; border-radius: 6px; cursor: pointer; transition: opacity 0.15s;
  white-space: nowrap;
}
button:hover { opacity: 0.85; }
button:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: #0d1117; font-weight: bold; }

pre {
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
  padding: 1rem; white-space: pre-wrap; word-break: break-all;
  font-family: var(--font); font-size: 0.88rem; line-height: 1.6;
  overflow-y: auto;
}

.content-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.5rem;
}
.expiry { font-size: 0.78rem; color: var(--warn); }

.actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; flex-wrap: wrap; justify-content: flex-end; }
.btn-copy { background: var(--accent); color: #0d1117; font-weight: bold; padding: 0.65rem 1.2rem; }

.divider { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.divider label { margin-bottom: 0.6rem; }

.app-links { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.app-btn {
  flex: 1 1 0; min-width: 0; text-align: center;
  color: var(--accent); background: transparent; border: 1px solid var(--accent);
  font-family: var(--font); font-size: 0.9rem; padding: 0.65rem 1.2rem;
  border-radius: 6px; cursor: pointer; transition: opacity 0.15s;
  text-decoration: none; display: inline-block;
}
.app-btn:hover { background: rgba(88,166,255,0.08); }

@media (max-width: 480px) {
  .app-btn { flex: 1 1 100%; }
  .btn-copy { width: 100%; }
  .row { flex-direction: column; align-items: stretch; }
  .row button { width: 100%; }
  input, textarea { font-size: 1rem; }
}

.error-msg {
  margin-top: 1rem; padding: 0.75rem 1rem;
  background: rgba(248,81,73,0.1); border: 1px solid var(--danger);
  border-radius: 6px; color: var(--danger); font-size: 0.85rem;
}

footer { margin-top: 3rem; color: var(--muted); font-size: 0.78rem; text-align: center; line-height: 1.8; }
