:root {
  --bg: #0f1115;
  --card: #171a21;
  --border: #2a2e38;
  --text: #e8e9ec;
  --muted: #8a8f9c;
  --accent: #4f8cff;
  --accent-dark: #3a6fd6;
  --danger: #e5534b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

header { text-align: center; margin-bottom: 28px; }
h1 { font-size: 32px; margin: 0; }
h1 span { color: var(--accent); }
.tagline { color: var(--muted); margin-top: 6px; }

.banner {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 14px;
}
.banner.warn {
  background: rgba(229, 83, 75, 0.12);
  border: 1px solid rgba(229, 83, 75, 0.4);
  color: #ffb4af;
}
.banner code { background: rgba(255,255,255,0.08); padding: 1px 5px; border-radius: 4px; }

.address-card, .inbox-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
}

.address-row { display: flex; gap: 8px; margin-bottom: 14px; }
#addressBox {
  flex: 1;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #10131a;
  color: var(--text);
  font-size: 15px;
}
#copyBtn {
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #20242d;
  color: var(--text);
  cursor: pointer;
}
#copyBtn:hover { background: #262b36; }

.actions { display: flex; align-items: center; gap: 14px; }

.toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.toggle-row input { margin-top: 2px; cursor: pointer; }
button.primary {
  background: var(--accent);
  border: none;
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 15px;
  cursor: pointer;
}
button.primary:hover { background: var(--accent-dark); }
.expiry { color: var(--muted); font-size: 13px; }

.inbox-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.inbox-header h2 { margin: 0; font-size: 18px; }
.status-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--muted);
  display: inline-block;
}
.status-dot.live { background: #3ecf8e; box-shadow: 0 0 8px #3ecf8e; }

.message-list { list-style: none; margin: 0; padding: 0; }
.message-list li {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  border-radius: 8px;
}
.message-list li:hover { background: #1d212a; }
.message-list li.empty { color: var(--muted); cursor: default; }
.message-list li.empty:hover { background: transparent; }
.msg-from { font-weight: 600; font-size: 14px; }
.msg-subject { color: var(--muted); font-size: 13px; margin-top: 2px; }

.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal.hidden { display: none; }
.modal-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: 100%;
  max-width: 700px;
  max-height: 85vh;
  padding: 24px;
  position: relative;
  display: flex;
  flex-direction: column;
}
.close-btn {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; color: var(--muted);
  font-size: 22px; cursor: pointer;
}
.modal-meta { color: var(--muted); font-size: 13px; margin: 2px 0; }
#modalBody {
  margin-top: 14px;
  flex: 1;
  min-height: 300px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
}
