:root {
  --bg-color: #060606;
  --pill-bg: rgba(255, 255, 255, 0.04);
  --pill-border: rgba(255, 255, 255, 0.08);
  --text-primary: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.5);
  --accent: #3b82f6;
  --card-bg: #111;
  --card-border: #222;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-image: radial-gradient(circle at 50% 0%, #151515 0%, #060606 70%);
}

/* TOP NAV HEADER */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  width: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo .dot {
  color: var(--accent);
}

.top-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Email Top Pill */
.email-display-top {
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  padding: 0.6rem 1.2rem;
  border-radius: 40px;
  color: white;
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.email-display-top:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.copy-icon {
  color: var(--text-muted);
  font-size: 1.2rem;
  transition: color 0.2s;
}

.email-display-top:hover .copy-icon {
  color: white;
}

.email-display-top.copied {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}

.email-display-top.copied .copy-icon {
  color: #10b981;
}


/* Icons & Nav */
.nav-icon {
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.2s;
}

.nav-icon:hover {
  background: rgba(255, 255, 255, 0.1);
}

.spin {
  animation: spin 1s linear infinite;
}

/* Dropdown */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 50px;
  background-color: var(--card-bg);
  min-width: 200px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  z-index: 100;
  overflow: hidden;
}

.dropdown-content.show {
  display: block;
}

.dropdown-item {
  color: white;
  padding: 12px 16px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}

.dropdown-item:hover {
  background-color: rgba(255,255,255,0.05);
}

.copy-toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--accent);
  color: white;
  padding: 0.6rem 1.5rem;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* MAIN CONTENT */
.content-area {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem;
  overflow-y: auto;
}

.inbox-wrapper {
  width: 100%;
  max-width: 800px;
  margin-top: 2rem;
}

.inbox-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.inbox-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
  animation: pulse-green 2s infinite;
}

.inbox-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 3rem;
  border: 1px dashed var(--pill-border);
  border-radius: 12px;
}

/* EMAIL ITEM */
.email-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 1.5rem;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.email-item:hover {
  background: #1a1a1a;
  border-color: #333;
  transform: translateY(-2px);
}

.email-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.email-sender {
  font-weight: 600;
  font-size: 1rem;
}

.email-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.email-subject {
  font-weight: 500;
  color: #ddd;
}

/* MODAL */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 1000;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  width: 90%;
  max-width: 700px;
  max-height: 80vh;
  background: #111;
  border: 1px solid #333;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform 0.3s;
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #222;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-close {
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.btn-close:hover { color: white; }

.modal-meta {
  padding: 1rem 2rem;
  background: #0a0a0a;
  border-bottom: 1px solid #222;
  font-size: 0.9rem;
  display: flex;
  gap: 2rem;
}

.meta-label { color: var(--text-muted); }
.meta-value { color: white; }

.modal-body {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
  color: #ddd;
  line-height: 1.6;
}

/* Custom Input Modal Elements */
.input-group {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

#custom-prefix-input {
  flex: 1;
  background: transparent;
  border: none;
  color: white;
  padding: 1rem;
  font-size: 1rem;
  outline: none;
}

.domain-suffix {
  color: var(--text-muted);
  padding: 1rem;
  background: rgba(0,0,0,0.2);
  border-left: 1px solid var(--card-border);
  font-weight: 500;
}

.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #2563eb;
}

/* Animations */
@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

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