/* ========================================
   LETIMAIL - COMPLETELY FIXED VERSION
======================================== */

:root {
  --bg-primary: #0f0f23;
  --bg-secondary: #1a1a2e;
  --bg-card: #252842;
  
  --text-primary: #ffffff;
  --text-secondary: #b8c1ec;
  --text-muted: #8892b0;
  
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  
  --border-light: rgba(99, 102, 241, 0.2);
  --border-subtle: rgba(255, 255, 255, 0.1);
  
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

/* ========================================
   RESET & BASE
======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-y: auto;
  font-size: 14px;
  color: var(--text-secondary);
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  padding: 0;
  font-weight: 700;
  line-height: 1.2;
}

p {
  margin: 0 0 1rem 0;
  line-height: 1.6;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* ========================================
   NAVBAR - COMPLETELY FIXED
======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 15, 35, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  padding: 12px 0;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-mark {
  width: 36px;
  height: 36px;
  background: var(--accent-gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text h1 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin: 0;
}

.logo-tagline {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

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

.user-badge {
  font-size: 11px;
  font-weight: 600;
  background: var(--accent-gradient);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

.email-count {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.auth-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.login-btn,
.signup-btn {
  padding: 8px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  border: none;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.login-btn {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.login-btn:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--text-primary);
}

.signup-btn {
  background: var(--accent-gradient);
  color: white;
}

.signup-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

/* User Menu */
.user-menu {
  position: relative;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-gradient);
  border: none;
  color: white;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.user-avatar:hover {
  transform: scale(1.05);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 8px;
  min-width: 200px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: none;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: none;
  background: none;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  width: 100%;
  text-align: left;
  transition: background 0.2s;
}

.dropdown-item:hover {
  background: rgba(99, 102, 241, 0.1);
}

.dropdown-item.logout {
  color: var(--error);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 6px 0;
}

/* ========================================
   HERO SECTION
======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 0 60px;
  position: relative;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  max-width: 600px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid var(--border-light);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 24px;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 52px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
}

.primary-cta,
.secondary-cta {
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.primary-cta {
  background: var(--accent-gradient);
  color: white;
}

.primary-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.4);
}

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

.secondary-cta:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hero-stats {
  display: flex;
  gap: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--border-subtle);
}

.stat {
  text-align: center;
}

.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-divider {
  width: 1px;
  background: var(--border-subtle);
}

/* Hero Visual */
.hero-visual {
  position: relative;
  min-height: 400px;
}

.floating-card {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow-md);
  animation: float 6s ease-in-out infinite;
}

.card-1 {
  width: 300px;
  top: 50px;
  left: 0;
}

.card-2 {
  width: 260px;
  bottom: 50px;
  right: 0;
  animation-delay: 2s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.card-header {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.card-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-light);
}

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

.email-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preview-line {
  height: 6px;
  background: var(--accent-gradient);
  border-radius: 3px;
  opacity: 0.3;
}

.preview-line.long { width: 100%; }
.preview-line.medium { width: 70%; }
.preview-line.short { width: 50%; }

/* ========================================
   SECTIONS
======================================== */
.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 42px;
  margin-bottom: 16px;
}

.section-header p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Problem Section */
.problem-section {
  background: var(--bg-secondary);
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.problem-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 32px 24px;
  border-radius: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

.problem-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-primary);
}

.problem-icon-wrapper {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.problem-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.problem-card p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

/* Solution Section */
.solution-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}

.solution-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 32px;
  border-radius: 20px;
  position: relative;
  transition: all 0.3s ease;
}

.solution-card:hover {
  transform: translateX(8px);
  border-color: var(--accent-primary);
}

.solution-number {
  position: absolute;
  top: 20px;
  right: 20px;
  font-family: 'Playfair Display', serif;
  font-size: 42px;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.15;
}

.solution-icon {
  font-size: 36px;
  display: block;
  margin-bottom: 16px;
}

.solution-card h3 {
  font-size: 22px;
  margin-bottom: 12px;
}

.solution-card p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

/* ========================================
   PRICING SECTION - FIXED!
======================================== */
.pricing-section {
  background: var(--bg-secondary);
  padding: 80px 0;
}

