/* TempVault design system — dark, violet accent, glassy cards. */
:root {
  --bg: #09090b;
  --bg-2: #0d0d11;
  --card: rgba(255, 255, 255, 0.025);
  --card-hover: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #ededf2;
  --muted: #9b9ba7;
  --faint: #6b6b78;
  --accent: #8b5cf6;
  --accent-2: #a855f7;
  --accent-soft: rgba(139, 92, 246, 0.14);
  --good: #a855f7;
  --grad: linear-gradient(135deg, #8b5cf6, #a855f7);
  --radius: 16px;
  --maxw: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  background: transparent; /* interactive canvas (bg.js) paints the backdrop */
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }

/* ---- Top banner ---- */
.banner {
  background: var(--grad);
  color: #fff;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 40px;
  position: relative;
}
.banner button {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: #fff; cursor: pointer; font-size: 18px; opacity: 0.8;
}

/* ---- Nav ---- */
.nav {
  display: flex; align-items: center; gap: 28px;
  height: 64px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(12px); background: rgba(9, 9, 11, 0.7);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 9px; background: var(--grad);
  display: grid; place-items: center; font-size: 16px;
}
.nav-links { display: flex; gap: 24px; margin-left: 8px; }
.nav-links a { color: var(--muted); font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; font-weight: 600; font-size: 14px;
  padding: 11px 18px; border-radius: 11px; color: #fff;
  background: var(--grad); transition: transform 0.08s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.28);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4); }
.btn.ghost { background: transparent; border: 1px solid var(--border-strong); box-shadow: none; color: var(--text); }
.btn.ghost:hover { background: var(--card-hover); }
.btn.full { width: 100%; }
.btn.lg { padding: 14px 24px; font-size: 15px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.chip {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600;
  padding: 6px 13px; border-radius: 999px; background: var(--accent-soft);
  color: #c4b5fd; border: 1px solid rgba(139, 92, 246, 0.3);
}

/* ---- Hero ---- */
.hero { text-align: center; padding: 72px 0 40px; }
.hero h1 {
  font-size: clamp(40px, 7vw, 76px); line-height: 1.02; margin: 22px 0 16px;
  font-weight: 800; letter-spacing: -0.02em;
}
.hero p { color: var(--muted); font-size: 18px; max-width: 620px; margin: 0 auto; }

/* ---- Pricing toggle ---- */
.toggle-wrap { display: flex; justify-content: center; margin: 36px 0 8px; }
.toggle {
  display: flex; align-items: center; gap: 14px; background: var(--card);
  border: 1px solid var(--border); padding: 8px 16px; border-radius: 999px; font-size: 14px;
}
.toggle .switch {
  width: 44px; height: 24px; border-radius: 999px; background: #2a2a32; position: relative;
  cursor: pointer; transition: background 0.2s; border: 1px solid var(--border);
}
.toggle .switch.on { background: var(--accent); }
.toggle .switch::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; top: 2px; left: 2px; transition: left 0.2s;
}
.toggle .switch.on::after { left: 22px; }
.toggle .save { color: #c4b5fd; font-weight: 600; }
.toggle .lbl { color: var(--muted); cursor: pointer; }
.toggle .lbl.active { color: var(--text); font-weight: 600; }

/* ---- Pricing grid ---- */
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 22px; padding: 40px 0 80px; }
.plan {
  position: relative; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}
