/* ===== srimpz Temp Mail — light / indigo theme ===== */
:root {
  --indigo: #4f46e5;
  --indigo-600: #4f46e5;
  --indigo-500: #6366f1;
  --indigo-50: #eef2ff;
  --indigo-100: #e0e7ff;
  --pink: #ff80b5;
  --purple: #9089fc;

  --emerald: #059669;
  --emerald-700: #047857;
  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;

  --bg: #f8fafc;
  --white: #ffffff;
  --g50: #f9fafb;
  --g100: #f3f4f6;
  --g200: #e5e7eb;
  --g300: #d1d5db;
  --g400: #9ca3af;
  --g500: #6b7280;
  --g600: #4b5563;
  --g700: #374151;
  --g800: #1f2937;
  --g900: #111827;
  --red: #ef4444;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
  --shadow: 0 10px 25px -5px rgba(16, 24, 40, 0.10), 0 8px 10px -6px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 24px 48px -12px rgba(79, 70, 229, 0.18);
  --radius: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--g800);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--indigo); text-decoration: none; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

/* ---------- Navbar ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1120px; margin: 0 auto; padding: 18px 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--g900); }
.brand-logo {
  width: 40px; height: 40px; display: grid; place-items: center; font-size: 22px;
  background: linear-gradient(135deg, var(--indigo-500), var(--purple));
  border-radius: 12px; box-shadow: var(--shadow);
}
.brand-text .dot { color: var(--indigo); }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 15px; font-weight: 600; }
.nav-links a { color: var(--g600); }
.nav-links a:hover { color: var(--indigo); }
.nav-contact {
  background: var(--indigo); color: #fff !important; padding: 8px 16px; border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.nav-contact:hover { background: #4338ca; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 30px 24px 8px; }
.hero-inner { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; text-align: center; }
.blob {
  position: absolute; z-index: 1; border-radius: 50%; filter: blur(70px); opacity: 0.5;
  pointer-events: none;
}
.blob-1 { width: 460px; height: 460px; left: -120px; top: -160px;
  background: radial-gradient(circle at 30% 30%, var(--purple), transparent 70%); }
.blob-2 { width: 420px; height: 420px; right: -120px; top: -120px;
  background: radial-gradient(circle at 70% 30%, var(--pink), transparent 70%); }

.pill {
  display: inline-block; background: var(--indigo-50); color: var(--indigo);
  border: 1px solid var(--indigo-100); padding: 6px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 700; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.1; margin: 0 0 14px; color: var(--g900); font-weight: 800; letter-spacing: -0.02em; }
.grad { background: linear-gradient(90deg, var(--indigo), var(--purple)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 17px; color: var(--g500); margin: 0 auto 26px; max-width: 560px; }
.lead code { background: var(--g100); padding: 2px 7px; border-radius: 6px; color: var(--g700); font-size: 0.92em; }

/* ---------- Address card ---------- */
.addr-card {
  background: var(--white); border: 1px solid var(--g200); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 22px; text-align: left; max-width: 660px; margin: 0 auto;
}
.addr-label { font-size: 13px; font-weight: 600; color: var(--g500); margin-bottom: 8px; }
.addr-row { display: flex; gap: 10px; }
.addr-input {
  flex: 1; min-width: 0; background: var(--g50); border: 1.5px solid var(--g200);
  color: var(--g900); font-size: 18px; font-weight: 700; padding: 13px 16px; border-radius: var(--radius-sm);
  letter-spacing: 0.2px; cursor: pointer; transition: border-color .15s;
}
.addr-input:hover { border-color: var(--indigo-100); }
.addr-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; align-items: center; }
.combo { display: flex; align-items: stretch; background: var(--g50); border: 1.5px solid var(--g200); border-radius: var(--radius-sm); overflow: hidden; }
.combo-input { background: transparent; border: none; outline: none; color: var(--g900); font-size: 14px; padding: 0 12px; width: 150px; }
.combo-suffix { display: flex; align-items: center; color: var(--g400); font-size: 14px; padding-right: 8px; }
.combo-btn { border-radius: 0; border: none; border-left: 1px solid var(--g200); }