.pricing-header {
  text-align: center;
  margin-bottom: 50px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 36px 28px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  position: relative;
}

.pricing-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 1px var(--accent-primary);
  transform: scale(1.03);
}

.pricing-card.featured:hover {
  transform: scale(1.03) translateY(-8px);
}

.plan-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-primary);
  margin-bottom: 16px;
  width: fit-content;
}

.featured-badge {
  background: var(--accent-gradient);
  color: white;
}

.plan-name {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 12px;
}

.price {
  font-family: 'Playfair Display', serif;
  font-size: 44px;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.period {
  font-size: 15px;
  color: var(--text-muted);
}

.plan-description {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.plan-features {
  list-style: none;
  margin-bottom: 28px;
  flex: 1;
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.check {
  color: var(--success);
  font-weight: 700;
  font-size: 14px;
}

.cross {
  color: var(--text-muted);
  opacity: 0.5;
}

.plan-button {
  width: 100%;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  text-align: center;
  text-decoration: none;
  display: block;
  transition: all 0.3s ease;
}

.plan-button-primary {
  background: var(--accent-gradient);
  color: white;
}

.plan-button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.plan-button-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.plan-button-outline:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--accent-primary);
}

/* ========================================
   CTA SECTION
======================================== */
.cta-section {
  padding: 80px 0;
  text-align: center;
}

.cta-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 42px;
  margin-bottom: 20px;
}

.cta-content p {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.cta-button {
  background: var(--accent-gradient);
  color: white;
  border: none;
  padding: 16px 40px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.5);
}

.cta-features {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.cta-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 14px;
}

.feature-check {
  color: var(--success);
  font-weight: 700;
}

/* ========================================
   FOOTER
======================================== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0 24px;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 60px;
  margin-bottom: 40px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 24px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.footer-brand h3 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-brand p {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-description {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin-top: 16px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.footer-column h4 {
  font-size: 15px;
  margin-bottom: 16px;
}

.footer-column a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 10px;
  transition: color 0.2s;
}

.footer-column a:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 13px;
}

.footer-social {
  display: flex;
  gap: 20px;
}

.footer-social a {
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-social a:hover {
  color: var(--accent-primary);
}

/* ========================================
   APP PAGE
======================================== */
.app-main {
  padding: 100px 0 60px;
  min-height: 100vh;
}

.app-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.app-header {
  text-align: center;
  margin-bottom: 50px;
}

.app-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 42px;
  margin-bottom: 12px;
}

.app-header p {
  font-size: 18px;
  color: var(--text-secondary);
}

.app-workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 50px;
}

.input-panel,
.output-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-direction: column;
}

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

.panel-header h2 {
  font-size: 22px;
}

.step-indicator,
.quality-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
}

.step-indicator {
  background: rgba(99, 102, 241, 0.1);
  color: var(--text-muted);
}

.quality-badge {
  background: var(--accent-gradient);
  color: white;
}

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 10px;
}

textarea,
select,
input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  transition: all 0.3s ease;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

textarea:focus,
select:focus,
input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input-hint {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

.generate-btn {
  width: 100%;
  background: var(--accent-gradient);
  color: white;
  border: none;
  padding: 16px 28px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  margin-top: 8px;
}

.generate-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(99, 102, 241, 0.4);
}

.generate-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ========================================
   OUTPUT & EDITING STYLES - FIXED!
======================================== */

.output-text {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px;
  min-height: 400px;
  white-space: pre-wrap;
  line-height: 1.7;
  overflow-y: auto;
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.output-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.placeholder-animation {
  width: 70px;
  height: 70px;
  position: relative;
  margin-bottom: 20px;
}

.animation-ring {
  position: absolute;
  width: 70px;
  height: 70px;
  border: 3px solid transparent;
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 2s linear infinite;
}

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

.placeholder-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px;
  opacity: 0.5;
}

.output-placeholder p {
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 6px;
  font-weight: 500;
}

.output-placeholder small {
  font-size: 12px;
  color: var(--text-muted);
}

/* Remove scrollbar when there's minimal content */
.output-text:not(:has(> :not(.output-placeholder))) {
  overflow: hidden;
}

