/* ── VoxFlow Temp Mail — публичный сайт ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f1117;
  --card: #1a1d2e;
  --border: #2a2d3e;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #7c85ff;
  --accent2: #5ea2ff;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(600px 300px at 20% 0%, rgba(124, 133, 255, .12), transparent),
    radial-gradient(600px 300px at 80% 10%, rgba(94, 162, 255, .10), transparent);
  pointer-events: none;
  z-index: 0;
}

/* ── Шапка ── */
.header {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--accent); letter-spacing: .02em; font-size: 15px; }
.brand-icon { font-size: 20px; }
.header-right { display: flex; align-items: center; gap: 14px; }
.tg-link { color: var(--muted); text-decoration: none; font-size: 14px; transition: color .2s; }
.tg-link:hover { color: var(--accent); }

/* ── Переключатель языка ── */
.lang-switch { position: relative; }
.lang-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: border-color .2s;
}
.lang-btn:hover { border-color: #3b4368; }
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  min-width: 160px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  z-index: 50;
}
.lang-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  color: var(--text);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  text-align: left;
  transition: background .15s;
}
.lang-menu button:hover { background: rgba(124, 133, 255, .12); }
.lang-menu .flag { font-size: 18px; }

/* ── Контент ── */
.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  flex: 1;
}

.screen h1 {
  font-size: clamp(34px, 6vw, 52px);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  margin-bottom: 18px;
}
.accent {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 34px;
}

.btn-primary {
  display: block;
  margin: 0 auto;
  padding: 18px 44px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #3b82f6);
  border: none;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(99, 102, 241, .35);
  transition: transform .15s, box-shadow .2s, opacity .2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(99, 102, 241, .45); }
.btn-primary:disabled { opacity: .6; cursor: wait; transform: none; }