.addr-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.live { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--g500); font-weight: 600; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 0 rgba(5,150,105,.5); animation: pulse 2s infinite; }
.live-dot.off { background: var(--g400); animation: none; box-shadow: none; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(5,150,105,.45);} 70%{box-shadow:0 0 0 8px rgba(5,150,105,0);} 100%{box-shadow:0 0 0 0 rgba(5,150,105,0);} }
.ttl-badge { font-size: 13px; font-weight: 600; color: var(--g500); background: var(--g100); padding: 6px 12px; border-radius: 999px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--white); color: var(--g700); border: 1.5px solid var(--g200);
  padding: 11px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 700; cursor: pointer;
  transition: transform .08s ease, background .15s, border-color .15s, box-shadow .15s; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--indigo); color: #fff; border-color: var(--indigo); }
.btn-primary:hover { background: #4338ca; }
.btn-soft { background: var(--indigo-50); color: var(--indigo); border-color: var(--indigo-100); }
.btn-ghost { background: var(--white); }
.btn-ghost:hover { border-color: var(--indigo-100); color: var(--indigo); }
.btn-danger { background: #fff; color: var(--red); border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; }
.btn-otp { background: var(--emerald); color: #fff; border-color: var(--emerald); }
.btn-otp:hover { background: var(--emerald-700); }

/* ---------- App / mailbox ---------- */
.app {
  max-width: 1120px; margin: 30px auto; padding: 0 24px;
  display: grid; grid-template-columns: 380px 1fr; gap: 20px; align-items: start;
}
.inbox, .viewer {
  background: var(--white); border: 1px solid var(--g200); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
}
.inbox { min-height: 480px; max-height: 78vh; }
.viewer { min-height: 480px; }
.inbox-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--g100); }
.inbox-title { font-weight: 800; color: var(--g800); display: flex; align-items: center; gap: 8px; }
.count-badge { background: var(--indigo-50); color: var(--indigo); font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.inbox-tools { display: flex; gap: 4px; }
.icon-btn { background: transparent; border: none; color: var(--g400); font-size: 18px; cursor: pointer; width: 34px; height: 34px; border-radius: 8px; }
.icon-btn:hover { background: var(--g100); color: var(--g700); }

/* message list */
.msg-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; }
.msg-item { padding: 13px 14px; border-radius: var(--radius-sm); cursor: pointer; transition: background .12s; position: relative; }
.msg-item + .msg-item { margin-top: 2px; }
.msg-item:hover { background: var(--g50); }
.msg-item.active { background: var(--indigo-50); }
.msg-item.unread { background: #fbfaff; }
.msg-item.unread .mi-from { font-weight: 800; color: var(--g900); }
.msg-item.unread::after { content: ""; position: absolute; right: 12px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--indigo); }
.mi-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.mi-from { font-size: 14px; font-weight: 600; color: var(--g700); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70%; }
.mi-time { font-size: 12px; color: var(--g400); flex-shrink: 0; }
.mi-subject { font-size: 14px; color: var(--g800); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 14px; }
.mi-preview { font-size: 12.5px; color: var(--g500); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mi-badges { margin-top: 7px; display: flex; gap: 6px; }
.otp-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--emerald-50); color: var(--emerald-700); border: 1px solid var(--emerald-100); font-size: 12px; font-weight: 800; padding: 2px 9px; border-radius: 999px; letter-spacing: .5px; }
.clip-chip { font-size: 12px; color: var(--g400); }

/* empty states */
.empty, .viewer-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--g500); padding: 40px 24px; }
.empty-icon { font-size: 48px; margin-bottom: 10px; }
.empty-title { font-size: 16px; font-weight: 700; color: var(--g700); margin: 0 0 4px; }
.muted { font-size: 13px; color: var(--g400); margin: 0; }

