:root {
  /* Modern SaaS Color Palette */
  --primary-color: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: #a5b4fc;
  --secondary-color: #6b7280;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --info-color: #3b82f6;
  
  /* Background & Surface Colors */
  --background: #fafbfc;
  --background-alt: #f1f5f9;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --surface-hover: #f8fafc;
  
  /* Border & Divider Colors */
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --border-dark: #cbd5e1;
  --divider: #e5e7eb;
  
  /* Text Colors */
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --text-inverse: #ffffff;
  --text-danger: #ef4444;
  
  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Border Radius */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --gradient-secondary: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Landing Page Styles */
.landing-page {
  min-height: 100vh;
  background: var(--background);
}

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

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: float 6s ease-in-out infinite;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  top: 60%;
  right: 10%;
  animation-delay: 2s;
}

.orb-3 {
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  bottom: 20%;
  left: 60%;
  animation-delay: 4s;
}

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

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.badge-icon {
  width: 16px;
  height: 16px;
  color: var(--primary-color);
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.02em;
}

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

.hero-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 auto;
  max-width: 600px;
}

.hero-input-section {
  margin: 0;
  width: 100%;
  max-width: 600px;
}

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

.input-icon {
  position: absolute;
  left: 20px;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  z-index: 2;
}

.hero-url-input {
  width: 100%;
  padding: 20px 20px 20px 56px;
  font-size: 1.125rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-2xl);
  background: var(--surface);
  color: var(--text-primary);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-lg);
}

.hero-url-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: var(--shadow-xl), 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.hero-analyze-button {
  position: relative;
  margin-top: 20px;
  width: 100%;
  padding: 20px 32px;
  font-size: 1.125rem;
  font-weight: 600;
  background: var(--gradient-primary);
  color: var(--text-inverse);
  border: none;
  border-radius: var(--radius-2xl);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-analyze-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

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

.button-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.hero-analyze-button:hover .button-shine {
  left: 100%;
}

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

.feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

.feature-icon {
  width: 16px;
  height: 16px;
  color: var(--primary-color);
}

/* Features Section */
.features {
  padding: 120px 0;
  background: var(--background-alt);
}

.features-header {
  text-align: center;
  margin-bottom: 80px;
}

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

.section-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

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

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: 32px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

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

.feature-card-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  background: var(--gradient-primary);
  border-radius: var(--radius-2xl);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-card-icon i,
.feature-card-icon svg {
  width: 32px;
  height: 32px;
  color: #ffffff !important;
  stroke: #ffffff !important;
  stroke-width: 2;
}

.feature-card-icon svg * {
  stroke: #ffffff !important;
  stroke-width: 2;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

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

/* Analysis Interface */
.analysis-interface {
  min-height: 100vh;
  background: var(--background);
}

.analysis-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  margin-bottom: 32px;
  gap: 24px;
  /* Debug: ensure proper layout */
  min-height: 60px;
}

.back-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.back-button:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.rerun-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.rerun-button:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  border-color: var(--primary-color);
}

.rerun-button {
  background: var(--primary-color);
  color: var(--text-inverse);
  border-color: var(--primary-color);
}

