@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-root: #0b0f19;
  --bg-sidebar: #0e1320;
  --bg-surface: #111827;
  --bg-elevated: #1e293b;
  --bg-card: rgba(17, 24, 39, 0.85);
  --bg-hover: #334155;
  --border: #1f293d;
  --border-focus: #4f46e5;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.25);
  --purple: #a855f7;
  --green: #10b981;
  --green-glow: rgba(16, 185, 129, 0.25);
  --red: #ef4444;
  --red-bg: rgba(239, 68, 68, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 9999px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.2);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-width: 250px;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-root);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* ----------------- App Layout (Sidebar + Main) ----------------- */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ----------------- Left Sidebar ----------------- */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand {
  padding: 22px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent) 0%, var(--purple) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.brand-info h2 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mobile-close-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  position: absolute;
  right: 16px;
}

.sidebar-action {
  padding: 16px 16px 8px;
}

.sidebar-create-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--accent) 0%, #4f46e5 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 11px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px var(--accent-glow);
}

.sidebar-create-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.sidebar-nav {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  padding: 12px 10px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
  user-select: none;
}

.nav-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(99, 102, 241, 0.15);
  color: #ffffff;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.nav-item.active .nav-icon {
  transform: scale(1.1);
}

.nav-icon {
  font-size: 16px;
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.nav-text {
  flex: 1;
}

.nav-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.nav-item.active .nav-pill {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.nav-badge-pill {
  background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
  color: #fff;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.server-status-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
}

.dot-online {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--green);
}

.status-meta {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ----------------- Main Content Wrapper ----------------- */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.15), transparent 70%),
    radial-gradient(ellipse 60% 40% at 90% 90%, rgba(168, 85, 247, 0.1), transparent 70%);
  background-attachment: fixed;
}

.main-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 15, 25, 0.8);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-toggle-btn {
  display: none;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.view-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-icon-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: var(--transition);
}

.topbar-icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.topbar-refresh-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.topbar-refresh-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}

/* Content Scroll Container */
.content-scroll {
  flex: 1;
  padding: 26px 28px;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* View Sections */
.view-section {
  display: none;
  flex-direction: column;
  gap: 20px;
  animation: fadeInView 0.2s ease-out;
}

.view-section.active {
  display: flex;
}

@keyframes fadeInView {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ----------------- INBOX NAVBAR (Active Email Strip) ----------------- */
.inbox-nav-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inbox-nav-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.label-left {
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.8px;
}

.label-hint {
  font-size: 11px;
  color: var(--accent-light);
  font-weight: 500;
}

.total-badge {
  background: var(--bg-elevated);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 11px;
}

/* ----------------- INBOX LIST (Vertical Scroll Down) ----------------- */
.inbox-nav-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) rgba(255, 255, 255, 0.05);
}

.inbox-nav-bar::-webkit-scrollbar {
  width: 6px;
}

.inbox-nav-bar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
}

.inbox-nav-bar::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 6px;
}

.inbox-nav-bar::-webkit-scrollbar-thumb:hover {
  background: var(--accent-light);
}

.inbox-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.inbox-tab:hover {
  background: var(--bg-hover);
  border-color: var(--border-focus);
}

.inbox-tab.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.inbox-tab-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.inbox-tab .tab-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.inbox-tab .tab-address {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inbox-tab-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.inbox-tab .tab-badge-active {
  font-size: 10px;
  font-weight: 800;
  color: var(--green);
  background: var(--green-bg);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.inbox-tab .tab-copy-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: var(--transition);
}

.inbox-tab .tab-copy-btn:hover {
  color: #fff;
  border-color: var(--accent);
}

.inbox-tab .tab-delete-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 6px;
  border-radius: 4px;
  transition: var(--transition);
}

.inbox-tab .tab-delete-btn:hover {
  color: var(--red);
  background: var(--red-bg);
}

.inbox-tab-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-focus);
  background: rgba(99, 102, 241, 0.05);
  color: var(--accent-light);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 4px;
}

.inbox-tab-add:hover {
  background: rgba(99, 102, 241, 0.15);
  border-style: solid;
}

.inbox-loading-pill {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  padding: 6px 10px;
}

/* ----------------- Create Panel (Collapsible) ----------------- */
.create-panel {
  background: var(--bg-surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-glow);
  animation: slideIn 0.25s ease-out;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.create-panel.hidden {
  display: none;
}

.create-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.create-header h3 {
  font-size: 15px;
  font-weight: 700;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.create-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input-group {
  display: flex;
  gap: 10px;
}

.input-group input {
  flex: 1;
  background: var(--bg-root);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.input-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.domain-picker {
  background: var(--bg-root);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  min-width: 170px;
}

.create-actions {
  display: flex;
  gap: 10px;
}

.btn-success {
  flex: 1;
  background: var(--green);
  color: #000;
  border: none;
  padding: 12px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-success:hover {
  background: #34d399;
  box-shadow: 0 4px 15px var(--green-glow);
}

.btn-accent {
  flex: 1;
  background: linear-gradient(135deg, var(--accent) 0%, var(--purple) 100%);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-accent:hover {
  box-shadow: 0 4px 15px var(--accent-glow);
}

/* ----------------- Active Email Card ----------------- */
.active-email-card {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.7) 0%, rgba(17, 24, 39, 0.9) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.email-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.email-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--accent-light);
}

.email-address-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.email-address-row h2 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  word-break: break-all;
}

.action-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.copy-action-btn {
  background: var(--accent);
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px var(--accent-glow);
}

.copy-action-btn:hover {
  background: var(--accent-light);
  transform: scale(1.02);
}

.copy-action-btn.copied {
  background: var(--green);
  box-shadow: 0 4px 14px var(--green-glow);
}

.qr-shortcut-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.qr-shortcut-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

.refresh-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.auto-refresh-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
}

.timer-pie {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-light);
}

