/* CyberPrime TempMail — styles */
:root {
  --bg: #09090d;
  --surface: #121219;
  --surface-2: #181922;
  --surface-3: #20222f;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.13);
  --text: #f4f4f6;
  --muted: #a1a1aa;
  --dim: #71717a;
  --p1: #6d7cf0;
  --p2: #7b4fc9;
  --p-soft: rgba(109, 124, 240, 0.14);
  --grad: linear-gradient(135deg, var(--p1), var(--p2));
  --grad-hot: linear-gradient(135deg, #f59e0b, #ef4444);
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;
  --cyan: #22d3ee;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --font: 'Rubik', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --font-brand: 'Orbitron', 'Rubik', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='64' viewBox='0 0 160 64'%3E%3Cpath d='M0 32 C 26 10, 54 10, 80 32 S 134 54, 160 32' fill='none' stroke='%23ffffff' stroke-opacity='0.028' stroke-width='7'/%3E%3C/svg%3E");
  background-attachment: fixed;
  overflow-x: hidden;
}
a { color: #a5b4fc; text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--p1); outline-offset: 2px; }
::selection { background: rgba(109, 124, 240, 0.45); }

/* Language blocks for long content */
html[lang='ar'] .lang-en, html[lang='en'] .lang-ar { display: none !important; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  max-width: 1400px;
  margin: 0 auto;
}
.nav-auth { display: flex; gap: 10px; flex-wrap: wrap; }
.lang-btn {
  min-width: 42px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.lang-btn:hover { border-color: var(--border-strong); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none !important;
  transition: transform 0.15s, filter 0.15s, background 0.15s, border-color 0.15s, opacity 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn i { font-size: 13px; }
.btn-primary { background: var(--grad); box-shadow: 0 6px 20px rgba(109, 124, 240, 0.25); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.1); }
.btn-hot { background: var(--grad-hot); box-shadow: 0 6px 20px rgba(239, 68, 68, 0.22); }
.btn-hot:hover:not(:disabled) { filter: brightness(1.08); }
.btn-ghost { background: var(--surface-2); border-color: var(--border); color: #d4d4d8; }
.btn-ghost:hover:not(:disabled) { border-color: var(--border-strong); background: var(--surface-3); }
.btn-outline { background: transparent; border-color: var(--border); color: #d4d4d8; }
.btn-outline:hover:not(:disabled) { border-color: var(--border-strong); background: var(--surface-2); }
.btn-danger { background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.35); color: #fca5a5; }
.btn-danger:hover:not(:disabled) { background: rgba(239, 68, 68, 0.2); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 52px; font-size: 16px; font-weight: 600; border-radius: 12px; }
.btn-block { width: 100%; }
.btn.loading i { animation: spin 0.8s linear infinite; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: #d4d4d8;
  cursor: pointer;
  flex-shrink: 0;
}
.icon-btn:hover { border-color: var(--border-strong); color: #fff; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 16px 40px; }
.card {
  position: relative;
  background: rgba(18, 18, 25, 0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 24px;
}

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 8px 0 4px; }
.brand {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.brand-text {
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: clamp(26px, 5vw, 36px);
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #7f8cf5 0%, #9b6cf0 60%, #b18cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  direction: ltr;
}
.version {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  color: #a78bfa;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.28);
  padding: 2px 8px;
  border-radius: 999px;
  direction: ltr;
}
.tagline { margin: 14px 0 6px; font-size: 17px; font-weight: 500; color: #e4e4e7; }
.lead { margin: 0 auto; max-width: 520px; font-size: 13.5px; color: var(--muted); }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 22px 12px;
  background:
    linear-gradient(90deg, rgba(34, 211, 238, 0.09), rgba(18, 18, 25, 0.6) 45%, rgba(245, 158, 11, 0.09)),
    rgba(18, 18, 25, 0.92);
  margin-top: 36px;
}
html[dir='rtl'] .stats {
  background:
    linear-gradient(270deg, rgba(34, 211, 238, 0.09), rgba(18, 18, 25, 0.6) 45%, rgba(245, 158, 11, 0.09)),
    rgba(18, 18, 25, 0.92);
}
.stat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 2px 8px;
  border-inline-start: 1px solid var(--border);
}
.stat:first-child { border-inline-start: 0; }
.stat-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  font-size: 16px;
  flex-shrink: 0;
}
.stat-icon.cyan { color: var(--cyan); background: rgba(34, 211, 238, 0.1); border: 1px solid rgba(34, 211, 238, 0.28); }
.stat-icon.violet { color: #a78bfa; background: rgba(139, 92, 246, 0.12); border: 1px solid rgba(139, 92, 246, 0.3); }
.stat-icon.amber { color: var(--amber); background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.3); }
.stat-label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.stat-value { font-size: 24px; font-weight: 700; line-height: 1.2; direction: ltr; font-variant-numeric: tabular-nums; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.6); animation: pulse 2s infinite; }

/* ---------- Create ---------- */
.create { padding: 34px 36px 30px; text-align: center; }
.create h2 { margin: 0; font-size: 21px; font-weight: 600; }
.create .sub { margin: 6px 0 24px; font-size: 13.5px; color: var(--muted); }
.create-row {
  display: flex;
  align-items: stretch;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 13px;
  overflow: hidden;
  direction: ltr;
  transition: border-color 0.15s;
}
.create-row:focus-within { border-color: rgba(109, 124, 240, 0.55); }
.name-input {
  flex: 1;
  min-width: 0;
  height: 50px;
  padding: 0 16px;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  text-align: right;
}
.name-input::placeholder { color: var(--dim); }
.domain-pick {
  position: relative;
  display: flex;
  align-items: center;
  margin: 5px 6px;
  border-radius: 9px;
  background: rgba(109, 124, 240, 0.12);
  border: 1px solid rgba(109, 124, 240, 0.3);
}
.domain-pick i { position: absolute; left: 11px; font-size: 13px; color: #a5b4fc; pointer-events: none; }
.domain-pick select {
  appearance: none;
  -webkit-appearance: none;
  height: 100%;
  padding: 0 30px 0 32px;
  background: transparent;
  border: 0;
  outline: none;
  color: #fff;
  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  max-width: 220px;
  text-overflow: ellipsis;
}
.domain-pick::after {
  content: '';
  position: absolute;
  right: 12px;
  width: 7px;
  height: 7px;
  border-right: 2px solid #a5b4fc;
  border-bottom: 2px solid #a5b4fc;
  transform: translateY(-2px) rotate(45deg);
  pointer-events: none;
}
.domain-pick select option, .select option { background: var(--surface-2); color: var(--text); }
.create-btn { border-radius: 0; height: auto; min-height: 50px; padding: 0 26px; box-shadow: none; font-size: 15px; }
.create-opts { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 18px; font-size: 13.5px; color: var(--muted); }
.select {
  height: 38px;
  padding: 0 12px;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  font-size: 13.5px;
  cursor: pointer;
  outline: none;
}
.select:focus { border-color: rgba(109, 124, 240, 0.55); }

/* ---------- Mailbox ---------- */
.mailbox { padding: 26px 26px 22px; overflow: hidden; }
.mailbox::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #10b981, #22d3ee, #10b981);
}
.mailbox[data-state='reserved']::before { background: var(--grad); }
.mailbox[data-state='expired']::before { background: var(--red); }
.mb-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.mb-label { font-size: 13px; color: var(--muted); }
.mb-status { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500; color: var(--green); }
.mb-status .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse-green 2s infinite; }
.mailbox[data-state='reserved'] .mb-status { color: #a78bfa; }
.mailbox[data-state='expired'] .mb-status { color: var(--red); }
.mailbox[data-state='expired'] .mb-status .dot, .mailbox[data-state='reserved'] .mb-status .dot { animation: none; }
.mb-main { margin-top: 12px; }
.mb-address-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mb-address {
  font-size: 20px;
  font-weight: 600;
  direction: ltr;
  overflow-wrap: anywhere;
  user-select: all;
}
.mailbox[data-state='loading'] .mb-address { color: var(--dim); }
.mb-timer { font-size: 15px; font-weight: 500; color: var(--amber); white-space: nowrap; }
.mb-timer b { font-weight: 600; font-variant-numeric: tabular-nums; }
.mailbox[data-state='reserved'] .mb-timer { color: #a78bfa; }
.mailbox[data-state='expired'] .mb-timer { color: var(--red); }
.mb-timer.urgent { color: var(--red); }
.mb-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }

/* ---------- Inbox ---------- */
.inbox { overflow: hidden; }
.inbox-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.inbox-title { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; }
.inbox-title i { color: #8b8ff5; }
.count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--grad);
  font-size: 11.5px;
  font-weight: 600;
}
.inbox-tools { display: flex; align-items: center; gap: 14px; }
.chip-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  font-size: 12px;
  cursor: pointer;
}
.chip-danger:hover { background: rgba(239, 68, 68, 0.18); }
.toggle { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: #d4d4d8; cursor: pointer; user-select: none; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle .track {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  transition: background 0.2s;
}
.toggle .thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}
.toggle input:checked + .track { background: var(--grad); border-color: transparent; }
.toggle input:checked + .track .thumb { transform: translateX(16px); }
.toggle input:focus-visible + .track { outline: 2px solid var(--p1); outline-offset: 2px; }

.msg-list { min-height: 180px; }
.msg { border-bottom: 1px solid var(--border); }
.msg:last-child { border-bottom: 0; }
.msg-head {
  display: block;
  width: 100%;
  padding: 18px 24px;
  background: transparent;
  border: 0;
  color: inherit;
  text-align: start;
  cursor: pointer;
}
.msg-head:hover { background: rgba(255, 255, 255, 0.02); }
.msg.open .msg-head { background: rgba(255, 255, 255, 0.025); }
.msg-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.msg-from { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-from .addr { font-weight: 400; color: var(--muted); }
.msg.unseen .msg-from::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--p1); flex-shrink: 0; }
.msg-date { font-size: 11.5px; color: var(--dim); white-space: nowrap; direction: ltr; }
.msg-subject { margin-top: 6px; font-size: 13.5px; color: #d4d4d8; }
.msg-preview { margin-top: 3px; font-size: 12.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg.open .msg-preview { display: none; }
.msg-body { padding: 0 24px 22px; background: rgba(255, 255, 255, 0.025); }
.msg-frame {
  display: block;
  width: 100%;
  height: 600px;
  max-height: 75vh;
  border: 0;
  border-radius: 12px;
  background: #fff;
}
.msg-text {
  margin: 0;
  padding: 16px;
  max-height: 600px;
  overflow: auto;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-family: var(--font);
  font-size: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.msg-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.attachments { display: flex; flex-wrap: wrap; gap: 6px; }
.attachment { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; color: var(--muted); }

.empty { display: grid; place-items: center; gap: 6px; padding: 46px 24px; text-align: center; }
.empty-icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin-bottom: 8px;
  border-radius: 18px;
  background: var(--p-soft);
  color: #8b8ff5;
  font-size: 22px;
  animation: float 3s ease-in-out infinite;
}
.empty h3 { margin: 0; font-size: 15px; font-weight: 600; }
.empty p { margin: 0; font-size: 13px; color: var(--dim); max-width: 360px; }
.empty .btn { margin-top: 14px; }

/* ---------- Content sections ---------- */
.content { margin-top: 64px; }
.section { margin-top: 48px; }
.section h2 { margin: 0 0 14px; font-size: 22px; font-weight: 700; }
.section h2 .accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.section p { margin: 0 0 12px; color: #c4c4cc; font-size: 14.5px; line-height: 1.95; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.step, .feature, .use-col {
  padding: 20px;
  border-radius: 16px;
  background: rgba(18, 18, 25, 0.9);
  border: 1px solid var(--border);
}
.step-num {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--grad);
  font-weight: 700;
  margin-bottom: 12px;
}
.step h3, .feature h3, .use-col h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.step p, .feature p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.8; }
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.feature i { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--p-soft); color: #a5b4fc; margin-bottom: 12px; }
.use-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.use-col ul { margin: 8px 0 0; padding: 0; list-style: none; }
.use-col li { position: relative; padding-inline-start: 26px; margin: 8px 0; font-size: 13.5px; color: #c4c4cc; }
.use-col li i { position: absolute; inset-inline-start: 0; top: 4px; font-size: 13px; }
.use-col.good h3 { color: #34d399; }
.use-col.good li i { color: #34d399; }
.use-col.bad h3 { color: #f87171; }
.use-col.bad li i { color: #f87171; }
.note { margin-top: 14px; padding: 12px 16px; border-radius: 12px; background: var(--p-soft); border: 1px solid rgba(109, 124, 240, 0.25); font-size: 13.5px; color: #c7d2fe; }

.faq { display: grid; gap: 10px; }
.faq details { border-radius: 14px; background: rgba(18, 18, 25, 0.9); border: 1px solid var(--border); overflow: hidden; }
.faq details[open] { border-color: rgba(109, 124, 240, 0.35); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 20px; color: #a5b4fc; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 20px 18px; font-size: 13.5px; color: var(--muted); line-height: 1.9; }

/* ---------- Footer ---------- */
.footer {
  margin-top: 60px;
  padding: 28px 16px 90px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--dim);
  font-size: 13px;
}
.footer .brand-mini { font-family: var(--font-brand); font-weight: 700; color: #c4c4cc; letter-spacing: 0.5px; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; }
.footer-links a, .footer-links button { color: var(--muted); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.footer-links a:hover, .footer-links button:hover { color: #fff; text-decoration: none; }
.footer .discord-handle { direction: ltr; unicode-bidi: isolate; color: #a5b4fc; font-weight: 600; }

/* ---------- Discord button ---------- */
.discord-fab {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  border: 0;
  background: #5865f2;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(88, 101, 242, 0.45);
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s;
  direction: ltr;
}
.discord-fab:hover { filter: brightness(1.1); transform: translateY(-1px); }
.discord-fab i { font-size: 18px; }
.discord-pop {
  position: fixed;
  left: 22px;
  bottom: 80px;
  z-index: 41;
  width: 260px;
  padding: 18px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  animation: pop-in 0.18s ease-out;
}
.discord-pop h4 { margin: 0 0 12px; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.discord-pop h4 i { color: #8891f7; font-size: 18px; }
.discord-user {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 14px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  direction: ltr;
}
.discord-user b { font-size: 16px; letter-spacing: 0.3px; }
.discord-pop .btn { margin-top: 10px; }

/* ---------- Toasts ---------- */
.toasts {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: grid;
  gap: 8px;
  width: min(92vw, 420px);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(24, 25, 34, 0.97);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  font-size: 14px;
  animation: toast-in 0.2s ease-out;
  pointer-events: auto;
}
.toast i { font-size: 15px; }
.toast.success i { color: var(--green); }
.toast.error { border-color: rgba(239, 68, 68, 0.45); }
.toast.error i { color: #f87171; }
.toast.info i { color: #a5b4fc; }
.toast.out { animation: toast-out 0.2s ease-in forwards; }

/* ---------- Auth page ---------- */
.auth-wrap { width: 100%; max-width: 600px; margin: 0 auto; padding: 24px 16px 60px; }
.auth-head { text-align: center; margin-bottom: 30px; }
.auth-head .brand { gap: 12px; }
.auth-head .brand-text { font-size: clamp(22px, 4.6vw, 30px); }
.auth-head .shield { font-size: 34px; color: #7f8cf5; }
.auth-head p { margin: 12px 0 0; color: var(--muted); font-size: 15px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.tab {
  height: 50px;
  border-radius: 11px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.tab.active { background: var(--grad); color: #fff; box-shadow: 0 6px 22px rgba(109, 124, 240, 0.3); }
.form { display: grid; gap: 18px; margin-top: 26px; }
.field label { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; font-size: 14px; color: #d4d4d8; }
.field label i { color: var(--muted); font-size: 12px; }
.input-wrap { position: relative; }
.input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s;
}
.input:focus { border-color: rgba(109, 124, 240, 0.6); }
.input::placeholder { color: var(--dim); }
.input[dir='ltr'] { text-align: left; }
html[dir='rtl'] .input[dir='ltr']:placeholder-shown { text-align: right; }
.input-wrap .input { padding-inline-end: 48px; }
.eye-btn {
  position: absolute;
  inset-inline-end: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.eye-btn:hover { color: #fff; }
.divider { display: flex; align-items: center; gap: 14px; margin: 26px 0 20px; color: var(--muted); font-size: 14px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.google-slot { display: flex; justify-content: center; min-height: 44px; }
.auth-links { display: grid; justify-items: center; gap: 14px; margin-top: 28px; font-size: 14px; }
.link-btn { background: none; border: 0; padding: 0; color: #a78bfa; font: inherit; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.form-error { min-height: 20px; margin: -4px 0 0; color: #f87171; font-size: 13.5px; text-align: center; }

/* ---------- Account page ---------- */
.acc-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 24px 26px; }
.acc-user { display: flex; align-items: center; gap: 14px; }
.avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: var(--grad);
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
}
.acc-user h2 { margin: 0; font-size: 19px; }
.acc-user .meta { font-size: 13px; color: var(--muted); direction: ltr; text-align: start; }
.plan {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  color: #d4d4d8;
}
.plan.premium { background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.4); color: #fbbf24; }
.panel { padding: 24px 26px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.panel h3 { margin: 0; font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 9px; }
.panel h3 i { color: #8b8ff5; }
.panel .sub { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.usage { font-size: 13px; color: var(--muted); white-space: nowrap; }
.usage b { color: #fff; }
.res-list { display: grid; gap: 10px; }
.res-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: 13px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.res-addr { font-weight: 600; direction: ltr; overflow-wrap: anywhere; }
.res-sub { font-size: 12px; color: var(--dim); }
.res-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.res-empty { padding: 22px; text-align: center; color: var(--dim); font-size: 13.5px; border: 1px dashed var(--border-strong); border-radius: 13px; }
.res-new { margin-top: 18px; }
.res-new .create-row { border-radius: 12px; }
.api-key-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #0d0e14;
  border: 1px solid rgba(245, 158, 11, 0.4);
  direction: ltr;
}
.api-key-box code { flex: 1; font-size: 13.5px; overflow-wrap: anywhere; color: #fde68a; }
.code {
  margin: 10px 0 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: #0d0e14;
  border: 1px solid var(--border);
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.7;
  color: #c7d2fe;
  overflow-x: auto;
  direction: ltr;
  text-align: left;
  white-space: pre;
}
.docs h4 { margin: 20px 0 0; font-size: 14px; font-weight: 600; }
.docs table { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: 13px; direction: ltr; text-align: left; }
.docs td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.docs td:first-child { white-space: nowrap; font-family: ui-monospace, Consolas, monospace; color: #a5b4fc; }
.docs td:last-child { color: var(--muted); }
.premium-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border-radius: 13px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-size: 14px;
  color: #fde68a;
}
.premium-cta i { font-size: 20px; color: #fbbf24; }
.premium-cta span { flex: 1; min-width: 200px; }

.skeleton { display: inline-block; height: 1em; width: 220px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; vertical-align: middle; }

/* ---------- 404 ---------- */
.nf { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 24px; }
.nf .code-big { font-family: var(--font-brand); font-size: 80px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.nf p { color: var(--muted); }

/* ---------- Animations ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.55); } 70% { box-shadow: 0 0 0 7px rgba(34, 211, 238, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); } }
@keyframes pulse-green { 0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); } 70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes pop-in { from { opacity: 0; transform: translateY(6px) scale(0.98); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  body { font-size: 14px; }
  .topbar { padding: 14px 16px; }
  .topbar .btn { height: 36px; padding: 0 12px; font-size: 13px; }
  .stats { grid-template-columns: 1fr; gap: 14px; padding: 18px; }
  .stat { justify-content: flex-start; border-inline-start: 0; border-top: 1px solid var(--border); padding-top: 14px; }
  .stat:first-child { border-top: 0; padding-top: 2px; }
  .create { padding: 26px 18px 22px; }
  .create-row { flex-wrap: wrap; }
  .name-input { flex-basis: 100%; height: 48px; border-bottom: 1px solid var(--border); }
  .domain-pick { flex: 1 1 auto; min-width: 0; margin: 6px; min-height: 40px; }
  .domain-pick select { max-width: none; width: 100%; }
  .create-btn { flex: 0 0 auto; min-height: 52px; padding: 0 22px; }
  .mailbox { padding: 22px 18px 18px; }
  .mb-address { font-size: 17px; }
  .mb-actions .btn { flex: 1 1 calc(50% - 9px); padding: 0 10px; font-size: 13px; }
  .inbox-head, .msg-head { padding-left: 18px; padding-right: 18px; }
  .msg-body { padding: 0 12px 16px; }
  .msg-top { flex-direction: column; gap: 2px; }
  .steps, .features, .use-grid { grid-template-columns: 1fr; }
  .discord-fab { left: 14px; bottom: 14px; height: 42px; padding: 0 14px; }
  .discord-pop { left: 14px; bottom: 66px; }
  .acc-head, .panel { padding: 20px 18px; }
}
