/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Cursor-inspired warm color palette */
  --bg-primary: #f7f7f4;
  --bg-secondary: #ffffff;
  --bg-dark: #14120b;
  --bg-dark-secondary: #1a1815;

  --text-primary: #14120b;
  --text-secondary: #6b6b6b;
  --text-tertiary: #9a9a9a;
  --text-dark-primary: #e8e8e8;
  --text-dark-secondary: #b0b0b0;

  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-success: #10b981;

  --border-light: rgba(0, 0, 0, 0.08);
  --border-dark: rgba(255, 255, 255, 0.1);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.12);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 48px;
  --spacing-xl: 80px;
  --spacing-2xl: 120px;
}

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

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

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--bg-dark);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(99, 102, 241, 0.03) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(139, 92, 246, 0.03) 0%, transparent 50%);
  opacity: 1;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--text-dark-primary);
  padding: var(--spacing-xl) 0;
}

.hero-title {
  font-size: 5.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  letter-spacing: -3px;
  animation: fadeInUp 0.8s ease-out;
  background: linear-gradient(135deg, #ffffff 0%, #d0d0d0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 2rem;
  margin-bottom: var(--spacing-md);
  color: var(--text-dark-secondary);
  font-weight: 400;
  letter-spacing: -0.5px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-description {
  font-size: 1.25rem;
  max-width: 700px;
  margin: 0 auto var(--spacing-lg);
  color: var(--text-dark-secondary);
  line-height: 1.8;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.download-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 16px 36px;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp 0.8s ease-out 0.6s both;
  border: 1px solid var(--border-light);
}

.download-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  background: #fafafa;
}

.download-button:active {
  transform: translateY(0);
}

.download-icon {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.system-requirements {
  margin-top: var(--spacing-md);
  font-size: 0.95rem;
  color: var(--text-dark-secondary);
  animation: fadeInUp 0.8s ease-out 0.8s both;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-dark-secondary);
  cursor: pointer;
  animation: fadeInCenter 0.8s ease-out 1s both, bounce 2s ease-in-out 2s infinite;
  transition: color 0.3s ease;
  z-index: 2;
}

.scroll-indicator:hover {
  color: var(--text-dark-primary);
}

@keyframes fadeInCenter {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(10px);
  }
}

/* Features Section */
.features {
  padding: 100px 0;
  background: var(--bg-light);
}

.section-title {
  text-align: center;
  font-size: 3rem;
  margin-bottom: 60px;
  color: var(--text-dark);
  font-weight: 700;
}

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

.feature-card {
  background: var(--white);
  padding: 40px 30px;
  border-radius: 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

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

.feature-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--text-dark);
  font-weight: 600;
}

.feature-card p {
  color: var(--text-light);
  line-height: 1.7;
}