.plan:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.plan.popular { border-color: rgba(139, 92, 246, 0.5); box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.3), 0 20px 60px rgba(139, 92, 246, 0.15); }
.plan .pop-badge {
  position: absolute; top: 24px; right: 24px; font-size: 12px; font-weight: 700;
  background: var(--accent-soft); color: #c4b5fd; padding: 4px 10px; border-radius: 999px;
  border: 1px solid rgba(139, 92, 246, 0.4);
}
.plan .icon { width: 40px; height: 40px; border-radius: 11px; background: rgba(255,255,255,0.05); display: grid; place-items: center; margin-bottom: 16px; font-size: 18px; }
.plan h3 { margin: 0 0 4px; font-size: 20px; }
.plan .blurb { color: var(--muted); font-size: 14px; min-height: 40px; margin-bottom: 14px; }
.plan .price { font-size: 44px; font-weight: 800; letter-spacing: -0.02em; }
.plan .price small { font-size: 15px; font-weight: 500; color: var(--muted); }
.plan .price.free { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.plan .plus { color: #c4b5fd; font-weight: 600; font-size: 14px; margin: 18px 0 4px; }
.features { list-style: none; padding: 0; margin: 18px 0; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.features li { display: flex; gap: 10px; font-size: 14px; align-items: flex-start; }
.features li .tick { color: var(--good); flex-shrink: 0; }
.features li .cross { color: var(--faint); flex-shrink: 0; }
.features li.off { color: var(--faint); }

/* ---- Footer ---- */
.footer { border-top: 1px solid var(--border); padding: 48px 0 32px; margin-top: 40px; color: var(--muted); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer h4 { color: var(--text); font-size: 14px; margin: 0 0 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.footer a:hover { color: var(--text); }
.footer .legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--faint); }

/* ---- Dashboard ---- */
.app-wrap { display: grid; grid-template-columns: 380px 1fr; gap: 22px; padding: 36px 0 80px; min-height: 70vh; }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.addr-box {
  display: flex; align-items: center; gap: 10px; background: var(--bg-2);
  border: 1px solid var(--border-strong); border-radius: 11px; padding: 12px 14px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 15px; word-break: break-all;
}
.addr-box .grow { flex: 1; }
.icon-btn { background: var(--card-hover); border: 1px solid var(--border); border-radius: 9px; width: 36px; height: 36px; cursor: pointer; color: var(--text); display: grid; place-items: center; }
.icon-btn:hover { border-color: var(--border-strong); }
.field { width: 100%; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; color: var(--text); font-size: 14px; margin-top: 8px; }
.field:focus { outline: none; border-color: var(--accent); }
.row { display: flex; gap: 10px; align-items: center; }
.timer { font-size: 13px; color: var(--muted); }
.msg-list { display: flex; flex-direction: column; gap: 0; }
.msg-item { display: flex; gap: 14px; padding: 16px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.12s; }
.msg-item:hover { background: var(--card-hover); }
.msg-item .avatar { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: #c4b5fd; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.msg-item .meta { flex: 1; min-width: 0; }
.msg-item .from { font-weight: 600; font-size: 14px; }
.msg-item .subj { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-item .time { color: var(--faint); font-size: 12px; white-space: nowrap; }
.msg-item.unseen .from::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 7px; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .big { font-size: 40px; margin-bottom: 12px; opacity: 0.5; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 8px #22c55e; display: inline-block; }
.reader-head { padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.reader-head h2 { margin: 0 0 8px; font-size: 22px; }
iframe.mail-frame { width: 100%; min-height: 420px; border: 0; background: #fff; border-radius: 10px; }

/* ---- Docs ---- */
.docs-wrap { display: grid; grid-template-columns: 220px 1fr; gap: 40px; padding: 36px 0 80px; }
.docs-nav { position: sticky; top: 88px; align-self: start; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.docs-nav a { color: var(--muted); padding: 7px 12px; border-radius: 8px; }
.docs-nav a:hover { background: var(--card-hover); color: var(--text); }
.docs-content h1 { font-size: 34px; margin: 0 0 8px; }
.docs-content h2 { font-size: 24px; margin: 44px 0 12px; padding-top: 12px; }
.docs-content h3 { font-size: 17px; margin: 28px 0 8px; }
.docs-content p, .docs-content li { color: var(--muted); }
.method { display: inline-block; font-family: ui-monospace, monospace; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; margin-right: 8px; }
.method.get { background: rgba(34,197,94,0.15); color: #4ade80; }
.method.post { background: rgba(139,92,246,0.18); color: #c4b5fd; }
.method.delete { background: rgba(239,68,68,0.15); color: #f87171; }
.method.ws { background: rgba(59,130,246,0.15); color: #60a5fa; }
.endpoint { font-family: ui-monospace, monospace; font-size: 15px; color: var(--text); }
pre { background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; overflow-x: auto; font-size: 13px; line-height: 1.6; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
:not(pre) > code { background: var(--card-hover); padding: 2px 6px; border-radius: 5px; font-size: 13px; color: #c4b5fd; }
table.params { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
table.params th, table.params td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); }
table.params th { color: var(--text); font-size: 13px; }
table.params td { color: var(--muted); }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--bg-2); border: 1px solid var(--border-strong); padding: 12px 20px; border-radius: 12px; font-size: 14px; opacity: 0; transition: opacity 0.2s, transform 0.2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }

@media (max-width: 860px) {
  .nav-links, .footer-grid { display: none; }
  .app-wrap, .docs-wrap { grid-template-columns: 1fr; }
  .docs-nav { display: none; }
}
