/* Email Name Extractor - Modern CSS */

:root {
  --primary-color: #2563eb;
  --brand-color: #9C27B0;
  --secondary-color: #64748b;
  --success-color: #059669;
  --warning-color: #d97706;
  --danger-color: #dc2626;
  --dark-color: #1e293b;
  --light-color: #f8fafc;
  --border-radius: 12px;
  --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

/* Global Styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  padding-top: 56px; /* Account for fixed navbar */
}

/* Navbar Styles */
.navbar {
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  z-index: 1000;
}

.navbar-brand {
  font-size: 1.1rem;
  text-decoration: none;
}

.navbar-brand i {
  margin-right: 4px;
}

.text-brand {
  color: var(--brand-color) !important;
}

.navbar-nav .nav-link {
  font-weight: 500;
  margin-left: 1rem;
  transition: var(--transition);
}

.navbar-nav .nav-link:hover {
  color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #000000 0%, #9063bf 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.hero-section .container {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.feature-item i {
  font-size: 1.2rem;
}

.hero-cta .btn {
  font-weight: 600;
  padding: 12px 30px;
  border-radius: var(--border-radius);
}

/* Hero Demo */
.hero-demo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.demo-card {
  background: rgba(255, 255, 255, 0.90);
  color: var(--dark-color);
  padding: 3rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  width: 500px;
  max-width: 100%;
}

/* Stretch demo card to match left column height on tablets/desktop */
@media (min-width: 769px) {
  .hero-section .col-lg-6 {
    display: flex;
    flex-direction: column;
  }
  
  .hero-demo {
    flex: 1;
    display: flex;
    align-items: stretch;
  }
  
  .demo-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 500px;
  }
}

.demo-example {
  text-align: center;
}