.hint { text-align: center; color: #64748b; font-size: 13px; margin-top: 18px; }

/* ── Ящик ── */
.email-card {
  background: linear-gradient(135deg, #1e2140 0%, var(--card) 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 26px;
  margin-bottom: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .4);
}
.email-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #64b5f6;
  font-weight: 700;
  margin-bottom: 12px;
}
.email-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.email-value {
  font-size: clamp(17px, 3.4vw, 24px);
  font-weight: 700;
  font-family: "SF Mono", "Fira Code", monospace;
  word-break: break-all;
  color: #fff;
  flex: 1;
  min-width: 200px;
}
.btn-copy {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: #2563eb;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background .2s;
  white-space: nowrap;
}
.btn-copy:hover { background: #1d4ed8; }
.btn-copy.copied { background: #16a34a; }
.email-timer { margin-top: 10px; font-size: 13px; color: #64748b; font-variant-numeric: tabular-nums; }

/* ── Входящие ── */
.inbox-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.inbox-head h2 { font-size: 20px; font-weight: 700; }
.inbox-status { font-size: 12px; color: #64748b; }

.inbox-list { display: flex; flex-direction: column; gap: 10px; }

.msg {
  display: block;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
  transition: border-color .2s, transform .15s;
  cursor: pointer;
}
.msg:hover { border-color: #3b4368; transform: translateY(-1px); }
.msg-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.msg-from { font-weight: 700; font-size: 14px; color: var(--accent2); word-break: break-all; }
.msg-time { font-size: 12px; color: #64748b; white-space: nowrap; }
.msg-subject { font-size: 15px; font-weight: 600; color: #fff; margin-bottom: 4px; }
.msg-snippet { font-size: 13px; color: var(--muted); line-height: 1.5; }

.empty {
  text-align: center;
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
  padding: 40px 20px;
  border: 1px dashed var(--border);
  border-radius: 14px;
}
.empty-icon { font-size: 40px; margin-bottom: 10px; }

.btn-ghost {
  display: block;
  margin: 26px auto 0;
  padding: 10px 20px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  transition: color .2s, border-color .2s;
}
.btn-ghost:hover { color: var(--text); border-color: #3b4368; }

.hidden { display: none !important; }

.footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 24px;
  font-size: 12px;
  color: #475569;
}
.footer a { color: var(--accent); text-decoration: none; }

/* ── Мобильная адаптация ── */
@media (max-width: 640px) {
  .header { padding: 14px 16px; }
  .brand { font-size: 13px; }
  .tg-link { font-size: 13px; }
  .container { padding: 24px 16px 60px; }
  .screen h1 { font-size: clamp(30px, 8.5vw, 40px); }
  .subtitle { font-size: 15px; }
  .btn-primary { width: 100%; padding: 16px 24px; font-size: 16px; }
  .email-card { padding: 18px 16px; border-radius: 14px; }
  .email-row { flex-direction: column; align-items: stretch; }
  .email-value { text-align: center; font-size: 17px; }
  .btn-copy { width: 100%; text-align: center; }
  .inbox-head h2 { font-size: 17px; }
  .msg { padding: 14px 16px; }
  .msg-top { flex-direction: column; gap: 2px; }
  .msg-time { order: -1; }
  .footer { flex-direction: column; align-items: center; gap: 6px; text-align: center; }
  .lang-menu { min-width: 150px; }
}

/* ── Кнопки старт-экрана: стек ── */
.btn-stack { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.btn-stack .hint { margin-top: 4px; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.btn-secondary:hover { border-color: var(--accent); color: #fff; }
.btn-secondary.hidden { display: none; }

/* ── Бренд-кнопка ── */
a.brand {
  text-decoration: none;
  cursor: pointer;
  transition: opacity .2s;
}
a.brand:hover { opacity: .75; }

/* ── Баннер результата восстановления ── */
.restore-banner {
  margin: 22px auto 0;
  max-width: 520px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  background: rgba(59, 130, 246, .12);
  border: 1px solid rgba(59, 130, 246, .35);
  color: #93c5fd;
}

/* ── Модалка Telegram-логина ── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(5, 7, 12, .75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.hidden { display: none; }
.modal-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 30px 34px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}
.modal-card h3 { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.modal-text { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 22px; }
.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
}
.modal-close:hover { color: var(--text); }
#telegram-widget { display: flex; justify-content: center; min-height: 46px; }

.modal-hint {
  margin-top: 16px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.6;
}

/* ── Telegram-юзер в шапке ── */
.tg-user { position: relative; }
.tg-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  color: var(--text);
  transition: border-color .2s;
}
.tg-user-btn:hover { border-color: var(--accent); }
.tg-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}
.tg-initials {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6366f1, #3b82f6);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.tg-name { font-size: 13px; font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  min-width: 190px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  z-index: 60;
}
.tg-dd-name { font-size: 13px; font-weight: 600; color: var(--text); padding: 4px 6px; word-break: break-all; }
.tg-dd-badge {
  font-size: 11px;
  font-weight: 700;
  color: #fbbf24;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 4px 6px 8px;
}
.tg-dd-logout {
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.tg-dd-logout:hover { color: var(--text); border-color: #3b4368; }
@media (max-width: 640px) {
  .tg-name { display: none; }
}


/* ── FAQ: карточки-аккордеоны ── */
.faq-section { margin-top: 30px; }
.faq-title {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  text-align: center;
  margin-bottom: 22px;
}
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: linear-gradient(180deg, rgba(30, 33, 64, .55), var(--card));
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .25s;
}
.faq-item:hover { border-color: #3b4368; }
.faq-item[open] { border-color: rgba(124, 133, 255, .45); }

.faq-item summary {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 17px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }

.faq-chevron {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 133, 255, .14);
  transition: transform .25s, background .25s;
}
.faq-chevron svg { transition: transform .25s; }
.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
  background: rgba(124, 133, 255, .3);
}

.faq-item p {
  padding: 2px 20px 18px 58px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
}


/* ── Как это работает ── */
.hiw-section { margin-top: 30px; margin-bottom: 10px; }
.hiw-title {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  text-align: center;
  margin-bottom: 22px;
}
.hiw-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.hiw-card {
  background: linear-gradient(180deg, rgba(30, 33, 64, .55), var(--card));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 20px;
  text-align: center;
  transition: border-color .25s, transform .15s;
}
.hiw-card:hover { border-color: rgba(124, 133, 255, .45); transform: translateY(-2px); }
.hiw-num {
  width: 40px;
  height: 40px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6366f1, #3b82f6);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
}
.hiw-card-title { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.hiw-card-text { font-size: 13px; color: var(--muted); line-height: 1.65; }

@media (max-width: 640px) {
  .hiw-grid { grid-template-columns: 1fr; }
  .hiw-title { font-size: 20px; }
  .faq-title { font-size: 20px; }
}

