* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: #f0f4f8;
  color: #1e293b;
  min-height: 100vh;
}

.container { max-width: 720px; margin: 0 auto; padding: 0 16px; }

/* Header */
.header {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  padding: 32px 0;
}
.header-inner { text-align: center; }
.logo { font-size: 2rem; font-weight: 700; }
.tagline { opacity: 0.9; margin-top: 4px; }

/* Card */
.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 20px;
  margin-top: -20px;
  position: relative;
}
.card + .card { margin-top: 16px; }

.label { font-size: 0.85rem; font-weight: 600; color: #64748b; display: block; margin-bottom: 8px; }

.address-row { display: flex; gap: 8px; }
.address-input {
  flex: 1;
  font-size: 1.05rem;
  font-family: monospace;
  padding: 12px 14px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #2563eb;
  font-weight: 600;
}
.address-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* Buttons */
.btn {
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.15s;
}
.btn:hover { background: #f1f5f9; border-color: #cbd5e1; }
.btn-primary { background: #2563eb; color: #fff; border-color: #2563eb; }
.btn-primary:hover { background: #1d4ed8; border-color: #1d4ed8; }
.btn-danger { color: #dc2626; border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; }

.copied-msg { color: #16a34a; font-size: 0.85rem; font-weight: 600; opacity: 0; transition: opacity 0.3s; }
.copied-msg.show { opacity: 1; }

/* Inbox */
.inbox-header { display: flex; justify-content: space-between; align-items: center; }
.inbox-header h2 { font-size: 1.2rem; }
.hint { font-size: 0.8rem; color: #94a3b8; margin: 6px 0 12px; }

.email-list { display: flex; flex-direction: column; gap: 8px; }
.email-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.email-item:hover { background: #f8fafc; }
.email-item .from { font-weight: 600; font-size: 0.9rem; }
.email-item .subject { font-size: 0.9rem; }
.email-item .preview { font-size: 0.8rem; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.email-item .time { font-size: 0.75rem; color: #94a3b8; white-space: nowrap; }
.email-info { flex: 1; min-width: 0; }

.empty-state { text-align: center; padding: 32px 0; }
.empty-state p { font-size: 1.1rem; }
.muted { color: #94a3b8; font-size: 0.85rem !important; margin-top: 6px; }

/* Modal */
.modal {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; z-index: 50;
}
.modal.hidden { display: none; }
.modal-content {
  background: #fff; border-radius: 12px;
  max-width: 600px; width: 100%;
  max-height: 80vh; overflow-y: auto;
  padding: 20px;
}
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-header h3 { font-size: 1.1rem; }
.close-btn { padding: 4px 10px; }
.modal-meta { font-size: 0.8rem; color: #64748b; margin: 8px 0 16px; }
.modal-body { border-top: 1px solid #e2e8f0; padding-top: 16px; line-height: 1.6; }
.modal-footer { margin-top: 16px; display: flex; justify-content: flex-end; }

.footer { text-align: center; padding: 32px 0 24px; color: #94a3b8; font-size: 0.8rem; }

/* Domain form */
.domain-form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.domain-select, .domain-input {
  padding: 10px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: monospace;
}
.domain-select:focus, .domain-input:focus { outline: none; border-color: #2563eb; }
.domain-error { color: #dc2626; font-size: 0.85rem; margin-top: 8px; min-height: 1.2em; }
