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

:root {
  --primary: #5046e5;
  --primary-dark: #4338ca;
  --secondary: #06b6d4;
  --accent: #f97316;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-light: #94a3b8;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

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

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: opacity 0.3s ease;
}

.logo:hover {
  opacity: 0.8;
}

.logo-mark {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: white;
  letter-spacing: -2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  background: var(--primary);
  color: white !important;
  padding: 8px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.nav-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.nav-cta::after {
  display: none;
}

/* Main Content */
.hero {
  padding: 140px 24px 80px;
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--text-primary) 60%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.btn {
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
  margin-bottom: 40px;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Feature Cards */
.features-section {
  padding: 80px 24px;
  background: var(--bg-secondary);
}

.section-container {
  max-width: 1280px;
  margin: 0 auto;
}

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

.section-title {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.7;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.feature-card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.feature-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
  color: var(--text-primary);
}

.feature-description {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Floating Gradient Orbs */
.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  pointer-events: none;
  animation: float 20s ease-in-out infinite;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  top: -200px;
  right: -100px;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, var(--accent) 0%, #ec4899 100%);
  bottom: -150px;
  left: -100px;
  animation-delay: -10s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* Flexible Table Layout Styles */
.resizable-table {
  table-layout: auto; /* Changed to auto for flexibility */
  width: 100%;
}

/* Ensure table fills container */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

/* Column Resizing */
.column-resizer {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 8px; /* Increased from 5px */
  cursor: col-resize;
  user-select: none;
  background: transparent;
  transition: all 0.2s ease;
  z-index: 10; /* Add z-index to ensure it's on top */
}

.column-resizer::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
  opacity: 0.5;
}

.column-resizer:hover {
  background: var(--primary);
  opacity: 0.3;
}

.column-resizer:hover::after {
  width: 3px;
  background: var(--primary);
  opacity: 1;
}

.column-resizer.resizing {
  background: var(--primary);
  opacity: 0.5;
}

/* Table Header Styles */
.data-table th {
  position: relative;
  user-select: none;
}

.data-table th.resizable {
  position: relative; /* This is crucial for the resizer to position correctly */
  min-width: 100px;
  max-width: 400px;
}

.data-table th.resizing {
  background: var(--bg-tertiary);
}

/* Specific column constraints */
.data-table th[data-column="company"] {
  min-width: 120px;
}

.data-table th[data-column="name"] {
  min-width: 120px;
}

.data-table th[data-column="title"] {
  min-width: 150px;
}

.data-table th[data-column="email"] {
  min-width: 150px;
}

.data-table th[data-column="linkedin"] {
  min-width: 200px;
}

/* Make LinkedIn column take remaining space */
.data-table td:last-child,
.data-table th:last-child {
  width: auto;
}

/* Draggable Column Styles */
.data-table th.draggable {
  cursor: move;
}

.data-table th.draggable.dragging {
  opacity: 0.5;
  background: var(--bg-tertiary);
}

.data-table th.drag-over {
  background: var(--bg-secondary);
  border-left: 3px solid var(--primary);
}

/* Column Header Improvements */
.column-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 20px;
}

/* Sort Icon Animation */
.sort-icon {
  transition: all 0.3s ease;
}

.sort-icon.desc {
  transform: rotate(180deg);
}

/* Table Cell Styles */
.data-table td {
  word-wrap: break-word;
  overflow-wrap: break-word;
  vertical-align: middle;
}

.data-table td.cell-selected {
  background: rgba(80, 70, 229, 0.1);
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

/* Title cell flexibility */
.title-cell {
  max-width: 300px;
  white-space: normal;
  line-height: 1.4;
}

/* Email Cell Improvements */
.email-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 250px;
  word-break: break-all;
}

/* LinkedIn URL Styling */
.linkedin-url-link {
  color: var(--secondary);
  text-decoration: none;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 250px;
  display: inline-block;
  transition: color 0.2s ease;
}

.linkedin-url-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Empty Cell Styling */
.empty-cell {
  color: var(--text-light);
  font-style: italic;
  opacity: 0.7;
}

/* Footer */
footer {
  padding: 80px 24px 32px;
  background: var(--text-primary);
  color: white;
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: white;
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* Toast Notifications */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Table Animation Styles */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading Pulse Animation */
@keyframes pulse {
  0%, 100% { 
    opacity: 0.6; 
  }
  50% { 
    opacity: 1; 
  }
}

/* Responsive */
@media (max-width: 1200px) {
  .data-table {
    font-size: 14px;
  }
  
  .column-resizer {
    width: 8px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .hero {
    padding: 100px 20px 60px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-subtitle {
    font-size: 18px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .footer-links {
    flex-direction: column;
    gap: 16px;
  }

  .section-title {
    font-size: 32px;
  }

  /* Table responsive adjustments */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .data-table {
    min-width: 800px;
  }
  
  .column-resizer {
    display: none;
  }
  
  .data-table th.draggable {
    cursor: default;
  }
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Selection */
::selection {
  background: var(--primary);
  color: white;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Form Focus States */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(80, 70, 229, 0.1);
}

/* Button Active States */
button:active {
  transform: scale(0.98);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--text-light);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* Print Styles */
@media print {
  nav, footer, .no-print {
    display: none;
  }
  
  body {
    background: white;
  }
  
  .container {
    width: 100%;
    max-width: none;
  }
}

.btn-add-row {
  padding: 8px 16px;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0;
}

.btn-add-row:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.btn-add-row svg {
  width: 16px;
  height: 16px;
}
.delete-selected-btn {
  background: white;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: none;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.delete-selected-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--primary);
}

.delete-selected-btn.show {
  display: flex;
}

/* Editable cells */
.editable {
  cursor: text;
  position: relative;
}

.editable:hover {
  background: var(--bg-tertiary);
}

.editable:focus {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
  background: white;
}

.btn-add-row-minimal {
  padding: 4px 8px;
  background: transparent;
  color: var(--text-secondary);
  border: none !important; /* Force no border */
  border-radius: 4px;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  outline: none;
  box-shadow: none; /* Remove any shadow */
}

.btn-add-row-minimal:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.btn-add-row-minimal:focus {
  outline: none; /* Remove focus outline */
}

.btn-add-row-minimal svg {
  width: 14px;
  height: 14px;
}


/* Updated Sort Dropdown Styles */
.table-button-wrapper {
    position: relative;
    display: inline-block;
}

.sort-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    min-width: 220px;
    display: none;
    z-index: 100;
    padding: 8px;
}

/* Remove the hover behavior that was causing conflicts */
.table-button-wrapper:hover .sort-dropdown {
    /* Removed - we'll control via JavaScript only */
}

/* Add the show class */
.sort-dropdown.show {
    display: block;
}

.sort-dropdown-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
}

.sort-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary);
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.sort-select:hover {
    border-color: var(--primary);
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(80, 70, 229, 0.1);
}

.sort-dropdown-footer {
    padding: 8px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

.add-sort-btn {
    width: 100%;
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.add-sort-btn:hover {
    background: var(--primary-dark);
}

/* Active sort indicator */
#sortButton.active {
    background: var(--bg-secondary);
    color: var(--primary);
}

#sortButtonText.active {
    font-weight: 600;
}