.timer-text {
  font-size: 12px;
  color: var(--text-secondary);
}

.hero-buttons {
  display: flex;
  gap: 10px;
}

.secondary-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.secondary-btn:hover {
  background: var(--bg-hover);
  border-color: var(--text-muted);
}

.danger-btn {
  background: var(--red-bg);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--red);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.danger-btn:hover {
  background: var(--red);
  color: #fff;
}

.auto-refresh-bar-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
}

.auto-refresh-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--purple) 100%);
  transition: width 1s linear;
}

/* ----------------- Messages Container ----------------- */
.messages-container {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.messages-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-left h3 {
  font-size: 16px;
  font-weight: 700;
}

.count-pill {
  background: var(--bg-elevated);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-light);
}

.last-updated {
  font-size: 12px;
  color: var(--text-muted);
}

.message-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
}

.message-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.message-item:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.msg-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #3b82f6 100%);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.msg-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.msg-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.msg-sender {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-time {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.msg-subject {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-snippet {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Radar Ping */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  gap: 14px;
}

.radar-ping {
  position: relative;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radar-dot {
  font-size: 32px;
  z-index: 2;
}

.radar-wave {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--accent-glow);
  animation: radarWave 2s infinite ease-out;
}

@keyframes radarWave {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ----------------- Feature Views Styling ----------------- */
.card-feature {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.feature-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.feature-icon {
  font-size: 28px;
}

.feature-head h3 {
  font-size: 18px;
  font-weight: 700;
}

.feature-head p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.generator-controls .control-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.form-select {
  background: var(--bg-root);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

.bulk-result-container {
  background: var(--bg-root);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bulk-result-container.hidden {
  display: none;
}

.bulk-result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
}

.bulk-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bulk-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}

.btn-mini-copy {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
}

.btn-mini-copy:hover {
  color: #fff;
  border-color: var(--accent);
}

/* QR Code View */
.qr-center {
  align-items: center;
  text-align: center;
}

.qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
}

.qr-image-wrapper {
  background: #ffffff;
  padding: 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.qr-image-wrapper img {
  width: 180px;
  height: 180px;
  display: block;
}

.qr-address-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-light);
}

/* Domains Grid */
.domains-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.domain-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--transition);
}

.domain-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.domain-status {
  font-size: 11px;
  color: var(--green);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.domain-card h4 {
  font-size: 16px;
  font-family: 'JetBrains Mono', monospace;
  color: #fff;
}

.domain-card p {
  font-size: 12px;
  color: var(--text-muted);
}

.btn-copy-domain {
  margin-top: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-copy-domain:hover {
  color: #fff;
  border-color: var(--accent);
}

/* Settings List */
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.setting-item strong {
  font-size: 14px;
}

.setting-item p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.danger-zone {
  border-top: 1px dashed rgba(239, 68, 68, 0.3);
  padding-top: 20px;
}

/* ----------------- Modal Email Reader ----------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.modal-overlay.hidden {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 720px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.modal-sender-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sender-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-sender-info h4 {
  font-size: 15px;
  font-weight: 700;
}

.modal-date {
  font-size: 12px;
  color: var(--text-muted);
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
}

.modal-subject-banner {
  padding: 16px 24px;
  background: rgba(99, 102, 241, 0.08);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.subject-tag {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-light);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.modal-subject-banner h3 {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.body-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.tab-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.tab-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.bookmark-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: #fbbf24;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.bookmark-btn:hover {
  background: rgba(251, 191, 36, 0.15);
}

.copy-body-btn {
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.copy-body-btn:hover {
  color: #fff;
  border-color: var(--text-muted);
}

.email-content {
  background: var(--bg-root);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 400px;
  overflow-y: auto;
}

/* ----------------- Footer ----------------- */
.app-footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding: 20px;
}

/* ----------------- Toasts ----------------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}

.toast {
  background: var(--bg-elevated);
  color: #ffffff;
  border: 1px solid var(--accent);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  font-size: 13px;
  font-weight: 600;
  animation: toastIn 0.25s ease-out;
  display: flex;
  align-items: center;
  gap: 8px;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast.fadeout {
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.2s ease-in;
}

/* ----------------- Responsive Breakpoints ----------------- */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    box-shadow: var(--shadow-md);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 95;
  }
  .sidebar-overlay.hidden {
    display: none;
  }
  .menu-toggle-btn {
    display: flex;
  }
  .mobile-close-btn {
    display: block;
  }
  .content-scroll {
    padding: 16px;
  }
}