/* Feature Visualization Sections - Shared Styles */
.feature-viz-section {
  padding: var(--spacing-lg) 0;
  background: var(--bg-dark);
  overflow: hidden;
  position: relative;
  opacity: 0;
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.feature-viz-section.animate-in {
  opacity: 1;
}

/* Section 1 - Demo section just fades in */
.demo-section {
  transform: none;
}

.demo-section.animate-in {
  transform: none;
}

/* Section 2 - Animates from left */
.feature-viz-2 {
  transform: translateX(-50px);
  padding-top: 24px !important;
}

.feature-viz-2.animate-in {
  transform: translateX(0);
}

/* Section 3 - Animates from left */
.feature-viz-3 {
  transform: translateX(-50px);
}

.feature-viz-3.animate-in {
  transform: translateX(0);
}

/* Section 4 - Keep simple fade */
.feature-viz-4 {
  transform: translateY(20px);
}

.feature-viz-4.animate-in {
  transform: translateY(0);
}

/* Section 5 - Animates from right */
.feature-viz-5 {
  transform: translateX(50px);
}

.feature-viz-5.animate-in {
  transform: translateX(0);
}

.feature-viz-section h2 {
  text-align: center;
  font-size: 3rem;
  margin-bottom: var(--spacing-sm);
  color: var(--text-dark-primary);
  font-weight: 700;
  letter-spacing: -1.5px;
}

.feature-subtitle {
  text-align: center;
  color: var(--text-dark-secondary);
  font-size: 1.2rem;
  margin-bottom: var(--spacing-xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: var(--spacing-md);
}

/* Demo Section (Now Section 1) */
.demo-section {
  padding: var(--spacing-lg) 0;
  background: var(--bg-dark);
  overflow: hidden;
  position: relative;
}

.demo-subtitle {
  text-align: center;
  color: var(--text-dark-secondary);
  font-size: 1.2rem;
  margin-top: calc(var(--spacing-lg) * -1);
  margin-bottom: var(--spacing-md);
}

.demo-subtitle .highlight-text {
  color: var(--accent-primary);
  font-weight: 700;
  background: rgba(99, 102, 241, 0.15);
  padding: 2px 4px;
  border-radius: 4px;
  display: inline-block;
}

.mockup-badge {
  text-align: center;
  color: var(--accent-primary);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: var(--spacing-lg);
  letter-spacing: 0.3px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  display: inline-block;
  margin-left: 50%;
  transform: translateX(-50%);
}

.demo-section .section-title {
  color: var(--text-dark-primary);
  text-align: center;
  font-size: 3rem;
  margin-bottom: var(--spacing-lg);
  font-weight: 700;
  letter-spacing: -1.5px;
}

.app-mockup {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

/* Animated Cursor */
.animated-cursor {
  position: absolute;
  width: 24px;
  height: 24px;
  pointer-events: none;
  z-index: 1000;
  opacity: 0;
  transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              top 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.animated-cursor.visible {
  opacity: 1;
}

.window-frame {
  background: #1a1815;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.window-titlebar {
  background: #14120b;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.window-controls {
  display: flex;
  gap: 8px;
}

.window-button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.window-button.close {
  background: #ed6a5e;
}

.window-button.minimize {
  background: #f4bf4f;
}

.window-button.maximize {
  background: #61c554;
}

.window-title {
  color: var(--text-dark-secondary);
  font-size: 0.85rem;
  flex: 1;
  text-align: center;
  margin-right: 60px;
  font-weight: 500;
}

.app-content {
  display: flex;
  height: 600px;
  position: relative;
}

.sidebar {
  width: 220px;
  background: #14120b;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 20px 0;
}

.sidebar-header {
  padding: 0 16px;
  margin-bottom: 16px;
  color: var(--text-dark-primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.sidebar-icon {
  font-size: 1.1rem;
}

.sidebar-items {
  display: flex;
  flex-direction: column;
}

.sidebar-item {
  padding: 8px 16px;
  color: var(--text-dark-secondary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dark-primary);
}

.sidebar-item.active {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dark-primary);
  border-left: 2px solid var(--accent-primary);
}

.folder-icon {
  font-size: 1rem;
}

.main-content {
  flex: 1;
  background: #1a1815;
  overflow: hidden;
}

.papers-list {
  padding: 20px;
}

.list-header {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 12px;
}

.column-title {
  color: var(--text-dark-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.paper-item {
  padding: 12px;
  color: var(--text-dark-primary);
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  border: 1px solid transparent;
}

.paper-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.paper-item.highlighted {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.paper-icon {
  font-size: 1rem;
  opacity: 0.7;
}

.paper-title {
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Synthesize Window */
.synthesize-window {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 90%;
  max-width: 900px;
  height: 520px;
  background: #14120b;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  display: flex;
  flex-direction: column;
  opacity: 0;
}

.synthesize-window.visible {
  animation: popIn 0.5s ease-out forwards;
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  70% {
    transform: translate(-50%, -50%) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -45%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.synthesize-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.synthesize-header h3 {
  color: var(--text-dark-primary);
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-dark-secondary);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dark-primary);
}

.synthesize-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.welcome-message {
  text-align: center;
  color: var(--text-dark-secondary);
}

.welcome-message h4 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--text-dark-primary);
  font-weight: 600;
}

.welcome-message p {
  margin-bottom: 12px;
  color: var(--text-dark-secondary);
  font-size: 0.95rem;
}

.welcome-message strong {
  color: var(--text-dark-primary);
  font-weight: 600;
}

.highlight-text {
  color: var(--accent-primary);
  font-weight: 700;
  background: rgba(99, 102, 241, 0.15);
  padding: 2px 4px;
  border-radius: 4px;
}

.context-info {
  color: var(--text-dark-secondary);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef8354;
  display: inline-block;
}

.status-dot.active {
  background: #4a9eff;
}

.status-dot.status-orange {
  background: #ef8354;
}

.token-count {
  color: #4a9eff;
  font-weight: 500;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overscroll-behavior: contain;
}

.message {
  animation: messageIn 0.3s ease-out;
}

@keyframes messageIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  1% {
    opacity: 0;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-message {
  background: rgba(255, 255, 255, 0.06);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-dark-primary);
  max-width: 80%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  align-self: flex-end;
  width: fit-content;
}

.assistant-message {
  background: rgba(0, 0, 0, 0.2);
  padding: 16px;
  border-radius: var(--radius-md);
  color: var(--text-dark-secondary);
  border: 1px solid rgba(255, 255, 255, 0.04);
  line-height: 1.7;
  max-width: 95%;
  width: fit-content;
  align-self: flex-start;
}

.assistant-message strong {
  color: var(--text-dark-primary);
  font-weight: 600;
}

.assistant-message table {
  font-size: 0.85rem;
  color: var(--text-dark-secondary);
}

.assistant-message table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.assistant-message code {
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
  font-size: 0.85em;
  color: #8b9dc3;
  background: rgba(139, 157, 195, 0.1);
  padding: 2px 6px;
  border-radius: 3px;
}

.typing-indicator {
  display: inline-flex;
  gap: 4px;
  padding: 16px;
}

.typing-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

.paper-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #4a9eff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: white;
  border: none;
  margin: 4px;
  font-weight: 500;
}

.suggestion-pill {
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-dark-secondary);
  margin: 8px 0;
  cursor: pointer;
  transition: all 0.2s;
}

.suggestion-pill:hover {
  background: rgba(255, 255, 255, 0.12);
}

.context-button {
  position: absolute;
  top: 16px;
  right: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-dark-secondary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.papers-selected {
  display: flex;
  flex-wrap: wrap;
  margin-top: 8px;
}

.autocomplete-menu {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  margin-top: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.autocomplete-item {
  padding: 12px 16px;
  color: var(--text-dark-secondary);
  cursor: pointer;
  transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
  background: rgba(255, 255, 255, 0.08);
}

.autocomplete-item strong {
  color: var(--accent-primary);
  font-weight: 600;
}

.autocomplete-item small {
  display: block;
  color: var(--text-dark-secondary);
  font-size: 0.8rem;
  margin-top: 2px;
  opacity: 0.8;
}

.command-hint {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--accent-primary);
  font-weight: 500;
}

.diff-view {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-top: 12px;
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
  font-size: 0.85rem;
}

.diff-header {
  color: var(--text-dark-secondary);
  margin-bottom: 12px;
  font-weight: 600;
}

.diff-line {
  padding: 4px 8px;
  margin: 0;
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-dark-primary);
}

.diff-line.removed {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.diff-line.added {
  background: rgba(34, 197, 94, 0.2);
  color: #e2e8f0;
}

.diff-line-number {
  display: inline-block;
  width: 40px;
  color: rgba(255, 255, 255, 0.4);
  text-align: right;
  margin-right: 16px;
  user-select: none;
}

.synthesize-input {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  gap: 12px;
  align-items: center;
}

.synthesize-input input {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-dark-primary);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.synthesize-input input:focus {
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.06);
}

.synthesize-input input::placeholder {
  color: var(--text-dark-secondary);
}

.send-btn {
  background: var(--accent-primary);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.send-btn:hover {
  background: #4f46e5;
  transform: translateY(-1px);
}

/* Approval Screen */
.approval-screen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #14120b;
  display: none;
  flex-direction: column;
  z-index: 10;
}

.approval-screen.active {
  display: flex;
}

.approval-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.approval-header h3 {
  color: var(--text-dark-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.approval-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

.change-title {
  color: var(--text-dark-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.batch-update-notification {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-dark-primary);
  font-size: 0.9rem;
  margin-bottom: var(--spacing-md);
}

.edit-title {
  color: var(--text-dark-primary);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.approval-actions {
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  gap: 12px;
  justify-content: flex-start;
}

.approval-btn {
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.approval-btn.accept {
  background: var(--accent-primary);
  color: white;
}

.approval-btn.accept:hover {
  background: #4f46e5;
  transform: translateY(-1px);
}

.approval-btn.reject {
  background: #ef4444;
  color: white;
}

.approval-btn.reject:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

.follow-up-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  color: var(--text-dark-primary);
  font-size: 0.9rem;
  outline: none;
}

.follow-up-input::placeholder {
  color: var(--text-dark-secondary);
}

/* Annotation Labels */
.annotation {
  position: absolute;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  box-shadow: var(--shadow-lg);
  white-space: nowrap;
}

.annotation.visible {
  animation: fadeInLabel 0.4s ease-out forwards;
}

.annotation::after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
}

.annotation.top::after {
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px 8px 0 8px;
  border-color: var(--accent-secondary) transparent transparent transparent;
}

.annotation.left::after {
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 8px 0 8px 8px;
  border-color: transparent transparent transparent var(--accent-secondary);
}

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

/* Section 1: Cross-Paper Questions - Enhanced */
.context-badge {
  display: inline-block;
  background: rgba(99, 102, 241, 0.12);
  border: 2px solid var(--accent-primary);
  color: var(--accent-primary);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--spacing-md);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.05);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.05);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(99, 102, 241, 0.08);
  }
}

/* Section 2: Literature Review Generation */
.feature-mockup {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
}

.split-view {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
  background: var(--bg-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-xl);
}

.notes-panel, .review-panel {
  padding: var(--spacing-lg);
  background: #1a1815;
}

.notes-panel {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.panel-header {
  color: var(--text-dark-primary);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.note-item {
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  border-left: 3px solid var(--accent-primary);
  color: var(--text-dark-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.review-content {
  color: var(--text-dark-primary);
  font-size: 0.95rem;
  line-height: 1.8;
}

.review-content h4 {
  color: var(--text-dark-primary);
  font-size: 1.1rem;
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
}

.review-content p {
  color: var(--text-dark-secondary);
  margin-bottom: var(--spacing-sm);
}

.citation {
  color: var(--accent-primary);
  font-weight: 500;
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent-primary);
  margin-left: 2px;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Section 3: PDF Chat */
.triple-view {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: var(--spacing-md);
  background: var(--bg-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-xl);
  min-height: 600px;
}

.pdf-viewer, .chat-panel, .notes-sidebar {
  padding: var(--spacing-lg);
  background: #1a1815;
}

.pdf-viewer {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
}

.chat-panel {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
}

.pdf-page {
  background: rgba(255, 255, 255, 0.08);
  padding: var(--spacing-lg);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-dark-primary);
  font-size: 0.85rem;
  line-height: 1.6;
}

.pdf-highlight {
  background: rgba(255, 235, 59, 0.2);
  padding: 2px 4px;
  border-radius: 2px;
  color: #ffd700;
}

.chat-history {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  overflow-y: auto;
}

.notes-sidebar {
  display: flex;
  flex-direction: column;
}

.note-update {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-sm);
  padding: var(--spacing-sm);
  color: var(--accent-success);
  font-size: 0.85rem;
  animation: slideInRight 0.4s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Section 4: BYOK */
.feature-viz-4 .feature-mockup {
  display: flex;
  gap: var(--spacing-xl);
  max-width: 1000px;
  margin: 0 auto;
  align-items: flex-start;
}

.api-config-modal {
  flex: 0 0 500px;
  background: rgba(40, 40, 40, 0.95);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.modal-header {
  padding: 24px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-header h3 {
  font-size: 1.3rem;
  color: var(--text-dark-primary);
  font-weight: 600;
  margin: 0;
}

.modal-content {
  padding: 28px;
}

.form-group {
  margin-bottom: 24px;
  position: relative;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  color: var(--text-dark-primary);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.custom-select {
  position: relative;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s;
  user-select: none;
}

.custom-select:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.select-display {
  color: var(--text-dark-primary);
  font-size: 0.95rem;
}

.select-arrow {
  color: var(--text-dark-secondary);
  opacity: 0.7;
  transition: transform 0.2s;
}

.custom-select.open .select-arrow {
  transform: rotate(180deg);
}

.select-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: rgba(30, 30, 30, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.2s;
}

.custom-select.open .select-dropdown {
  max-height: 300px;
  opacity: 1;
  overflow-y: auto;
}

.select-option {
  padding: 12px 16px;
  color: var(--text-dark-primary);
  cursor: pointer;
  transition: background 0.15s;
  font-size: 0.95rem;
}

.select-option:hover {
  background: rgba(255, 255, 255, 0.1);
}

.select-option.selected {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon input {
  flex: 1;
  width: 100%;
  padding: 12px 48px 12px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: var(--text-dark-primary);
  font-size: 0.95rem;
  transition: all 0.2s;
}

.input-with-icon input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.08);
}

.toggle-visibility {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-dark-secondary);
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.toggle-visibility:hover {
  color: var(--text-dark-primary);
}

.helper-text {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-dark-secondary);
}

.modal-actions {
  padding: 20px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 12px;
}

.btn-primary {
  flex: 1;
  padding: 12px 24px;
  background: #4a7aff;
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: #3a6aef;
  transform: translateY(-1px);
}

.btn-secondary {
  flex: 1;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dark-primary);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.byok-info {
  flex: 1;
  display: flex;
  align-items: center;
}

.info-card {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
}

.info-card h4 {
  font-size: 1.3rem;
  color: var(--text-dark-primary);
  margin-bottom: var(--spacing-sm);
  font-weight: 700;
}

.info-card p {
  color: var(--text-dark-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: var(--spacing-sm);
}

.cost-estimate {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: var(--spacing-md) 0;
  padding: var(--spacing-sm) 0;
}

.cost-label {
  color: var(--text-dark-secondary);
  font-size: 0.9rem;
}

.cost-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.comparison-text {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Download CTA Section */
.download-cta-section {
  padding: var(--spacing-lg) 0;
  background: var(--bg-dark);
  text-align: center;
}

.download-cta-section .container {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Footer */
.footer {
  background: var(--bg-dark);
  color: var(--text-dark-secondary);
  text-align: center;
  padding: var(--spacing-xl) 0;
}

.footer p {
  opacity: 0.8;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 3rem;
    letter-spacing: -2px;
  }

  .hero-subtitle {
    font-size: 1.4rem;
  }

  .hero-description {
    font-size: 1.05rem;
  }

  .feature-viz-section h2 {
    font-size: 2.2rem;
  }

  .feature-subtitle {
    font-size: 1.05rem;
  }

  .section-title {
    font-size: 2rem;
  }

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

  .features {
    padding: 60px 0;
  }

  .demo-section, .feature-viz-section {
    padding: 60px 0;
    overscroll-behavior: none;
  }

  .sidebar {
    display: none;
  }

  .app-content {
    height: 500px;
    overscroll-behavior: contain;
  }

  .synthesize-window {
    width: 95%;
    height: 450px;
  }

  .assistant-message {
    font-size: 0.85rem;
  }

  .paper-title {
    font-size: 0.85rem;
  }

  /* Prevent page scrolling issues on mobile */
  .app-mockup {
    overscroll-behavior: none;
    isolation: isolate;
  }

  /* Section 2: Stack vertically */
  .split-view {
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
  }

  .notes-panel {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  /* Section 3: Stack vertically */
  .triple-view {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .pdf-viewer, .chat-panel {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  /* Section 4: Stack vertically on mobile */
  .feature-viz-4 .feature-mockup {
    flex-direction: column;
    gap: var(--spacing-lg);
  }

  .api-config-modal {
    flex: 1 1 auto;
    width: 100%;
  }

  .modal-content {
    padding: 20px;
  }

  .modal-actions {
    padding: 16px 20px;
  }

  .byok-info {
    width: 100%;
  }

  .context-badge {
    font-size: 0.85rem;
    padding: 8px 16px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .download-button {
    padding: 15px 30px;
    font-size: 1rem;
  }

  .app-content {
    height: 400px;
  }

  .synthesize-window {
    height: 350px;
  }

  .demo-subtitle {
    font-size: 0.95rem;
  }
}