.rerun-button:hover {
  background: var(--primary-hover);
  color: var(--text-inverse);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.rerun-button:disabled {
  background: var(--border);
  color: var(--text-muted);
  border-color: var(--border);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.back-icon,
.rerun-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.rerun-button.loading .rerun-icon {
  animation: spin 1s linear infinite;
}

.analysis-title {
  /* flex: 1; removed to allow proper positioning */
}

.analysis-title h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.analyzing-url {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.analyzing-url span {
  font-weight: 500;
  color: var(--primary-color);
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.8rem;
  background: var(--background-alt);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* Logo Styles */
.app-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  margin-bottom: 8px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.logo-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.2) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: logoShine 3s infinite;
}

.logo-icon svg {
  width: 20px;
  height: 20px;
  color: white;
  z-index: 1;
  position: relative;
}

.logo-text {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: -0.025em;
}

@keyframes logoShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Animation Utilities */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

.header {
  text-align: center;
  margin-bottom: 24px;
  padding: 20px 0;
}

.header h1 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.header p {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Icon Styles */
.header-icon {
  width: 40px;
  height: 40px;
  margin-right: 16px;
  vertical-align: middle;
  display: inline-block;
}

.section-icon {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  color: var(--primary-color);
}

.button-icon {
  width: 18px;
  height: 18px;
  margin-right: 4px;
}

.placeholder-icon {
  width: 64px;
  height: 64px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.progress-icon {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  color: var(--primary-color);
}

.tip-icon {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  color: var(--warning-color);
}

.copy-icon {
  width: 16px;
  height: 16px;
  margin-right: 6px;
}

.main-content {
  margin-bottom: 24px;
}

.analysis-panel {
  background: var(--surface);
  border-radius: var(--radius-2xl);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
}

.panel-header {
  margin-bottom: 20px;
}

.panel-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.analysis-controls {
  margin-bottom: 20px;
}

.integrated-preview {
  padding-top: 20px;
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.preview-icon {
  width: 16px;
  height: 16px;
  color: var(--primary-color);
}

.url-input-group {
  margin-bottom: 16px;
  position: relative;
}

.url-history-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  margin-top: 8px;
}

.url-history-item {
  padding: 12px 16px 12px 56px; /* Right padding reduced for remove button */
  font-size: 0.9rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.url-history-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  cursor: pointer;
}

.url-history-item::before {
  content: '';
  position: absolute;
  left: 20px; /* Aligns with input icon position */
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-image: var(--favicon-url, url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/></svg>'));
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 2px;
}

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

.url-history-item:hover {
  background: var(--background);
}

.url-history-item .url-text {
  font-weight: 500;
  margin-bottom: 4px;
  text-align: left;
}

.url-history-item .url-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: left;
}

.url-history-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  opacity: 0.7;
}

.url-history-remove:hover {
  background: #fee2e2;
  color: var(--text-danger);
  border-color: var(--text-danger);
  opacity: 1;
  transform: scale(1.05);
}

.url-history-remove i {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

.url-history-item:hover .url-history-remove {
  opacity: 1;
}

.url-input {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s ease;
  background: var(--surface);
  color: var(--text-primary);
}

.url-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.url-input::placeholder {
  color: var(--text-muted);
}



.analyze-button {
  width: 100%;
  padding: 18px 32px;
  background: var(--gradient-primary);
  color: var(--text-inverse);
  border: none;
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.analyze-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.analyze-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.analyze-button:hover::before {
  left: 100%;
}

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

.analyze-button:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}



.iframe-container {
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--background);
  position: relative;
  min-height: 450px;
}

.iframe-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 450px;
  color: var(--text-muted);
  font-size: 1.125rem;
  text-align: center;
  padding: 40px;
}

.analysis-iframe {
  width: 100%;
  height: 450px;
  border: none;
  background: white;
  /* Increase font size in iframe content */
  font-size: 16px;
}

.results-section {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 0;
  border-bottom: none;
}

.results-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

@media (min-width: 768px) {
  .results-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .results-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.result-item {
  background: var(--surface);
  padding: 24px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  position: relative;
}

.result-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.result-label {
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-icon {
  width: 16px;
  height: 16px;
  color: var(--primary-color);
  flex-shrink: 0;
}

.result-value {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  color: var(--text-primary);
  position: relative;
}

.result-text {
  flex: 1;
  font-weight: 500;
  line-height: 1.4;
  word-break: break-word;
}

.color-preview {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.color-preview::after {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

.color-preview-empty {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  border: 2px dashed var(--border);
  background: var(--background-alt);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.color-preview-empty::before {
  content: '—';
  font-weight: bold;
}

.copy-color-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-secondary);
}

.copy-color-btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--text-inverse);
  transform: scale(1.05);
}

.copy-color-icon {
  width: 14px;
  height: 14px;
}

/* Toast notification for copy feedback */
.copy-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--surface);
  color: var(--text-primary);
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 1000;
  opacity: 0;
  transform: translateX(100px);
  transition: all 0.3s ease;
}

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

.console-instructions {
  background: var(--surface);
  border-radius: var(--radius-2xl);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.console-instructions h3 {
  color: var(--text-primary);
  margin-bottom: 20px;
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
}

.console-instructions ol {
  color: var(--text-secondary);
  margin-left: 16px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.console-instructions li {
  margin-bottom: 8px;
  font-weight: 500;
}

.code-block-container {
  position: relative;
  margin: 16px 0;
}

.copy-button {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}

.copy-button:hover {
  background: var(--surface-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.copy-button.copied {
  background: var(--success-color);
  color: var(--text-inverse);
  border-color: var(--success-color);
}

.code-block {
  background: #0f172a;
  color: #e2e8f0;
  padding: 24px;
  border-radius: var(--radius-lg);
  font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  overflow-x: auto;
  position: relative;
  border: 1px solid #334155;
  box-shadow: var(--shadow-lg);
}

.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  color: var(--text-secondary);
  font-size: 1.125rem;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.error-state {
  background: linear-gradient(135deg, #fef2f2 0%, #fff5f5 100%);
  border: 1px solid #fed7d7;
  border-radius: var(--radius-xl);
  padding: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  width: 100%;
  margin: 0;
}

.error-state::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.error-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  border-radius: 50%;
  margin-bottom: 28px;
  color: #dc2626;
  font-size: 32px;
}

.error-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #991b1b;
  margin-bottom: 16px;
  line-height: 1.3;
}

.error-message {
  font-size: 1.05rem;
  color: #7f1d1d;
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.error-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.error-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.error-action-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.error-action-btn.primary {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.error-action-btn.primary:hover {
  background: #5b21b6;
  border-color: #5b21b6;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
}

.status-loading {
  background: #dbeafe;
  color: #1e40af;
}

.status-success {
  background: #d1fae5;
  color: #065f46;
}

.status-error {
  background: #fee2e2;
  color: #991b1b;
}

.progress-log {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 24px;
}

.progress-log h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-steps {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  padding: 20px 0;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 120px;
  position: relative;
  flex-shrink: 0;
}

.progress-step .step-number {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--border);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.progress-step.completed .step-number {
  background: var(--success-color);
  color: white;
  border-color: var(--success-color);
}

.progress-step.current .step-number {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.progress-step.pending .step-number {
  background: var(--background);
  color: var(--text-muted);
  border-color: var(--border);
}

.progress-step .step-text {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
  max-width: 100px;
  line-height: 1.3;
}

.progress-step.completed .step-text {
  color: var(--success-color);
  font-weight: 500;
}

.progress-step.current .step-text {
  color: var(--primary-color);
  font-weight: 600;
}

.progress-step.pending .step-text {
  color: var(--text-muted);
}

.progress-step.error .step-number {
  background: var(--error-color);
  color: white;
  border-color: var(--error-color);
}

.progress-step.error .step-text {
  color: var(--error-color);
  font-weight: 500;
}

/* Progress line between steps */
.progress-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 20px;
  right: -60px;
  width: 60px;
  height: 2px;
  background: var(--border);
  z-index: 1;
}

.progress-step.completed:not(:last-child)::after {
  background: var(--success-color);
}

.progress-step.current:not(:last-child)::after {
  background: var(--primary-color);
}

.progress-step.error:not(:last-child)::after {
  background: var(--error-color);
}

/* Modern Progress Section */
.progress-section {
  margin-bottom: 24px;
}

.progress-container {
  background: var(--surface);
  border-radius: var(--radius-2xl);
  padding: 24px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(10px);
}

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

.progress-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.progress-title .progress-icon {
  width: 20px;
  height: 20px;
  color: var(--primary-color);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.progress-status {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 6px 12px;
  background: var(--background-alt);
  border-radius: var(--radius-md);
}

.progress-bar-container {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.progress-bar {
  flex: 1;
  height: 8px;
  background: var(--background-alt);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
  width: 0%;
  transition: width 0.3s ease;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress-percentage {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color);
  min-width: 40px;
  text-align: right;
}

.progress-steps-container {
  border-top: 1px solid var(--border-light);
  padding-top: 20px;
}

.progress-steps-modern {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.progress-step-modern {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--background-alt);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
}

.progress-step-modern.current {
  background: var(--surface);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.progress-step-modern.completed {
  background: var(--surface);
  border-color: var(--success-color);
}

.progress-step-modern.error {
  background: var(--surface);
  border-color: var(--error-color);
}

.step-indicator {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.progress-step-modern.pending .step-indicator {
  background: var(--border);
  color: var(--text-muted);
}

.progress-step-modern.current .step-indicator {
  background: var(--primary-color);
  color: var(--text-inverse);
  animation: pulse 2s infinite;
}

.progress-step-modern.completed .step-indicator {
  background: var(--success-color);
  color: var(--text-inverse);
}

.progress-step-modern.error .step-indicator {
  background: var(--error-color);
  color: var(--text-inverse);
}

.step-content {
  flex: 1;
  min-width: 0;
}

.step-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.step-description {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.progress-step-modern.current .step-title {
  color: var(--primary-color);
  font-weight: 600;
}

.progress-step-modern.completed .step-title {
  color: var(--success-color);
}

.progress-step-modern.error .step-title {
  color: var(--error-color);
}

@media (max-width: 1024px) {
  .container {
    padding: 16px;
  }

  .analysis-panel,
  .progress-container {
    padding: 20px;
  }

  .header h1 {
    font-size: 2rem;
  }
}

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

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

  .hero-features {
    gap: 16px;
  }

  .features {
    padding: 80px 0;
  }

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

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

  .analysis-header {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 20px 0;
  }
  
  .analysis-title {
    order: -1;
  }
  
  .analysis-title h1 {
    justify-content: center;
  }
  
  .analyzing-url {
    justify-content: center;
  }
  
  .back-button {
    align-self: flex-start;
  }
  
  .results-header {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  
  .results-header h2 {
    text-align: center;
    justify-content: center;
  }
  
  .results-header .rerun-button {
    align-self: center;
    max-width: 200px;
  }

  .analysis-panel,
  .progress-container,
  .results-section {
    padding: 20px;
  }

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

@media (max-width: 480px) {
  .container {
    padding: 12px;
  }

  .hero-title {
    font-size: 2rem;
    line-height: 1.2;
  }

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

  .hero-url-input {
    padding: 16px 16px 16px 48px;
    font-size: 1rem;
  }

  .input-icon {
    left: 16px;
    width: 18px;
    height: 18px;
  }

  .hero-analyze-button {
    padding: 16px 24px;
    font-size: 1rem;
  }

  .hero-features {
    flex-direction: column;
    gap: 12px;
  }

  .feature-item {
    justify-content: center;
  }

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

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

  .feature-card {
    padding: 24px;
  }

  .analysis-panel,
  .progress-container,
  .results-section {
    padding: 16px;
  }
}

/* Console Section */
.console-section {
  padding: 80px 0;
  background: var(--background-alt);
}

.console-header {
  text-align: center;
  margin-bottom: 40px;
}

.console-demo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 40px;
}

.console-card {
  background: #1e293b;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.console-header-bar {
  background: #334155;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.console-dots {
  display: flex;
  gap: 6px;
}

.console-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ef4444;
}

.console-dots span:nth-child(2) {
  background: #f59e0b;
}

.console-dots span:nth-child(3) {
  background: #10b981;
}

.console-title {
  color: #e2e8f0;
  font-size: 0.875rem;
  font-weight: 500;
}

.console-content {
  padding: 24px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
}

.console-line {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

.console-prompt {
  color: #10b981;
  font-weight: 600;
}

.console-command {
  color: #e2e8f0;
}

.console-benefits h3 {
  color: var(--text-primary);
  margin-bottom: 20px;
  font-size: 1.25rem;
}

.console-benefits ul {
  list-style: none;
  padding: 0;
}

.console-benefits li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.console-benefits i {
  width: 18px;
  height: 18px;
  color: var(--primary-color);
  flex-shrink: 0;
}

/* Footer */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 60px 0 20px;
  margin-top: 80px;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  margin-bottom: 40px;
}

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

.footer-logo .logo-icon {
  width: 32px;
  height: 32px;
}

.footer-logo .logo-text {
  font-size: 1.5rem;
  font-weight: 800;
}

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

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.footer-section h4 {
  color: var(--text-primary);
  margin-bottom: 20px;
  font-size: 1.125rem;
  font-weight: 600;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section li {
  margin-bottom: 12px;
}

.footer-section a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.footer-section i {
  width: 16px;
  height: 16px;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-bottom a {
  color: var(--primary-color);
  text-decoration: none;
}

.footer-license {
  margin-top: 8px;
  color: var(--text-muted);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .console-demo {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .footer-links {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Console Highlight */
.console-highlight {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  margin: 24px 0;
  text-align: center;
}

.console-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-color);
  color: white;
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.console-icon {
  width: 16px;
  height: 16px;
}

.console-description {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.95rem;
}

/* Open Source Badge */
.open-source-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 20px;
  margin-top: 24px;
  font-size: 0.875rem;
}

.github-icon {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
}

.github-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.github-link:hover {
  color: var(--primary-hover);
}

/* Hero GitHub Link with Stars */
.hero-github-link {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 10;
}

.github-stars-link {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.github-stars-link:hover {
  background: var(--surface-hover);
  border-color: var(--primary-color);
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.github-stars-icon {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
}

.github-text {
  font-weight: 600;
  font-size: 0.875rem;
}

.stars-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: var(--radius-md);
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #92400e;
  transition: all 0.3s ease;
}

.star-icon {
  width: 12px;
  height: 12px;
  color: #f59e0b;
  fill: #f59e0b;
  stroke: #f59e0b;
  stroke-width: 2;
  transition: transform 0.3s ease;
}

.stars-count {
  font-weight: 700;
  transition: all 0.3s ease;
}

/* Animation for stars badge when count updates */
.stars-badge.updated {
  animation: starsUpdate 0.6s ease;
}

@keyframes starsUpdate {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Enhanced star icon animation */
.stars-badge:hover .star-icon {
  transform: rotate(15deg);
}

/* Ensure star icon is visible when badge has golden background */
.stars-badge[style*="linear-gradient"] .star-icon {
  color: #92400e !important;
  fill: #92400e !important;
  stroke: #92400e !important;
}

.stars-badge[style*="linear-gradient"] .stars-count {
  color: white !important;
}

/* Mobile Responsive for GitHub Link */
@media (max-width: 768px) {
  .hero-github-link {
    position: relative;
    top: auto;
    right: auto;
    margin-bottom: 24px;
    align-self: flex-end;
  }
}