.action-buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.action-btn {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.copy-btn {
  background: rgba(139, 92, 246, 0.1);
  color: var(--accent-secondary);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.copy-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  transform: translateY(-2px);
}

.edit-btn {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.edit-btn:hover {
  background: rgba(245, 158, 11, 0.2);
  transform: translateY(-2px);
}

.send-btn {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.send-btn:hover {
  background: rgba(16, 185, 129, 0.2);
  transform: translateY(-2px);
}

/* Email Editor - FIXED VISUALS */
.email-editor {
  width: 100%;
  min-height: 400px;
  padding: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.7;
  resize: vertical;
  transition: all 0.3s ease;
}

.email-editor:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.edit-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.submit-edit-btn,
.cancel-edit-btn {
  flex: 1;
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.submit-edit-btn {
  background: var(--accent-gradient);
  color: white;
}

.submit-edit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.cancel-edit-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.cancel-edit-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.edit-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
  padding: 12px;
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 10px;
  text-align: center;
}

/* Tips Section */
.tips-section {
  margin-top: 50px;
  text-align: center;
}

.tips-section h3 {
  font-size: 24px;
  margin-bottom: 28px;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.tip-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 24px 20px;
  border-radius: 16px;
  text-align: center;
  transition: all 0.3s ease;
}

.tip-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-primary);
}

.tip-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 12px;
}

.tip-card h4 {
  font-size: 16px;
  margin-bottom: 8px;
}

.tip-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* App Features Section */
.app-features {
  margin-top: 60px;
  padding: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.feature-highlight {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px;
  background: var(--bg-secondary);
  border-radius: 16px;
  transition: all 0.3s ease;
}

.feature-highlight:hover {
  transform: translateX(8px);
  background: rgba(99, 102, 241, 0.05);
}

.feature-icon {
  font-size: 36px;
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 14px;
}

.feature-content {
  flex: 1;
}

.feature-content h4 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.feature-content p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* ========================================
   SETTINGS PAGE
======================================== */
.settings-main {
  padding: 100px 0 60px;
  min-height: 100vh;
}

.settings-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.settings-header {
  text-align: center;
  margin-bottom: 50px;
}

.settings-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 42px;
  margin-bottom: 12px;
}

.settings-header p {
  font-size: 18px;
  color: var(--text-secondary);
}

.settings-content {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
}

.settings-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 20px;
  height: fit-content;
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: none;
  background: none;
  color: var(--text-secondary);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  transition: all 0.2s ease;
  cursor: pointer;
}

.nav-item:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-primary);
}

.nav-item.active {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
}

.settings-panels {
  display: flex;
  flex-direction: column;
}

.settings-panel {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 36px;
}

.settings-panel.active {
  display: block;
}

.settings-panel h2 {
  font-size: 26px;
  margin-bottom: 28px;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 500px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 600;
  font-size: 14px;
}

.settings-input,
.settings-select {
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.3s ease;
}

.settings-input:focus,
.settings-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.settings-btn {
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  cursor: pointer;
}

.settings-btn.primary {
  background: var(--accent-gradient);
  color: white;
}

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

.settings-btn.secondary {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-primary);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.settings-btn.secondary:hover {
  background: rgba(99, 102, 241, 0.2);
}

/* Subscription Info */
.subscription-info {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.plan-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 28px;
}

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

.plan-header h3 {
  font-size: 22px;
}

.plan-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.feature i {
  color: var(--success);
}

.plan-usage {
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.usage-item {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 12px;
}

.usage-label {
  color: var(--text-secondary);
}

.usage-value {
  font-weight: 600;
  color: var(--accent-primary);
}

.upgrade-options h4 {
  font-size: 20px;
  margin-bottom: 20px;
}

.plan-option {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 24px;
}

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

.option-header h5 {
  font-size: 20px;
}

.option-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-primary);
}

.option-features {
  list-style: none;
  margin-bottom: 20px;
}

.option-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.option-features i {
  color: var(--success);
}

/* Security Section */
.security-sections {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.security-section h4 {
  font-size: 20px;
  margin-bottom: 20px;
}

.login-sessions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.session-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}

.session-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.session-info strong {
  font-size: 14px;
}

.session-info span {
  font-size: 12px;
  color: var(--text-muted);
}

.session-status {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}

