/* TempMailPro — teal temp-mail theme (original design) */
:root {
  --teal: #1f9aab;
  --teal-dark: #17707d;
  --teal-deep: #0f4c56;
  --navy: #14333b;
  --accent: #f5a623;
  --bg: #f4f7f8;
  --card: #ffffff;
  --text: #2b3a40;
  --muted: #7a8b91;
  --border: #e2e9eb;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }

/* ---------- top bar ---------- */
.topbar { background: #fff; border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.logo { font-weight: 800; font-size: 22px; letter-spacing: 1px; color: var(--teal-dark); text-decoration: none; }
.logo span { color: var(--navy); }
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px; background: var(--teal);
  color: #fff; font-size: 18px; margin-right: 8px; vertical-align: -6px;
}
.topnav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; margin-left: 26px; text-transform: uppercase; letter-spacing: .5px; }
.topnav a:hover { color: var(--teal-dark); }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(160deg, #27aebf 0%, #1f9aab 45%, #17808f 100%);
  color: #fff; padding: 46px 0 40px; position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .08;
  background-image: radial-gradient(circle at 20% 30%, #fff 2px, transparent 3px),
                    radial-gradient(circle at 70% 60%, #fff 2px, transparent 3px),
                    radial-gradient(circle at 40% 80%, #fff 2px, transparent 3px);
  background-size: 120px 120px;
}
.hero-inner { position: relative; text-align: center; }
.hero h1 { font-size: 32px; font-weight: 700; margin-bottom: 6px; }
.hero-sub { opacity: .92; margin-bottom: 26px; font-size: 16px; }

.mailbox-row { display: flex; justify-content: center; align-items: stretch; gap: 10px; max-width: 760px; margin: 0 auto; }
.mailbox {
  flex: 1; display: flex; align-items: center; background: #fff; color: var(--text);
  border-radius: 12px; padding: 8px 10px 8px 24px;
  min-height: 76px; box-shadow: 0 8px 24px rgba(0,0,0,.16);
}
.mail-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 42px; padding: 0 8px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--teal); color: var(--teal); font-weight: 800; font-size: 17px;
  margin: 0 6px 0 10px; background: #fff;
}
.email-display {
  flex: 1; font-size: 22px; font-weight: 700; color: var(--text);
  cursor: pointer; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 14px 4px; user-select: none;
}
.email-display:hover { color: var(--teal-dark); }
.switch-wrap { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 44px; flex-shrink: 0; }
.switch-wrap .chev { color: var(--muted); font-size: 18px; pointer-events: none; }
.inbox-switch {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; border: none;
}
#inboxSelect {
  flex: 1; border: none; outline: none; font-size: 19px; font-weight: 600; color: var(--text);
  background: transparent; padding: 16px 4px; cursor: pointer; min-width: 0;
}
.side-actions { display: flex; flex-direction: column; background: var(--teal-deep); border-radius: 12px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.16); }
.side-actions button {
  display: flex; align-items: center; gap: 8px; background: transparent; border: none;
  color: #fff; font-size: 13px; font-weight: 600; padding: 11px 18px; cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,.14);
}
.side-actions button:last-child { border-bottom: none; }
.side-actions button:hover { background: rgba(255,255,255,.12); }
.side-actions .ic { font-size: 16px; width: 20px; text-align: center; }
.side-actions button.danger:hover { background: rgba(220,60,60,.35); }

.timer-row { display: flex; gap: 14px; justify-content: center; align-items: stretch; margin: 18px auto 0; max-width: 760px; flex-wrap: wrap; }
.refresh-box { margin: 0 auto; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.28); border-radius: 16px; padding: 14px 34px; max-width: 460px; width: 100%; box-shadow: 0 6px 18px rgba(0,0,0,.18); color: #fff; font-size: 20px; font-weight: 700; font-family: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; transition: background .2s, transform .1s; }
.refresh-box:hover { background: rgba(255,255,255,.20); }
.refresh-box:active { transform: scale(.97); }
.refresh-box .rb-icon { font-size: 24px; }
.hero-desc { max-width: 640px; margin: 10px auto 0; font-size: 14px; opacity: .92; }