.input-demo {
  background: #f1f5f9;
  padding: 12px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.arrow-down {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin: 1rem 0;
}

.output-demo {
  background: #f0fdf4;
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid var(--success-color);
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.confidence-badge {
  background: var(--success-color);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.quality-badge {
  background: var(--primary-color);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Extractor Widget */
.extractor-section {
  background: #fafafa;
}

.extractor-widget {
  background: white;
  padding: 3rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.quick-tests a {
  text-decoration: none;
  transition: var(--transition);
}

.quick-tests a:hover {
  background: var(--primary-color) !important;
  color: white !important;
}

.csv-upload-section {
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  margin-top: 1rem;
}

/* Results Table */
.results-section {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.table-hover tbody tr:hover {
  background-color: #f8fafc;
}

/* Features Section */
.features-section .feature-card {
  text-align: center;
  padding: 2rem;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  height: 100%;
  transition: var(--transition);
}

.features-section .feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color), #3b82f6);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
}

/* Use Cases Section */
.use-cases-section {
  background: #f1f5f9;
}

.use-case-card {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  height: 100%;
}

.use-case-icon {
  width: 60px;
  height: 60px;
  background: var(--primary-color);
  color: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.use-case-card ul {
  list-style: none;
  padding: 0;
}

.use-case-card li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.use-case-card li:before {
  content: "✓";
  color: var(--success-color);
  font-weight: bold;
  margin-right: 0.5rem;
}

/* API Section */
.api-section {
  background: var(--dark-color);
}

.api-features {
  margin: 2rem 0;
}

.api-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.api-example {
  background: #0f172a;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  border: 1px solid #334155;
}

.api-example pre {
  background: transparent;
  border: none;
  color: #e2e8f0;
  margin: 0;
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-features {
    grid-template-columns: 1fr;
  }
  
  .extractor-widget {
    padding: 2rem 1.5rem;
  }
  
  .feature-card, .use-case-card {
    margin-bottom: 2rem;
  }
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Status Badges */
.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-badge.ai-used {
  background: #fef3c7;
  color: #92400e;
}

.status-badge.local {
  background: #d1fae5;
  color: #065f46;
}

.status-badge.disposable {
  background: #fee2e2;
  color: #991b1b;
}

.status-badge.standard {
  background: #e0f2fe;
  color: #0c4a6e;
}

/* Enhanced Footer Styles */
footer {
  background: linear-gradient(135deg, #000000 0%, #1a0d1f 100%) !important;
  overflow: hidden;
}

.footer-brand {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.footer-brand i {
  margin-right: 0;
}

footer h6 {
  color: #e2e8f0;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

footer ul li {
  margin-bottom: 0.5rem;
}

footer ul li a:hover {
  color: var(--primary-color) !important;
}

footer hr {
  opacity: 0.3;
  margin: 1rem 0;
  border-color: #444;
}

/* Footer bottom section with proper contrast */
footer .row:last-child {
  margin: 0;
  padding: 1rem 0;
}

footer .text-dark {
  color: #f8f9fa !important;
}

footer .text-dark a {
  color: #f8f9fa !important;
}

footer .text-dark a:hover {
  color: var(--brand-color) !important;
}

/* Professional table styling */
.table th {
  font-weight: 600;
  font-size: 0.9rem;
}

.table td code {
  background: #f8f9fa;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #495057;
}

/* Sticky Footer - Simplified */
body {
  min-height: 100vh;
}

.main-content {
  min-height: calc(100vh - 200px);
}

/* Code block formatting */
.code-block {
  background: #1e1e1e;
  color: #e6e6e6;
  padding: 0 1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  white-space: pre;
  line-height: 1.4;
  font-size: 0.9rem;
}

/* API Documentation Styles */
.feature-highlight {
  text-align: center;
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  height: 100%;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: white;
  font-size: 1rem;
}

/* API Hero with brand gradient */
.api-hero {
  background: linear-gradient(135deg, #000000 0%, #2d1b3d 50%, #000000 100%);
}

/* Copy button styles */
.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 10px;
  font-size: 0.8rem;
  border: none;
  background: var(--brand-color);
  color: white;
  border-radius: 4px;
  cursor: pointer;
}

.code-container {
  position: relative;
}

/* Quick Email Input on Homepage */
.quick-extract-input .input-group-text {
    border-right: none;
    padding: 0.75rem 1rem;
}

.quick-extract-input .form-control {
    border-left: none;
    padding: 0.75rem 1rem;
}

.quick-extract-input .form-control:focus {
    border-color: #dee2e6;
    box-shadow: none;
    border-left: none;
}

.quick-extract-input .input-group-text,
.quick-extract-input .form-control,
.quick-extract-input .btn {
    border-radius: 0;
}

.quick-extract-input .input-group-text {
    border-top-left-radius: 0.5rem;
    border-bottom-left-radius: 0.5rem;
}

.quick-extract-input .btn {
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    white-space: nowrap;
}

/* Platform Logo Links */
.platform-logo-link {
    text-decoration: none;
    display: block;
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.platform-logo-link:hover {
    background-color: #f8f9fa;
    transform: translateY(-4px);
}

.platform-logo-link i {
    transition: all 0.3s ease;
}

.platform-logo-link:hover i {
    transform: scale(1.1);
}

.text-pink {
    color: #e91e63 !important;
}

/* Mobile CTA Button Spacing */
@media (max-width: 768px) {
    /* Hero section CTA button - remove extra margin since demo column has its own */
    .hero-cta .btn-primary.btn-lg.d-md-none {
        margin-bottom: 0 !important;
    }
    
    /* All other mobile CTA buttons */
    .btn-primary.btn-lg.d-md-none {
        margin-bottom: 2rem !important;
    }
    
    .cta-input-wrapper .btn-primary {
        margin-bottom: 2rem !important;
    }
    
    /* Live Demo Card Mobile Fixes */
    /* Target the second column (demo card) when it stacks on mobile */
    .hero-section .row .col-lg-6:nth-child(2) {
        margin-top: 2rem !important;  /* Balanced space above when stacked */
        margin-bottom: 2rem !important;  /* Space below to match page flow */
    }
    
    .hero-section .hero-demo {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
    
    /* Reduce demo card padding on mobile */
    .hero-section .demo-card {
        padding: 1rem !important;  /* Down from 3rem on desktop */
    }
    
    .hero-section .demo-card h5 {
        font-size: 1rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .hero-section .demo-example {
        padding: 0.75rem !important;
    }
    
    .hero-section .input-demo {
        font-size: 0.875rem !important;
        padding: 0.5rem !important;
    }
    
    .hero-section .output-demo {
        padding: 0.75rem !important;
    }
    
    .hero-section .result-item {
        font-size: 0.875rem !important;
        margin-bottom: 0.5rem !important;
        display: block !important;  /* Stack on mobile */
    }
    
    /* Hide badges on mobile - they don't fit */
    .hero-section .confidence-badge,
    .hero-section .quality-badge {
        display: none !important;
    }
    
    .hero-section .arrow-down {
        margin: 0.5rem 0 !important;
        font-size: 1rem !important;
    }
}

/* CTA Extract Section (Reusable Block) */
.cta-extract-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 1px solid #dee2e6;
}

.cta-extract-section h2 {
    font-weight: 700;
    color: var(--dark-color);
}

.cta-input-group {
    max-width: 600px;
    margin: 0 auto;
}

.cta-input-group .input-group-text {
    border-right: none;
    padding: 0.75rem 1rem;
    background: white;
}

.cta-input-group .form-control {
    border-left: none;
    padding: 0.75rem 1rem;
}

.cta-input-group .form-control:focus {
    border-color: #dee2e6;
    box-shadow: none;
    border-left: none;
}

.cta-input-group .input-group-text,
.cta-input-group .form-control,
.cta-input-group .btn {
    border-radius: 0;
}

.cta-input-group .input-group-text {
    border-top-left-radius: 0.5rem;
    border-bottom-left-radius: 0.5rem;
}

.cta-input-group .btn {
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    white-space: nowrap;
    padding: 0.75rem 2rem;
}
