*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --border: #2d3a4f;
  --text: #e7ecf3;
  --muted: #8b9cb3;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --success: #22c55e;
  --error: #ef4444;
  --radius: 10px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", "Fira Code", Consolas, monospace;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--muted);
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

.panel {
  margin-bottom: 1rem;
}

.panel label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

textarea {
  width: 100%;
  min-height: 220px;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.2s;
}

textarea:focus {
  outline: none;
  border-color: var(--accent);
}

textarea[readonly] {
  opacity: 0.95;
}

.actions {
  display: flex;
  gap: 0.75rem;
  margin: 1.25rem 0;
  flex-wrap: wrap;
}

button {
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.65rem 1.4rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

#encrypt-btn {
  background: var(--accent);
  color: #fff;
}

#encrypt-btn:hover:not(:disabled) {
  background: var(--accent-hover);
}

button.secondary {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
}

button.secondary:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--muted);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.copy-btn {
  margin-top: 0.5rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  padding: 0.45rem 1rem;
}

.copy-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.status {
  min-height: 1.5rem;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.status.success { color: var(--success); }
.status.error { color: var(--error); }

footer {
  margin-top: 2.5rem;
  text-align: center;
}

.notice {
  font-size: 0.75rem;
  color: var(--muted);
}

/* Admin styles */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.login-form {
  max-width: 360px;
  margin: 4rem auto;
}

.login-form input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.login-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.submission-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}

.submission-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.submission-card pre {
  background: var(--bg);
  border-radius: 6px;
  padding: 0.75rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  overflow-x: auto;
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.submission-card h3 {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 3rem 1rem;
}

.stats {
  font-size: 0.85rem;
  color: var(--muted);
}