.session-status.current {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

/* Checkbox styling */
.checkbox-group {
  margin: 16px 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.preferences-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.preferences-section h4 {
  font-size: 16px;
  margin-bottom: 16px;
  color: var(--text-primary);
}

/* ========================================
   MODALS
======================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  position: relative;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
}

.modal-content h3 {
  font-size: 24px;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.auth-modal {
  max-width: 440px;
  padding: 0;
}

.auth-header {
  padding: 36px 36px 0;
  text-align: center;
}

.auth-header h3 {
  font-size: 26px;
  margin-bottom: 8px;
}

.auth-header p {
  font-size: 15px;
  color: var(--text-secondary);
}

.auth-form {
  padding: 28px 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-footer {
  padding: 0 36px 36px;
  text-align: center;
}

.auth-footer p {
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.auth-input,
.email-input,
.name-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.3s ease;
}

.auth-input:focus,
.email-input:focus,
.name-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.auth-btn {
  width: 100%;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.auth-btn.primary {
  background: var(--accent-gradient);
  color: white;
}

.auth-btn.primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: all 0.2s ease;
  z-index: 10;
  cursor: pointer;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.confirm-send-btn,
.cancel-send-btn {
  flex: 1;
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.confirm-send-btn {
  background: var(--accent-gradient);
  color: white;
}

.confirm-send-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.cancel-send-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.cancel-send-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

/* OTP Input */
.otp-input-container {
  position: relative;
}

.otp-input {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 6px;
  padding-right: 90px;
}

.otp-resend {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-primary);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
}

.otp-resend:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.2);
}

.otp-resend:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.otp-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  display: block;
}

/* Button Loading States */
.btn-text {
  display: block;
}

.btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

button:disabled .btn-text {
  display: none;
}

button:disabled .btn-spinner {
  display: block;
}

/* ========================================
   NOTIFICATION
======================================== */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  z-index: 10001;
  max-width: 380px;
  width: calc(100% - 40px);
  opacity: 0;
  visibility: hidden;
  transform: translateX(400px);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.notification.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.notification.success {
  border-left: 4px solid var(--success);
}

.notification.error {
  border-left: 4px solid var(--error);
}

.notification.warning {
  border-left: 4px solid var(--warning);
}

.notification.info {
  border-left: 4px solid var(--info);
}

.notification-content {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
}

.notification-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

.notification.success .notification-icon {
  color: var(--success);
}

.notification.error .notification-icon {
  color: var(--error);
}

.notification.warning .notification-icon {
  color: var(--warning);
}

.notification.info .notification-icon {
  color: var(--info);
}

.notification-text {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}

