:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a25;
  --bg-card: rgba(26, 26, 37, 0.8);
  --bg-card-hover: rgba(35, 35, 50, 0.9);
  
  --text-primary: #f0f0f5;
  --text-secondary: #a0a0b0;
  --text-muted: #606070;
  
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-tertiary: #ec4899;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.3);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
  
  --font-main: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Background Effects */
.background-effects {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  animation: float 20s ease-in-out infinite;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: var(--accent-primary);
  top: -200px;
  right: -200px;
  animation-delay: 0s;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: var(--accent-secondary);
  bottom: -150px;
  left: -150px;
  animation-delay: -7s;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: var(--accent-tertiary);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -14s;
  opacity: 0.2;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -30px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(-30px, -20px) scale(1.02); }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* Container */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 3rem;
  animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.logo-icon {
  width: 56px;
  height: 56px;
  background: var(--accent-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: var(--shadow-glow); }
  50% { box-shadow: 0 0 60px rgba(99, 102, 241, 0.3); }
}

.logo-icon svg {
  width: 28px;
  height: 28px;
  color: white;
}

.logo h1 {
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.tagline {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 300;
}

/* Email Generator */
.email-generator {
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.email-display {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.email-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.email-input-wrapper:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.email-prefix {
  flex: 1;
  background: transparent;
  border: none;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  color: var(--text-primary);
  outline: none;
  min-width: 0;
}

.email-prefix::placeholder {
  color: var(--text-muted);
}

.domain-separator {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 1.25rem;
  margin: 0 0.25rem;
}

.email-domain {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  color: var(--accent-primary);
  font-weight: 500;
}

.email-domain-select {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  color: var(--accent-primary);
  font-weight: 500;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  transition: all 0.3s ease;
}

.email-domain-select:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.email-domain-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.email-domain-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 0.5rem;
}

.email-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-copy {
  background: var(--accent-gradient);
  color: white;
  flex: 1;
}

.btn-copy:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-random {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  flex: 1;
}

.btn-random:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-secondary);
}

.btn-refresh {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.75rem;
}

.btn-refresh:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
}

.btn-refresh:hover svg {
  animation: spin 0.5s ease;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.copy-notification {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--success);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  margin-top: 1rem;
  font-weight: 500;
  animation: slideUp 0.3s ease;
}

.copy-notification.show {
  display: flex;
}

.copy-notification svg {
  width: 18px;
  height: 18px;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Inbox Section */
.inbox-section {
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.inbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Email Search Container */
.email-search-container {
  margin-bottom: 1.5rem;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 1rem;
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  pointer-events: none;
  z-index: 1;
}

.email-search-input {
  width: 100%;
  padding: 0.875rem 3rem 0.875rem 3rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: all 0.2s ease;
}

.email-search-input::placeholder {
  color: var(--text-tertiary);
}

.email-search-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  background: var(--bg-card);
}

.clear-search-btn {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  z-index: 1;
}

.clear-search-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.clear-search-btn svg {
  width: 18px;
  height: 18px;
}

.search-results-count {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Highlight search results */
.email-item mark {
  background: var(--accent-primary);
  color: white;
  padding: 0.1rem 0.2rem;
  border-radius: 3px;
  font-weight: 600;
}

.inbox-header h2 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.inbox-header h2 svg {
  width: 24px;
  height: 24px;
  color: var(--accent-primary);
}

.inbox-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-secondary);
}

.email-count {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}

/* Show All Toggle */
.show-all-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.4rem 0.75rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}

.show-all-toggle:hover {
  border-color: var(--accent-primary);
}

.show-all-toggle input {
  display: none;
}

.toggle-slider {
  width: 36px;
  height: 20px;
  background: var(--bg-secondary);
  border-radius: 10px;
  position: relative;
  transition: all 0.3s;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--text-muted);
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: all 0.3s;
}

.show-all-toggle input:checked + .toggle-slider {
  background: var(--accent-primary);
}

.show-all-toggle input:checked + .toggle-slider::after {
  transform: translateX(16px);
  background: white;
}

.toggle-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.show-all-toggle input:checked ~ .toggle-label {
  color: var(--accent-primary);
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: background 0.3s;
}

.connection-status.connected .status-dot {
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
}

.connection-status.polling .status-dot {
  background: var(--accent-primary);
  box-shadow: 0 0 8px var(--accent-primary);
  animation: blink 2s infinite;
}

.connection-status.disconnected .status-dot {
  background: var(--warning);
  animation: blink 1s infinite;
}

@keyframes blink {
  50% { opacity: 0.5; }
}