/* viewer */
.viewer-content { display: flex; flex-direction: column; height: 100%; }
.back-btn { display: none; background: transparent; border: none; color: var(--indigo); font-size: 14px; font-weight: 600; cursor: pointer; padding: 14px 18px 0; text-align: left; }
.otp-box {
  margin: 18px 20px 0; background: linear-gradient(135deg, var(--emerald-50), #fff);
  border: 1.5px solid var(--emerald-100); border-radius: var(--radius);
  padding: 16px 18px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.otp-label { font-size: 13px; font-weight: 700; color: var(--emerald-700); flex-basis: 100%; }
.otp-code { font-size: 32px; font-weight: 800; letter-spacing: 6px; color: var(--g900); font-family: ui-monospace, Menlo, Consolas, monospace; }
.msg-subject { font-size: 22px; font-weight: 800; color: var(--g900); margin: 18px 20px 8px; }
.msg-meta { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px; padding: 0 20px 16px; border-bottom: 1px solid var(--g100); }
.msg-from { font-size: 14px; color: var(--g600); }
.msg-from b { color: var(--g900); }
.msg-date { font-size: 13px; color: var(--g400); }
.attachments { padding: 14px 20px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.attachment { display: inline-flex; align-items: center; gap: 8px; background: var(--g50); border: 1px solid var(--g200); padding: 8px 12px; border-radius: 8px; font-size: 13px; color: var(--g700); }
.attachment:hover { border-color: var(--indigo-100); }
.msg-body-wrap { flex: 1; padding: 12px 20px; min-height: 240px; }
.msg-frame { width: 100%; height: 100%; min-height: 340px; border: none; background: #fff; border-radius: var(--radius-sm); }
.viewer-foot { padding: 14px 20px; border-top: 1px solid var(--g100); }

/* ---------- Sections ---------- */
.section { max-width: 1000px; margin: 40px auto; padding: 0 24px; }
.section-alt { max-width: none; background: var(--white); border-top: 1px solid var(--g200); border-bottom: 1px solid var(--g200); padding: 48px 24px; }
.section-alt > * { max-width: 800px; margin-left: auto; margin-right: auto; }
.section-title { font-size: 28px; font-weight: 800; color: var(--g900); text-align: center; margin: 0 0 8px; letter-spacing: -0.01em; }
.section-sub { text-align: center; color: var(--g500); margin: 0 0 22px; }
.section-sub code, .lead code { font-size: .92em; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; margin-top: 26px; }
.card { background: var(--white); border: 1px solid var(--g200); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.card-ic { width: 46px; height: 46px; display: grid; place-items: center; font-size: 24px; background: var(--indigo-50); border-radius: 12px; margin-bottom: 12px; }
.card h3 { margin: 0 0 6px; font-size: 17px; color: var(--g900); }
.card p { margin: 0; font-size: 14px; color: var(--g500); }
.card code { background: var(--g100); padding: 1px 5px; border-radius: 5px; }

.code-block { background: var(--g900); color: #e5e7eb; border-radius: var(--radius); padding: 20px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; box-shadow: var(--shadow); }
.code-block code { color: inherit; }

.faq-list { max-width: 720px; margin: 24px auto 0; display: flex; flex-direction: column; gap: 12px; }
.faq-list details { background: var(--white); border: 1px solid var(--g200); border-radius: var(--radius-sm); padding: 4px 18px; box-shadow: var(--shadow-sm); }
.faq-list summary { cursor: pointer; font-weight: 700; color: var(--g800); padding: 12px 0; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::before { content: "＋"; color: var(--indigo); font-weight: 800; margin-right: 10px; }
.faq-list details[open] summary::before { content: "－"; }
.faq-list p { margin: 0 0 14px; color: var(--g600); font-size: 14px; }

.footer { text-align: center; color: var(--g400); font-size: 13px; padding: 30px 24px; border-top: 1px solid var(--g200); margin-top: 20px; }
.footer-contact { display: block; margin-top: 8px; }
.footer-contact a { color: var(--indigo); font-weight: 600; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--g900); color: #fff; padding: 12px 20px; border-radius: 12px;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; font-weight: 600; font-size: 14px;
  transition: opacity .2s, transform .2s; z-index: 90; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .nav-links a:not(.nav-contact) { display: none; }
  .inbox { max-height: none; }
  .app.viewing .inbox { display: none; }
  .app:not(.viewing) .viewer { display: none; }
  .back-btn { display: block; }
  .combo-input { width: 120px; }
  .otp-code { font-size: 26px; letter-spacing: 4px; }
}