.new-box {
  display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap;
}
.new-box input, .new-box select {
  padding: 11px 14px; border-radius: 8px; border: 2px solid rgba(255,255,255,.5);
  font-size: 15px; background: rgba(255,255,255,.95); color: var(--text); outline: none;
}
.new-box input { min-width: 260px; }
.new-box button {
  padding: 11px 20px; border-radius: 8px; border: none; cursor: pointer;
  background: var(--navy); color: #fff; font-weight: 700; font-size: 15px;
}
.new-box button:hover { background: #0e242b; }

/* ---------- ad slots ---------- */
.ad-slot { display: none; margin: 26px auto; text-align: center; }
.ad-slot:has(*) { display: block; }

/* ---------- inbox card ---------- */
.inbox-card { background: var(--card); border-radius: 12px; box-shadow: 0 2px 14px rgba(20,51,59,.08); margin-top: 30px; overflow: hidden; }
.inbox-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 1px solid var(--border); }
.head-right { display: flex; align-items: center; gap: 8px; }
.refresh-flash { display: inline-block; font-size: 18px; color: var(--teal); opacity: 0; }
.refresh-bar {
  position: fixed; top: 0; left: 0; height: 4px; width: 0; z-index: 9999;
  background: linear-gradient(90deg, #ffd400, #ffea00);
  box-shadow: 0 0 10px rgba(255, 212, 0, .9);
  opacity: 0; pointer-events: none;
}
.refresh-bar.go { animation: rbar .8s ease forwards; }
@keyframes rbar {
  0% { width: 0; opacity: 1; }
  70% { width: 100%; opacity: 1; }
  100% { width: 100%; opacity: 0; }
}
.refresh-flash.on { animation: rflash 1s ease; }
@keyframes rflash { 0% { opacity: 0; transform: rotate(0deg); } 25% { opacity: 1; } 100% { opacity: 0; transform: rotate(360deg); } }
.inbox-head h2 { font-size: 20px; }
#messageCount { color: var(--muted); font-size: 14px; }
.msg-table-head, .msg-row {
  display: grid; grid-template-columns: 1.2fr 2fr .8fr; gap: 12px;
  padding: 16px 26px; align-items: center;
}
.msg-table-head { background: var(--teal); color: #fff; font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .6px; }
.msg-row { border-bottom: 1px solid var(--border); font-size: 16px; }
.msg-row .from, .msg-row .subj, .msg-row .time { cursor: pointer; }
.msg-body { cursor: default; }
.msg-row:hover { background: #f0f9fa; }
.msg-row .from { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-row .subj { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-row .time { color: var(--muted); font-size: 14px; text-align: right; }
.msg-body { grid-column: 1 / -1; background: #f7fbfc; border-radius: 8px; padding: 16px 18px; font-size: 15px; white-space: pre-wrap; word-break: break-word; }
.otp-box { display: flex; align-items: center; gap: 12px; background: #fff; border: 2px dashed var(--teal); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; white-space: normal; }
.otp-label { font-weight: 800; font-size: 14px; color: var(--teal); text-transform: uppercase; letter-spacing: .5px; }
.otp-code { font-size: 26px; font-weight: 800; letter-spacing: 4px; color: #14333b; font-family: 'Courier New', monospace; cursor: pointer; padding: 4px 8px; border-radius: 6px; transition: background .15s; }
.otp-code:hover { background: #e6f7f9; }
.otp-copy { margin-left: auto; background: var(--teal); color: #fff; border: none; border-radius: 8px; padding: 8px 18px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; }
.otp-copy:hover { background: #0f6b76; }
.otp-copy:active { transform: scale(.96); }
.body-text { margin-bottom: 4px; }
.message-list { min-height: 420px; }
.empty-state { text-align: center; padding: 80px 20px; color: var(--muted); }
.empty-state .icon { font-size: 56px; margin-bottom: 12px; }
.empty-state .title { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 4px; }

/* ---------- faq ---------- */
.faq { margin: 40px 0 10px; }
.faq h2 { font-size: 24px; margin-bottom: 16px; color: var(--navy); }
.faq details { background: var(--card); border-radius: 10px; margin-bottom: 10px; box-shadow: 0 1px 6px rgba(20,51,59,.06); }
.faq summary { padding: 16px 20px; font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--teal); font-size: 20px; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 20px 18px; color: var(--muted); }

/* ---------- tags ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 26px 0 40px; }
.tags span { background: #e8eef0; color: var(--muted); font-size: 13px; padding: 6px 14px; border-radius: 20px; }

/* ---------- footer ---------- */
footer { background: var(--navy); color: #b9cdd3; padding: 36px 0; margin-top: 10px; }
.foot-inner { text-align: center; }
.foot-brand { font-weight: 800; font-size: 20px; letter-spacing: 1px; color: #fff; margin-bottom: 12px; }
.foot-brand span { color: var(--teal); }
.foot-links { margin-bottom: 12px; }
.foot-links a { color: #b9cdd3; text-decoration: none; font-size: 14px; font-weight: 600; }
.foot-links a:hover { color: #fff; }
.foot-note { font-size: 13px; max-width: 640px; margin: 0 auto 10px; }
.copy { font-size: 12px; opacity: .7; }

/* ---------- toast ---------- */
.toast-container { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 99; }
.toast { background: var(--navy); color: #fff; padding: 12px 22px; border-radius: 8px; margin-top: 8px; font-size: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.toast.fadeout { opacity: 0; transition: opacity .2s; }

@media (max-width: 640px) {
  .hero h1 { font-size: 24px; }
  .mailbox-row { flex-direction: column; }
  .mailbox { border-radius: 12px; }
  .side-actions { flex-direction: row; border-radius: 12px; }
  .side-actions button { flex: 1; justify-content: center; border-bottom: none; border-right: 1px solid rgba(255,255,255,.14); }
  .side-actions button:last-child { border-right: none; }
  .side-actions button span:last-child { display: none; }
  .msg-table-head, .msg-row { grid-template-columns: 1fr 1.4fr; }
  .msg-row .time { display: none; }
  .msg-table-head span:last-child { display: none; }
  .topnav a { margin-left: 14px; font-size: 12px; }
}