.inbox {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  min-height: 400px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* Empty Inbox */
.empty-inbox {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
}

.empty-icon {
  width: 80px;
  height: 80px;
  background: var(--bg-tertiary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  animation: bobbing 3s ease-in-out infinite;
}

@keyframes bobbing {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.empty-icon svg {
  width: 40px;
  height: 40px;
  color: var(--text-muted);
}

.empty-inbox h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.empty-inbox p {
  color: var(--text-secondary);
  max-width: 300px;
}

.waiting-animation {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.waiting-animation span {
  width: 8px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

.waiting-animation span:nth-child(1) { animation-delay: -0.32s; }
.waiting-animation span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Email List */
.email-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.email-list.has-emails {
  display: block;
}

.email-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background 0.2s;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.email-item:hover {
  background: var(--bg-card-hover);
}

.email-item.unread {
  background: rgba(99, 102, 241, 0.05);
}

.email-item.unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent-gradient);
}

.email-item {
  position: relative;
}

.sender-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.1rem;
  color: white;
  flex-shrink: 0;
}

.email-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.email-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.email-sender {
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-time {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.email-to {
  font-size: 0.8rem;
  color: var(--accent-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-mono);
}

.email-to strong {
  color: var(--text-muted);
  font-weight: 500;
}

.email-subject {
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-item.unread .email-subject {
  font-weight: 600;
}

.email-preview {
  font-size: 0.9rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-new-badge {
  background: var(--accent-gradient);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

.modal.show {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 700px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: scaleIn 0.3s ease;
  box-shadow: var(--shadow-lg);
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  gap: 1rem;
}

.modal-title-wrapper {
  flex: 1;
  min-width: 0;
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  word-break: break-word;
}

.modal-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.btn-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.btn-close:hover {
  background: var(--error);
  border-color: var(--error);
  color: white;
}

.btn-close svg {
  width: 18px;
  height: 18px;
}

.modal-sender {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-tertiary);
}

.modal-sender .sender-avatar {
  width: 48px;
  height: 48px;
}

.sender-info {
  display: flex;
  flex-direction: column;
}

.sender-name {
  font-weight: 500;
  color: var(--text-primary);
}

.sender-email {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.attachment-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.attachment-item svg {
  width: 16px;
  height: 16px;
}

.email-content-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tab-btn {
  padding: 0.5rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

.tab-btn:hover:not(.active) {
  background: var(--bg-card-hover);
}

.email-body-content {
  background: white;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  min-height: 200px;
  color: #333;
  font-size: 0.95rem;
  line-height: 1.7;
}

.email-body-content a {
  color: #2563eb !important;
  text-decoration: underline !important;
  word-break: break-all;
  cursor: pointer;
}

.email-body-content a:hover {
  color: #1d4ed8 !important;
  background: rgba(37, 99, 235, 0.1);
}

.email-body-content.text-content {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-family: var(--font-mono);
  white-space: pre-wrap;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
}

.btn-copy-links {
  background: transparent;
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.btn-copy-links:hover {
  background: var(--accent-primary);
  color: white;
}

.btn-copy-links svg {
  width: 16px;
  height: 16px;
}

.btn-delete {
  background: transparent;
  color: var(--error);
  border: 1px solid var(--error);
}

.btn-delete:hover {
  background: var(--error);
  color: white;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

/* Responsive */
@media (max-width: 640px) {
  .container {
    padding: 1rem;
  }
  
  .logo h1 {
    font-size: 2rem;
  }
  
  .email-input-wrapper {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 1rem;
  }
  
  .email-prefix {
    font-size: 1.1rem;
    text-align: center;
  }
  
  .domain-separator,
  .email-domain {
    font-size: 1.1rem;
    text-align: center;
    display: block;
    width: 100%;
  }
  
  .domain-separator {
    display: none;
  }
  
  .email-domain::before {
    content: '@';
  }
  
  .email-actions {
    flex-direction: column;
  }
  
  .btn-copy,
  .btn-random {
    width: 100%;
    justify-content: center;
  }
  
  .btn-refresh {
    position: absolute;
    top: 1rem;
    right: 1rem;
  }
  
  .email-display {
    position: relative;
  }
  
  .inbox-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .email-item {
    padding: 1rem;
  }
  
  .modal-content {
    max-height: 90vh;
  }
  
  .modal-header {
    padding: 1rem;
  }
  
  .modal-sender {
    padding: 1rem;
  }
  
  .modal-body {
    padding: 1rem;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* API Documentation Section */
.api-docs-section {
  margin-top: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.api-docs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--bg-tertiary);
  cursor: pointer;
  transition: background 0.2s;
}

.api-docs-header:hover {
  background: var(--bg-card-hover);
}

.api-docs-header h2 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.api-docs-header h2 svg {
  width: 20px;
  height: 20px;
  color: var(--accent-primary);
}

.api-toggle-icon {
  color: var(--text-secondary);
  font-size: 0.8rem;
  transition: transform 0.3s;
}

.api-docs-content {
  padding: 1.5rem;
}

.api-endpoint {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.api-method {
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  flex-shrink: 0;
  height: fit-content;
}

.api-method.get {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.api-method.post {
  background: rgba(99, 102, 241, 0.2);
  color: var(--accent-primary);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.api-info {
  flex: 1;
  min-width: 0;
}

.api-info h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.api-url {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-secondary);
  margin-bottom: 0.75rem;
  word-break: break-all;
}

.api-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.api-params h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1rem 0 0.5rem;
}

.api-params table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.api-params td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.api-params td:first-child {
  font-family: var(--font-mono);
  color: var(--accent-primary);
  width: 120px;
}

.api-params td:last-child {
  color: var(--text-muted);
  text-align: right;
  width: 100px;
}

.api-example {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.api-example h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.api-example-url {
  display: block;
  padding: 0.5rem 0.75rem;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--success);
  margin-bottom: 0.75rem;
  overflow-x: auto;
}

.api-response {
  padding: 1rem;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  overflow-x: auto;
  white-space: pre;
  line-height: 1.5;
}

.api-note {
  padding: 1rem 1.25rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.api-note h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.api-note ul {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.8;
}

.api-note li strong {
  color: var(--accent-secondary);
  font-family: var(--font-mono);
}

/* Responsive API Docs */
@media (max-width: 640px) {
  .api-endpoint {
    flex-direction: column;
  }
  
  .api-method {
    align-self: flex-start;
  }
  
  .api-params td:last-child {
    display: none;
  }
  
  .api-params td:first-child {
    width: auto;
  }
}

