:root {
  --font-heading: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;

  /* Color Palette - Premium Space Dark (Blue Highlighted) */
  --bg-primary: #040814;
  --bg-secondary: #0b132b;
  --bg-card: rgba(11, 22, 44, 0.6);
  --bg-card-hover: rgba(20, 37, 72, 0.75);

  --border-color: rgba(255, 255, 255, 0.06);
  --border-focus: rgba(37, 99, 235, 0.45);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #4e5d78;

  /* Gradients - Premium Blue Theme */
  --grad-primary: linear-gradient(135deg, #0d6efd 0%, #00d2ff 100%);
  --grad-accent: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
  --grad-glow: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.15) 0%, transparent 60%);
  --grad-success: linear-gradient(135deg, #10b981 0%, #059669 100%);

  /* Accent Colors */
  --color-primary: #3b82f6;
  --color-secondary: #60a5fa;
  --color-teal: #00d2ff;
  --color-danger: #ef4444;

  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

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

body {
  background-color: var(--bg-primary);
  background-image:
    radial-gradient(at 0% 0%, rgba(13, 110, 253, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(0, 210, 255, 0.06) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(37, 99, 235, 0.04) 0px, transparent 50%);
  color: var(--text-primary);
  font-family: var(--font-body);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Layout Container */
.app-container {
  max-width: 1200px;
  width: 100%;
  flex: 1;
  min-height: 0;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
}

/* Header Section */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--grad-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.logo-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: white;
  stroke-width: 2.5;
}

.logo-text {
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(to right, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 13px;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-teal);
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 8px var(--color-teal);
}

.status-dot.pulse::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: var(--color-teal);
  animation: pulse 1.5s infinite;
}

/* Generator Card */
.generator-card {
  margin: auto 0;
  /* Centered in initial state */
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  /* Slightly larger padding when centered */
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.generator-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: var(--grad-glow);
  pointer-events: none;
  z-index: 0;
}

.generator-header {
  position: relative;
  z-index: 1;
  text-align: center;
}

.generator-title {
  font-size: 28px;
  margin-bottom: 6px;
  background: linear-gradient(to right, #fff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.generator-desc {
  font-size: 14px;
  color: var(--text-secondary);
  max-height: 100px;
  opacity: 1;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.email-display-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 8px 8px 18px;
  gap: 12px;
  transition: var(--transition-smooth);
}

.email-display-container:focus-within,
.email-display-container:hover {
  border-color: var(--border-focus);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.1);
}

.email-address {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-address.placeholder {
  color: var(--text-muted);
}

.action-buttons {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: var(--grad-primary);
  color: white;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-icon-only {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* Domain selector */
.config-row {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-secondary);
}

.domain-config {
  display: flex;
  align-items: center;
  gap: 8px;
}

.domain-select {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
}

.timer-box {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

/* Mailbox Workspace */
.mailbox-container {
  flex: 1;
  display: none;
  /* Hidden by default */
  grid-template-columns: 350px 1fr;
  gap: 20px;
  min-height: 0;
}

/* Active styles when mailbox has emails */
.app-container.has-emails .generator-card {
  margin: 0;
  padding: 16px 24px;
  gap: 12px;
}

.app-container.has-emails .generator-title {
  font-size: 20px;
  margin-bottom: 0px;
}

.app-container.has-emails .generator-desc {
  max-height: 0;
  opacity: 0;
  margin: 0;
}

.app-container.has-emails .mailbox-container {
  display: grid;
  animation: slideUpFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideUpFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Left Pane: Mail List */
.mail-list-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  height: 100%;
  min-height: 0;
}

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

.panel-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.mail-count-badge {
  background: rgba(99, 102, 241, 0.15);
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.refresh-indicator {
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.refresh-indicator:hover {
  color: var(--text-primary);
}

.refresh-indicator.spinning svg {
  animation: spin 1s linear infinite;
}

.mail-items {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Mail Item Card */
.mail-item {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  background: transparent;
  border-left: 3px solid transparent;
  width: 100%;
}

.mail-item:hover {
  background: var(--bg-card-hover);
}

.mail-item.active {
  background: rgba(99, 102, 241, 0.08);
  border-left-color: var(--color-primary);
}

.mail-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

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

.mail-item-time {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.mail-item-subject {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-item-preview {
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
}

/* Right Pane: Mail Viewer */
.mail-view-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  position: relative;
  height: 100%;
  min-height: 0;
}

/* Empty State (Radar scan) */
.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  gap: 20px;
}

.radar-container {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 1px solid rgba(99, 102, 241, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.radar-circle {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  opacity: 0;
  animation: radar-sweep 2s cubic-bezier(0.1, 0.8, 0.3, 1) infinite;
}

.radar-circle:nth-child(2) {
  animation-delay: 0.6s;
}

.radar-circle:nth-child(3) {
  animation-delay: 1.2s;
}

.radar-icon {
  z-index: 1;
  color: var(--color-primary);
}

.radar-icon svg {
  width: 32px;
  height: 32px;
}

.empty-title {
  font-size: 18px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.empty-desc {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 300px;
}

/* Mail Content Viewer */
.mail-viewer {
  display: none;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.mail-viewer.active {
  display: flex;
}

.viewer-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.viewer-subject {
  font-size: 22px;
  color: var(--text-primary);
  line-height: 1.3;
}

.viewer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.sender-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--color-primary);
  font-family: var(--font-heading);
}

.sender-details {
  display: flex;
  flex-direction: column;
}

.sender-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

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

.viewer-time {
  font-size: 13px;
  color: var(--text-muted);
}

/* Attachments bar */
.attachments-section {
  padding: 12px 24px;
  background: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.attachments-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.attachments-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.attachment-badge {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.attachment-badge:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.attachment-badge svg {
  width: 14px;
  height: 14px;
}

/* Mail Body Iframe/Content wrapper */
.viewer-body {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  background: #ffffff;
  /* standard for email reading to preserve sender HTML design */
  color: #1e293b;
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

.viewer-body-dark {
  /* optional toggle if email is plain text */
  background: rgba(0, 0, 0, 0.1);
  color: var(--text-primary);
  padding: 24px;
  font-family: inherit;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
}

.viewer-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: white;
}

/* Toast Notification */
.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  background: #0b132b;
  border: 1px solid var(--color-teal);
  box-shadow: 0 10px 25px rgba(0, 210, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 12px 24px;
  font-size: 14px;
  color: var(--text-primary);
  z-index: 3000;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(-100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast svg {
  color: var(--color-teal);
  width: 18px;
  height: 18px;
}

/* Dev tools block */
.dev-banner {
  background: rgba(234, 179, 8, 0.05);
  border: 1px solid rgba(234, 179, 8, 0.2);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 10px;
}

.dev-title {
  color: #eab308;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.dev-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.dev-input {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: white;
  font-size: 12px;
  outline: none;
}

.dev-input:focus {
  border-color: #eab308;
}

.dev-btn {
  background: #eab308;
  color: black;
  font-weight: 700;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  border: none;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.dev-btn:hover {
  background: #facc15;
}

/* Animations */
@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(45, 212, 191, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(45, 212, 191, 0);
  }
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes radar-sweep {
  0% {
    transform: scale(0.5);
    opacity: 0.8;
  }

  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Admin Badge style */
.admin-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 210, 255, 0.1);
  border: 1px solid rgba(0, 210, 255, 0.3);
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-teal);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.1);
}

.badge-dot {
  width: 6px;
  height: 6px;
  background-color: var(--color-teal);
  border-radius: 50%;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* Admin Custom Email Prefix Group */
.admin-email-input-group {
  width: auto;
}

.admin-custom-prefix-input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: white;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 500;
  outline: none;
  flex: 1;
  min-width: 0;
  transition: var(--transition-smooth);
}

.admin-custom-prefix-input:focus {
  border-color: var(--color-teal);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
}

.admin-domain-suffix {
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--text-secondary);
  margin-left: 8px;
  user-select: none;
}

/* Modal Styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 8, 20, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease forwards;
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 400px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transform: translateY(20px);
  animation: slideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.modal-title {
  font-size: 18px;
  color: var(--text-primary);
  font-weight: 600;
}

.btn-close-modal {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: var(--transition-smooth);
}

.btn-close-modal:hover {
  color: var(--text-primary);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsive design */
@media (max-width: 900px) {
  body {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
  }

  .app-container {
    height: auto;
    overflow: visible;
  }

  .mailbox-container {
    grid-template-columns: 1fr;
    height: auto;
  }

  .mail-view-panel {
    height: 500px;
  }

  .mail-list-panel {
    max-height: 350px;
  }

  .email-display-container {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
  }

  .action-buttons {
    width: 100%;
    margin-top: 8px;
  }

  .action-buttons .btn {
    flex: 1;
  }

  .dev-form {
    grid-template-columns: 1fr;
  }
}

/* Shared Inbox Banner */
.shared-inbox-banner {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  animation: fadeIn 0.4s ease forwards;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #a7f3d0;
}

.banner-icon {
  width: 18px;
  height: 18px;
  color: #10b981;
}

.btn-exit-share {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-exit-share:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.5);
  color: white;
}

/* Share Item inside Management List */
.share-item {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: var(--transition-smooth);
}

.share-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.share-item-email {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.share-item-status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}

.share-item-status.active {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.share-item-status.revoked {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.share-item-body {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  gap: 8px;
  overflow: hidden;
}

.share-item-url {
  font-family: monospace;
  font-size: 12px;
  color: var(--text-secondary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-share-copy {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.btn-share-copy:hover {
  color: var(--text-primary);
}

.btn-share-copy svg {
  width: 14px;
  height: 14px;
}

.share-item-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.btn-revoke {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-revoke:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.4);
  color: white;
}

.btn-revoke:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-teal {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.3);
}

.btn-teal:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.45);
}

/* Mobile Mode Styling overrides */
body.mobile-mode {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

body.mobile-mode .app-container {
  padding: 12px;
  gap: 12px;
  flex: 1;
  min-height: 0;
  max-width: 100%;
}

body.mobile-mode .mailbox-container {
  grid-template-columns: 1fr !important;
  display: grid;
  flex: 1;
  min-height: 0;
  height: 100%;
}

/* Single-Pane Switcher */
body.mobile-mode .mail-list-panel {
  display: flex !important;
  width: 100% !important;
}

body.mobile-mode .mail-view-panel {
  display: none !important;
  width: 100% !important;
}

body.mobile-mode.viewing-mail .mail-list-panel {
  display: none !important;
}

body.mobile-mode.viewing-mail .mail-view-panel {
  display: flex !important;
}

/* Back Button in Mobile Viewer */
body.mobile-mode .btn-back-to-list {
  display: inline-flex !important;
}

/* Hide back button on desktop index.html if it's there */
.btn-back-to-list {
  display: none;
}

/* Adjustments for spacing and card on mobile */
body.mobile-mode .generator-card {
  padding: 16px !important;
  gap: 12px !important;
}

body.mobile-mode .generator-title {
  font-size: 20px !important;
  text-align: left;
}

body.mobile-mode .email-display-container {
  padding: 8px 8px 8px 14px !important;
}

body.mobile-mode .email-address {
  font-size: 16px !important;
}

body.mobile-mode .action-buttons {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 10px;
}

body.mobile-mode .action-buttons .btn {
  flex: none;
  width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
}

body.mobile-mode header {
  padding: 10px 0 !important;
}

body.mobile-mode .logo-text {
  font-size: 18px !important;
}

/* Footer Styling */
.app-footer {
  text-align: center;
  padding: 12px 24px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  background: rgba(4, 8, 20, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  z-index: 100;
  width: 100%;
}

.app-footer a {
  color: var(--color-teal);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.app-footer a:hover {
  color: var(--text-primary);
  text-shadow: 0 0 8px var(--color-teal);
}

body.mobile-mode .app-footer {
  font-size: 11px;
  padding: 8px 12px;
  gap: 8px;
  flex-direction: row;
  flex-wrap: wrap;
}