/* 0rder66 theme: dark imperial palette, crimson accents, starfield backdrop. */

:root {
  --bg: #07080b;
  --card: #0f1116;
  --card-2: #151821;
  --text: #b9c0cc;
  --heading: #f2f4f8;
  --input-text: #d5dae3;
  --muted: #7a8394;
  --primary: #d11a2a;
  --primary-hover: #f02a3c;
  --border: #242936;
  --border-2: #2a3040;
  --shadow: 0 0 24px rgba(209, 26, 42, 0.12);
  --danger: #ff6b76;
  --danger-bg: #2a0e12;
  --warning: #e6b84a;
  --warning-bg: #261e0a;
  --ok: #d11a2a;
  --radius: 2px;
  --radius-sm: 2px;
}

* { box-sizing: border-box; }

html { font-size: 16px; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: var(--bg);
  background-image:
    radial-gradient(1px 1px at 20% 30%, #fff8, transparent),
    radial-gradient(1px 1px at 70% 20%, #fff6, transparent),
    radial-gradient(1px 1px at 40% 80%, #fff7, transparent),
    radial-gradient(1.5px 1.5px at 85% 65%, #fff5, transparent),
    radial-gradient(ellipse at 50% -10%, rgba(209, 26, 42, 0.18), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Eurostile', 'Bank Gothic', 'Trebuchet MS', 'Segoe UI', -apple-system, sans-serif;
  font-size: 0.875rem;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

header {
  margin-left: 1em;
  margin-top: 1em;
  margin-bottom: 1.5em;
}

h1 {
  margin: 0;
  color: var(--heading);
  font-size: 1.6875rem;
  font-weight: bold;
  line-height: 1.5em;
}

h2 {
  margin: 0 0 0.5em;
  color: var(--heading);
  font-size: 1.5rem;
  font-weight: bold;
  line-height: 1.5em;
}

h4 {
  margin: 0 0 0.5em;
  color: var(--heading);
  font-size: 1.125rem;
  line-height: 1.5em;
}

.tagline {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 0.875rem;
}

.card {
  background-color: var(--card);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 2em;
  box-shadow: var(--shadow);
  margin: 2em 0;
}

.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5em;
  border-bottom: 1px solid var(--border-2);
}

.tab {
  flex: 1;
  padding: 0.75rem 1rem;
  background: transparent;
  color: var(--text);
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s, border-color 0.15s;
}

.tab.active {
  color: var(--heading);
  border-bottom-color: var(--primary);
  font-weight: bold;
}

.tab:not(.active):hover {
  color: var(--heading);
}

.file-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 122px;
  background-color: var(--card-2);
  border: 1px dashed var(--border-2);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 1.5em;
  text-align: center;
  color: var(--input-text);
  transition: border-color 0.15s, background-color 0.15s, transform 0.15s;
}

.file-drop:hover {
  border-color: var(--primary);
}

.file-drop.drag {
  transform: scale(1.02);
  border-color: var(--primary);
  background-color: #1b1020;
}

.file-meta {
  color: var(--muted);
  font-size: 0.8125rem;
}

textarea {
  width: 100%;
  background-color: var(--card-2);
  color: var(--input-text);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 0.75rem;
  font-family: Monaco, monospace;
  font-size: 0.875rem;
  resize: vertical;
}

textarea:focus {
  outline: none;
  border-color: var(--primary);
}

input[type='text'] {
  width: 100%;
  background-color: var(--card-2);
  color: var(--input-text);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 0.75rem;
  font-family: Monaco, monospace;
  font-size: 0.875rem;
}

input[type='text']:focus {
  outline: none;
  border-color: var(--primary);
}

button {
  font-family: inherit;
  cursor: pointer;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.primary, a.primary {
  display: inline-block;
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.75rem;
  background-color: var(--primary);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: 0;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.15s;
}

.primary:hover:not(:disabled), .primary:active:not(:disabled) {
  background-color: var(--primary-hover);
}

.progress {
  margin-top: 1.25rem;
}

.bar {
  background-color: #1d212c;
  border-radius: var(--radius);
  height: 6px;
  overflow: hidden;
}

.fill {
  background-color: var(--ok);
  height: 100%;
  width: 0%;
  transition: width 0.1s;
}

.progress-label {
  margin-top: 8px;
  text-align: center;
  color: var(--muted);
  font-size: 0.8125rem;
}

.result {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-2);
}

.result label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--heading);
  font-size: 0.8125rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.passphrase-label {
  margin-top: 1rem;
}

.result-row {
  display: flex;
  gap: 8px;
  box-shadow: var(--shadow);
}

.result-row input {
  flex: 1;
}

.result-row button {
  padding: 0 1rem;
  background-color: var(--card);
  color: var(--heading);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: bold;
  -webkit-font-smoothing: antialiased;
}

.result-row button:hover {
  background-color: #1d212c;
}

.result-meta {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.8125rem;
}

.link {
  margin-top: 1rem;
  display: inline-block;
  background: none;
  border: none;
  color: var(--heading);
  padding: 0;
  font-size: 0.875rem;
  text-decoration: underline;
}

.error {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background-color: var(--danger-bg);
  border: 1px solid #5a1c24;
  border-radius: var(--radius);
  color: var(--danger);
  font-size: 0.875rem;
}

.warning {
  padding: 0.75rem 1rem;
  background-color: var(--warning-bg);
  border: 1px solid #5a4716;
  border-radius: var(--radius);
  color: var(--warning);
  font-size: 0.8125rem;
  margin: 1rem 0;
}

.muted { color: var(--muted); }

label[for='passphrase-input'] {
  display: block;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: var(--heading);
  font-size: 0.8125rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

#copy-text-btn {
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  background-color: var(--card);
  color: var(--heading);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: bold;
}

#copy-text-btn:hover {
  background-color: #1d212c;
}

footer {
  margin-top: 1.5rem;
  padding: 0 1em;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.6;
}

footer code {
  background: var(--card-2);
  padding: 1px 5px;
  border-radius: var(--radius);
  border: 1px solid var(--border-2);
}

h1 {
  text-transform: uppercase;
  letter-spacing: 0.35em;
  text-shadow: 0 0 14px rgba(209, 26, 42, 0.7);
}

h2 { text-transform: uppercase; letter-spacing: 0.1em; }

.card { border-top: 2px solid var(--primary); }

.tab { text-transform: uppercase; letter-spacing: 0.12em; }

.tagline { letter-spacing: 0.06em; }

.file-drop:hover, .file-drop.drag { box-shadow: 0 0 16px rgba(209, 26, 42, 0.3); }

.fill { box-shadow: 0 0 8px var(--primary); }

::selection { background: var(--primary); color: #fff; }