.notification-message {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.notification-close {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 4px;
  border-radius: 6px;
  flex-shrink: 0;
  transition: all 0.2s ease;
  cursor: pointer;
}

.notification-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.notification-progress {
  height: 3px;
  background: var(--accent-gradient);
  border-radius: 0 0 14px 14px;
}

/* ========================================
   ONBOARDING MODAL STYLES
======================================== */

.onboarding-modal .modal-content {
  max-width: 700px;
  max-height: 85vh;
  overflow-y: auto;
}

.onboarding-content {
  padding: 0;
}

.onboarding-progress {
  padding: 24px 36px 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 10px;
  transition: width 0.4s ease;
  width: 33.33%;
}

.progress-text {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.onboarding-step {
  display: none;
  animation: fadeIn 0.4s ease;
}

.onboarding-step.active {
  display: block;
}

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

.onboarding-header {
  padding: 32px 36px 24px;
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
}

.onboarding-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.onboarding-header h2 {
  font-size: 26px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.onboarding-header h3 {
  font-size: 20px;
  color: var(--accent-primary);
  margin-bottom: 0;
}

.step-description {
  font-size: 15px;
  color: var(--text-secondary);
  margin-top: 8px;
  line-height: 1.5;
}

.onboarding-body {
  padding: 28px 36px;
}

.onboarding-body > p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.info-box {
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
}

.info-box h4 {
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.check-icon {
  color: var(--success);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

.info-list li div {
  flex: 1;
}

.info-list strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 4px;
}

.info-list p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.agreement-text {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 20px;
  margin-bottom: 0;
}

.warning-box {
  background: rgba(245, 158, 11, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
}

.warning-item {
  margin-bottom: 20px;
}

.warning-item:last-child {
  margin-bottom: 0;
}

.warning-item strong {
  color: var(--warning);
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.warning-item p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.disclaimer-footer {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 20px;
  margin-bottom: 0;
}

/* Tone Input Section */
.tone-input-section {
  margin-bottom: 24px;
}

.tone-input-section label {
  display: block;
  margin-bottom: 12px;
}

.tone-input-section strong {
  display: block;
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.label-hint {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

.tone-email-textarea {
  width: 100%;
  min-height: 180px;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  transition: all 0.3s ease;
}

.tone-email-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.tone-email-textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.add-email-btn {
  width: 100%;
  margin-top: 12px;
  padding: 12px 20px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 10px;
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.add-email-btn:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.15);
  transform: translateY(-1px);
}

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

.added-emails {
  margin-top: 24px;
}

.added-emails-title {
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.added-email-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

.added-email-card:hover {
  border-color: var(--accent-primary);
}

.email-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.email-number {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-primary);
}

.remove-email-btn {
  background: rgba(239, 68, 68, 0.1);
  border: none;
  color: var(--error);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: all 0.2s ease;
}

.remove-email-btn:hover {
  background: rgba(239, 68, 68, 0.2);
}

.email-preview {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.info-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 14px;
  margin-top: 20px;
}

.info-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.info-note p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.info-note strong {
  color: var(--text-primary);
}

/* Onboarding Actions */
.onboarding-actions {
  padding: 24px 36px 32px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.onboarding-btn {
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.onboarding-btn.primary {
  background: var(--accent-gradient);
  color: white;
}

.onboarding-btn.primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

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

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

.onboarding-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.onboarding-btn.tertiary {
  background: transparent;
  color: var(--text-muted);
  border: none;
}

.onboarding-btn.tertiary:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* ========================================
   TONE MANAGEMENT STYLES
======================================== */

.panel-description {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 28px;
    line-height: 1.6;
}

.style-analysis-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.05));
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.style-analysis-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
}

.style-analysis-card h4 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.style-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: center;
}

.metric-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.metric-value {
    font-size: 20px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.common-phrases {
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
}

.common-phrases strong {
    display: block;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.phrase-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.phrase-tag {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--accent-primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.tone-section {
    margin-bottom: 40px;
}

.section-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-header-inline h3 {
    font-size: 20px;
    color: var(--text-primary);
    margin: 0;
}

.add-tone-email-btn {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.add-tone-email-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.info-badge {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: help;
}

.section-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.tone-emails-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-secondary);
    border: 2px dashed var(--border-subtle);
    border-radius: 16px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: block;
    opacity: 0.5;
}

.empty-state p {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state small {
    font-size: 14px;
    color: var(--text-muted);
}

.tone-email-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 20px;
    transition: all 0.3s ease;
}

.tone-email-card:hover {
    border-color: var(--accent-primary);
    transform: translateX(4px);
}

.tone-email-card.edited {
    border-left: 3px solid var(--warning);
}

.email-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

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

.email-actions {
    display: flex;
    gap: 6px;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 13px;
    cursor: pointer;
}

.icon-btn:hover {
    transform: translateY(-2px);
}

.icon-btn.edit:hover {
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent-primary);
}

.icon-btn.delete:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.email-preview {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.view-full-btn {
    background: none;
    border: none;
    color: var(--accent-primary);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    transition: all 0.2s ease;
    cursor: pointer;
}

.view-full-btn:hover {
    gap: 10px;
}

.edit-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--warning);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 8px;
}

/* ========================================
   UPGRADE MODAL STYLES
======================================== */

.upgrade-header {
  text-align: center;
  margin-bottom: 30px;
}

.upgrade-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.upgrade-header h3 {
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.upgrade-header p {
  color: var(--text-secondary);
  font-size: 15px;
}

.upgrade-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 30px;
}

.upgrade-feature {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
}

.upgrade-feature i {
  font-size: 20px;
  color: var(--accent-primary);
  width: 24px;
  text-align: center;
}

.upgrade-feature div {
  flex: 1;
}

.upgrade-feature strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.upgrade-feature span {
  font-size: 13px;
  color: var(--text-secondary);
}

.upgrade-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.upgrade-btn {
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.upgrade-btn.primary {
  background: var(--accent-gradient);
  color: white;
}

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

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

.upgrade-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

/* ========================================
   DELETE BUTTON STYLES
======================================== */

.delete-account-btn {
  background: rgba(239, 68, 68, 0.1) !important;
  color: var(--error) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

.delete-account-btn:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  transform: translateY(-1px);
}

/* ========================================
   BEAUTIFUL CUSTOM SCROLLBARS
======================================== */

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.5) rgba(255, 255, 255, 0.05);
}

/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  margin: 4px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.6), rgba(139, 92, 246, 0.6));
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.02);
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.8), rgba(139, 92, 246, 0.8));
  border-color: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg, rgba(99, 102, 241, 1), rgba(139, 92, 246, 1));
}

