:root {
  color-scheme: dark;
  --bg: #101415;
  --surface-0: #0b0f10;
  --surface-1: #191c1e;
  --surface-2: #1d2022;
  --surface-3: #272a2c;
  --text: #e0e3e5;
  --muted: #9aa69e;
  --outline: #3c4a42;
  --primary: #4edea3;
  --primary-dark: #003824;
  --danger: #ff9e94;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { min-height: 100vh; margin: 0; color: var(--text); background: var(--bg); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
svg { width: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

body::before {
  content: ""; position: fixed; inset: 64px 0 auto; height: 460px; pointer-events: none; z-index: -1;
  background: radial-gradient(circle at 28% 20%, rgba(78,222,163,.09), transparent 35%), radial-gradient(circle at 75% 35%, rgba(130,160,190,.06), transparent 38%);
}

.topbar { height: 64px; padding: 0 max(24px, calc((100vw - 1040px)/2)); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--outline); background: rgba(16,20,21,.94); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--primary); text-decoration: none; font-size: 20px; font-weight: 650; letter-spacing: -.03em; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; color: var(--primary); }
.brand-mark svg { width: 27px; }
.secure-pill { color: var(--primary); border: 1px solid rgba(78,222,163,.35); background: rgba(78,222,163,.08); border-radius: 999px; padding: 6px 10px; font: 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.status-dot { display: inline-block; width: 6px; height: 6px; background: var(--primary); border-radius: 50%; margin-right: 5px; box-shadow: 0 0 10px var(--primary); }

main { width: min(100% - 32px, 1040px); margin: 0 auto; min-height: calc(100vh - 128px); }
.view { padding: 64px 0 80px; animation: enter .34s ease both; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-bottom: 38px; }
.eyebrow { margin: 0 0 14px; color: var(--primary); font: 11px var(--mono); letter-spacing: .16em; }
h1 { margin: 0; max-width: 660px; font-size: clamp(34px, 5vw, 58px); line-height: 1.08; letter-spacing: -.045em; font-weight: 620; }
.lede { max-width: 590px; margin: 20px 0 0; color: var(--muted); font-size: 16px; line-height: 1.7; }
.privacy-note { min-width: 220px; display: flex; align-items: center; gap: 12px; border-left: 2px solid var(--primary); padding: 6px 0 6px 16px; color: var(--primary); }
.privacy-note svg { width: 26px; }
.privacy-note span { display: flex; flex-direction: column; gap: 3px; }
.privacy-note strong { font: 12px var(--mono); letter-spacing: .08em; }
.privacy-note small { color: var(--muted); font-size: 12px; }

.workspace { display: flex; flex-direction: column; gap: 24px; }
.field { min-width: 0; }
.field label, .share-card label { display: block; margin-bottom: 9px; color: #c6d0ca; font: 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.label-row { display: flex; justify-content: space-between; align-items: center; }
.burn-label { display: flex; align-items: center; gap: 6px; color: var(--danger); font: 10px var(--mono); letter-spacing: .08em; }
.burn-label svg { width: 15px; }
.optional { color: var(--muted); font: 10px var(--mono); }
.textarea-wrap { position: relative; }
textarea, input, select { width: 100%; color: var(--text); background: var(--surface-1); border: 1px solid var(--outline); border-radius: 6px; outline: none; transition: border-color .16s, background .16s; }
textarea:hover, input:hover, select:hover { border-color: #56665c; }
textarea:focus, input:focus, select:focus { border-color: var(--primary); background: var(--surface-2); box-shadow: 0 0 0 1px rgba(78,222,163,.15); }
textarea { min-height: 250px; resize: vertical; padding: 20px; line-height: 1.65; font-size: 17px; border-style: dashed; border-color: rgba(255,158,148,.72); }
textarea:focus { border-color: var(--danger); box-shadow: 0 0 0 1px rgba(255,158,148,.12); }
textarea::placeholder, input::placeholder { color: #68716c; }
.char-count { position: absolute; right: 14px; bottom: 12px; padding: 5px 7px; background: var(--surface-0); color: var(--muted); border: 1px solid var(--outline); border-radius: 3px; font: 10px var(--mono); }
.fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
input, select { height: 50px; padding: 0 14px; }
input { font-family: var(--mono); font-size: 13px; }
.field small { display: block; color: #748078; margin-top: 7px; font-size: 11px; }
.input-action { position: relative; display: flex; }
.input-action input { padding-right: 52px; }
.icon-button { position: absolute; inset: 1px 1px 1px auto; width: 48px; display: grid; place-items: center; color: var(--muted); background: transparent; border: 0; cursor: pointer; }
.icon-button:hover { color: var(--primary); }
.icon-button .eye-closed { display: none; }
.icon-button.visible .eye-open { display: none; }
.icon-button.visible .eye-closed { display: block; }
.action-bar { display: flex; align-items: flex-end; justify-content: space-between; padding: 18px; background: var(--surface-0); border: 1px solid #171e1a; border-radius: 8px; }
.lifespan-field { width: 190px; }
.lifespan-field select { height: 44px; color: var(--primary); font: 12px var(--mono); cursor: pointer; }
.primary-button, .secondary-button { border: 0; border-radius: 5px; cursor: pointer; text-decoration: none; transition: transform .15s, background .15s, opacity .15s; }
.primary-button { min-height: 50px; padding: 0 28px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--primary); color: var(--primary-dark); font: 600 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.primary-button:hover { background: #6ffbbe; }
.primary-button:active { transform: scale(.985); }
.primary-button:disabled { cursor: wait; opacity: .64; }
.secondary-button { height: 46px; padding: 0 18px; border: 1px solid var(--outline); background: var(--surface-3); color: var(--text); font: 11px var(--mono); white-space: nowrap; }
.secondary-button:hover { border-color: var(--primary); color: var(--primary); }

.compact-view { max-width: 620px; margin: 0 auto; text-align: center; padding-top: 80px; }
.compact-view h1 { font-size: clamp(30px, 5vw, 44px); margin: auto; }
.centered { margin-left: auto; margin-right: auto; }
.state-icon { width: 64px; height: 64px; margin: 0 auto 22px; display: grid; place-items: center; color: var(--primary); border: 1px solid rgba(78,222,163,.45); background: rgba(78,222,163,.07); border-radius: 50%; }
.state-icon svg { width: 30px; }
.state-icon.success { color: var(--primary); }
.share-card, .unlock-card { margin-top: 36px; padding: 24px; text-align: left; background: var(--surface-1); border: 1px solid var(--outline); border-radius: 8px; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { min-width: 0; }
.share-meta { display: flex; justify-content: space-between; gap: 16px; margin-top: 14px; color: var(--muted); font: 10px var(--mono); }
.share-meta strong { color: var(--text); font-weight: 500; }
.warning-line { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 18px 0 28px; color: var(--danger); font: 11px var(--mono); }
.warning-line svg { width: 16px; }
.text-link { color: var(--muted); font: 11px var(--mono); text-underline-offset: 4px; }
.text-link:hover { color: var(--primary); }
.unlock-card { display: flex; flex-direction: column; gap: 20px; }
.primary-button.full { width: 100%; }
.form-error { min-height: 0; margin: -6px 0 -4px; color: var(--danger); font-size: 12px; }

.message-view { max-width: 840px; margin: 0 auto; }
.message-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.message-heading h1 { font-size: clamp(30px, 5vw, 46px); }
.burned-pill { display: flex; align-items: center; gap: 8px; color: var(--primary); font: 10px var(--mono); white-space: nowrap; }
.burned-pill span { width: 7px; height: 7px; background: var(--primary); border-radius: 50%; }
.message-card { position: relative; min-height: 300px; padding: 56px 24px 24px; background: var(--surface-1); border: 1px solid var(--outline); border-left: 2px solid var(--primary); border-radius: 7px; }
.copy-message { position: absolute; top: 12px; right: 12px; height: 34px; }
.message-card pre { margin: 0; color: var(--text); font: 15px/1.7 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.message-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; color: var(--muted); font-size: 12px; }
.new-button { min-height: 42px; }

footer { height: 64px; padding: 0 max(24px, calc((100vw - 1040px)/2)); display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--outline); background: var(--surface-0); color: var(--muted); font: 9px var(--mono); letter-spacing: .08em; }
footer span:last-child { color: var(--primary); }
footer i { display: inline-block; width: 6px; height: 6px; margin-right: 6px; background: var(--primary); border-radius: 50%; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 20; transform: translate(-50%, 20px); padding: 11px 16px; background: var(--text); color: var(--surface-0); border-radius: 4px; font: 11px var(--mono); opacity: 0; pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 700px) {
  .topbar { padding: 0 16px; }
  .secure-pill { font-size: 8px; }
  main { width: min(100% - 28px, 1040px); }
  .view { padding-top: 40px; }
  .hero { display: block; margin-bottom: 28px; }
  .privacy-note { margin-top: 24px; }
  .fields-grid { grid-template-columns: 1fr; }
  textarea { min-height: 225px; }
  .action-bar { align-items: stretch; flex-direction: column; gap: 18px; }
  .lifespan-field { width: 100%; }
  .primary-button { width: 100%; min-height: 54px; }
  .compact-view { padding-top: 52px; }
  .copy-row { flex-direction: column; }
  .copy-row .secondary-button { width: 100%; }
  .message-heading { align-items: flex-start; flex-direction: column; }
  .message-footer { align-items: stretch; flex-direction: column; gap: 16px; }
  footer { padding: 0 16px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
