/* mbnt — deep-ocean blue theme derived from brand cyan #27add4 */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
}

:root {
  --bg-deep: #061c28;
  --brand: #27add4;
  --brand-bright: #5bc7e8;
  --text: #eaf6fb;
  --muted: #9cc4d6;
  --danger: #ff8a8a;
  --warning-bg: rgba(122, 78, 14, 0.5);
  --warning-fg: #ffd992;
  --warning-border: rgba(255, 200, 110, 0.35);
  --card: rgba(255, 255, 255, 0.055);
  --card-border: rgba(91, 199, 232, 0.24);
  --input-bg: rgba(4, 20, 28, 0.55);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  color: var(--text);
  background: linear-gradient(150deg, #061c28 0%, #0b3046 52%, #072634 100%) fixed;
}

/* Ambient drifting glows — the "flow" */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: -1;
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(36% 44% at 20% 26%, rgba(39, 173, 212, 0.22), transparent 70%),
    radial-gradient(30% 40% at 80% 74%, rgba(39, 173, 212, 0.15), transparent 70%);
  animation: drift 26s ease-in-out infinite alternate;
}

body::after {
  background: radial-gradient(26% 36% at 64% 18%, rgba(91, 199, 232, 0.12), transparent 70%);
  animation: drift 34s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
  from { transform: translate3d(-3%, -2%, 0) scale(1); }
  to   { transform: translate3d(3%, 2%, 0) scale(1.06); }
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 59px;
  padding: 0 22px;
}

.logo { align-self: stretch; }

.logo img {
  display: block;
  height: 100%;
  width: auto;
}
main { max-width: 640px; margin: 44px auto; padding: 0 20px; }

section {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 24px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(2, 14, 22, 0.22);
  animation: rise 0.7s cubic-bezier(0.22, 0.9, 0.32, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

h1 { margin: 0 0 18px; font-size: 1.3rem; font-weight: 650; letter-spacing: -0.01em; }

textarea, input[type="text"], input[type="password"] {
  width: 100%;
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid rgba(91, 199, 232, 0.28);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: inherit;
}

textarea:focus, input[type="text"]:focus, input[type="password"]:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(39, 173, 212, 0.22);
}

textarea { resize: vertical; }
textarea:disabled { opacity: 0.45; }

input[readonly] { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.83rem; }

.row { display: flex; align-items: center; gap: 12px; margin: 14px 0; }
.row label { color: var(--muted); }

/* Upload left, Create right */
.action-row { justify-content: space-between; }

button {
  background: var(--brand);
  color: #052230;
  border: none;
  border-radius: 9px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 640;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.06s ease;
}

button:hover:not(:disabled) {
  background: var(--brand-bright);
  box-shadow: 0 4px 18px rgba(39, 173, 212, 0.35);
}

button:active:not(:disabled) { transform: scale(0.98); }
button:disabled { opacity: 0.4; cursor: not-allowed; }
header form button {
  background: none;
  color: #fff;
  padding: 0;
  border-radius: 0;
  font-weight: 700;
  text-transform: uppercase;
}

header form button:hover:not(:disabled) {
  background: none;
  box-shadow: none;
}

.copy-row { margin: 14px 0; }
.copy-row label { display: block; color: var(--muted); margin-bottom: 6px; font-size: 0.9rem; }
.copy-box { position: relative; }
.copy-box input { width: 100%; padding-right: 46px; }
#passphrase-panel { margin-top: 18px; }
.passphrase-box { margin-top: 14px; }
.copy-inline {
  position: absolute;
  top: 0;
  right: 6px;
  bottom: 0;
  height: 29px;
  margin: auto;
  display: flex;
  align-items: center;
  background: none;
  border-radius: 0;
  padding: 0 10px;
  color: var(--brand-bright);
  font-size: 1.05rem;
  line-height: 1;
}
.copy-inline:hover:not(:disabled) { background: none; box-shadow: none; }
.secret-box .copy-inline { top: 10px; bottom: auto; margin: 0; }
#gen-btn { margin-top: 14px; width: 100%; }

a { color: var(--brand-bright); }

.warning {
  background: var(--warning-bg);
  color: var(--warning-fg);
  border: 1px solid var(--warning-border);
  border-radius: 9px;
  padding: 12px 14px;
  font-size: 0.92rem;
}

.error { color: var(--danger); }
.note { color: var(--muted); font-size: 0.9rem; }

#secret-out pre {
  background: var(--input-bg);
  border: 1px solid rgba(91, 199, 232, 0.28);
  border-radius: 9px;
  padding: 14px 48px 14px 14px;
  white-space: pre-wrap;
  word-break: break-word;
}


@media (prefers-reduced-motion: reduce) {
  body::before, body::after, section { animation: none; }
}