/* Scrollbar for modals */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.4), rgba(139, 92, 246, 0.4));
  border-radius: 8px;
}

/* Scrollbar for textareas */
textarea::-webkit-scrollbar {
  width: 8px;
}

textarea::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.3);
  border-radius: 8px;
}

textarea::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.5);
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  
  .hero-visual {
    min-height: 350px;
  }
  
  .app-workspace {
    grid-template-columns: 1fr;
  }
  
  .settings-content {
    grid-template-columns: 1fr;
  }
  
  .problem-grid {
    grid-template-columns: 1fr;
  }
  
  .solution-grid {
    grid-template-columns: 1fr;
  }
  
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
  }
  
  .pricing-card.featured {
    transform: scale(1);
  }
  
  .tips-grid {
    grid-template-columns: 1fr;
  }
  
  .app-features {
    padding: 28px;
  }
  
  .feature-highlight {
    flex-direction: column;
    text-align: center;
  }
  
  .feature-icon {
    margin: 0 auto;
  }
  
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .workflow-steps {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .footer-links {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .style-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-container {
    flex-wrap: wrap;
  }
  
  .user-info {
    order: 3;
    width: 100%;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
  }
  
  .hero-title {
    font-size: 38px;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  
  .primary-cta,
  .secondary-cta {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
  
  .hero-stats {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .section-header h2 {
    font-size: 34px;
  }
  
  .benefits-grid {
    grid-template-columns: 1fr;
  }
  
  .workflow-steps {
    grid-template-columns: 1fr;
  }
  
  .footer-links {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .action-btn {
    width: 100%;
  }
  
  .auth-header,
  .auth-form,
  .auth-footer {
    padding-left: 24px;
    padding-right: 24px;
  }
  
  .section-header-inline {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .add-tone-email-btn {
    width: 100%;
    justify-content: center;
  }
  
  .modal-actions {
    flex-direction: column;
  }
  
  .modal-actions .settings-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 15px;
  }
  
  .container {
    padding: 0 16px;
  }
  
  .nav-container {
    padding: 0 16px;
  }
  
  .logo-text h1 {
    font-size: 18px;
  }
  
  .logo-mark {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
  
  .hero-title {
    font-size: 32px;
  }
  
  .section-header h2 {
    font-size: 28px;
  }
  
  .auth-header,
  .auth-form,
  .auth-footer {
    padding-left: 24px;
    padding-right: 24px;
  }
  
  .modal-content {
    margin: 10px;
  }
  
  .notification {
    left: 10px;
    right: 10px;
    width: auto;
  }
  
  .input-panel,
  .output-panel {
    padding: 20px;
  }
  
  .settings-panel {
    padding: 24px;
  }
  
  .app-features {
    padding: 20px;
  }
  
  .style-metrics {
    grid-template-columns: 1fr;
  }
}

.edit-btn.save-mode {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.edit-btn.save-mode:hover {
  background: rgba(16, 185, 129, 0.2);
}

/* Email Editor Textarea - BRAND NEW */
.email-editor-textarea {
  width: 100%;
  min-height: 400px;
  padding: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.7;
  resize: vertical;
  transition: all 0.3s ease;
}

.email-editor-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Output text styling */
.edit-btn {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
  transition: all 0.3s ease;
}

.edit-btn:hover {
  background: rgba(245, 158, 11, 0.2);
  transform: translateY(-2px);
}
