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

:root {
  --primary: #667eea;
  --primary-dark: #5a67d8;
  --secondary: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;
  --success: #28a745;

  --gemini-approved: #4285f4;
  --gemini-questionable: #fbbc04;
  --gpt-approved: #10a37f;
  --gpt-questionable: #ef4444;
  --overlap-color: #8b5cf6;
  --gemini-accent: #1a73e8;
  --gpt-accent: #0d7c66;

  --white: #ffffff;
  --gray-50: #f8f9fa;
  --gray-100: #e9ecef;
  --gray-200: #dee2e6;
  --gray-300: #ced4da;
  --gray-500: #6c757d;
  --gray-700: #343a40;
  --gray-900: #1a1a1a;

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

  --transition: 0.2s ease-in-out;
}

body {
  font-family: var(--font-family);
  background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%);
  min-height: 100vh;
  color: var(--gray-700);
  line-height: 1.6;
}

.copy-output {
  white-space: pre-line;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-xl);
}

.header {
  text-align: center;
  margin-bottom: var(--space-2xl);
  color: var(--white);
}

.header h1 {
  font-size: clamp(var(--font-size-2xl), 5vw, var(--font-size-3xl));
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.header p {
  font-size: var(--font-size-lg);
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  margin-bottom: var(--space-xl);
  transform: translateY(0);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.card-header {
  padding: var(--space-xl);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.card-header h2 {
  font-size: var(--font-size-2xl);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.card-header p {
  margin: var(--space-sm) 0 0 0;
  color: var(--gray-500);
  font-size: var(--font-size-sm);
  width: 100%;
}

.step-number {
  background: var(--primary);
  color: var(--white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.card-body {
  padding: var(--space-xl);
  position: relative;
}

.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.form-section {
  border: none;
  padding: 0;
  margin: 0;
}

.form-section-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--gray-100);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-group label {
  font-weight: 600;
  color: var(--gray-700);
  font-size: var(--font-size-sm);
}

.form-group input,
.form-group select {
  padding: var(--space-md);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: var(--font-size-base);
  font-family: inherit;
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input.error,
.form-group select.error {
  border-color: var(--danger);
}

.error-message {
  color: var(--danger);
  font-size: var(--font-size-sm);
  min-height: 1.6em;
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--transition);
}

.error-message.show {
  visibility: visible;
  opacity: 1;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236c757d' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-md) center;
  padding-right: calc(var(--space-md) * 3);
}

.form-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: var(--space-md);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  border: none;
  border-radius: var(--radius);
  font-size: var(--font-size-base);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  min-height: 44px;
  position: relative;
}

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

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

.btn-sm {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-size-sm);
  min-height: 36px;
}

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

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--white);
}

.btn-secondary:hover:not(:disabled) {
  background: #229a3e;
  transform: translateY(-1px);
}

.btn-outline {
  background: var(--white);
  color: var(--gray-700);
  border: 2px solid var(--gray-300);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-text,
.btn-loading {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}

.keywords-controls {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--gray-200);
}

.control-buttons {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.ai-legend {
  display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--gray-50);
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.legend-badge {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  border: 2px solid transparent;
}

.legend-badge.approved-gemini {
  background: var(--gemini-approved);
}

.legend-badge.questionable-gemini {
  background: var(--gemini-questionable);
}

.legend-badge.approved-gpt {
  background: var(--gpt-approved);
}

.legend-badge.questionable-gpt {
  background: var(--gpt-questionable);
}

.legend-badge.overlap {
  background: var(--overlap-color);
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  border-radius: var(--radius-lg);
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  color: var(--primary);
  font-weight: 600;
}

.loading-content i {
  font-size: var(--font-size-2xl);
}

.badge-container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  min-height: 60px;
}

.badge-container:empty::after {
  content: "No keywords generated yet. Fill in the form above or add custom keywords to get started.";
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-style: italic;
  text-align: center;
  padding: var(--space-xl);
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  background: var(--gray-50);
  width: 100%;
}

.keyword-badge {
  background: var(--gray-50);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-full);
  padding: var(--space-sm) var(--space-lg);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  user-select: none;
  position: relative;
}

.keyword-badge:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.keyword-badge.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.keyword-badge.ai-suggested {
  position: relative;
  padding-right: calc(var(--space-lg) + 20px);
}

.keyword-badge .ai-indicators {
  position: absolute;
  right: var(--space-sm);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 2px;
}

.keyword-badge .ai-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.keyword-badge .ai-indicator.gemini-approved {
  background: var(--gemini-approved);
}

.keyword-badge .ai-indicator.gemini-questionable {
  background: var(--gemini-questionable);
}

.keyword-badge .ai-indicator.gpt-approved {
  background: var(--gpt-approved);
}

.keyword-badge .ai-indicator.gpt-questionable {
  background: var(--gpt-questionable);
}

.keyword-badge.gemini-only {
  background: var(--white);
  border-color: var(--gemini-accent);
  border-width: 3px;
}

.keyword-badge.gpt-only {
  background: var(--white);
  border-color: var(--gpt-accent);
  border-width: 3px;
}

.keyword-badge.overlap {
  background: var(--white);
  border-color: var(--overlap-color);
  border-width: 3px;
}

.keyword-badge.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.keyword-badge.selected .ai-indicator {
  border-color: rgba(255, 255, 255, 0.8);
}

.keyword-badge .warning-icon {
  font-size: var(--font-size-sm);
  margin-left: var(--space-xs);
  color: var(--warning);
}

.keyword-badge:disabled {
  cursor: not-allowed;
}

.keyword-phrase {
  font-weight: 600;
  font-size: var(--font-size-sm);
}

.keyword-volume {
  background: rgba(0, 0, 0, 0.1);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
}

.keyword-badge.selected .keyword-volume {
  background: rgba(255, 255, 255, 0.2);
}

.keyword-tooltip {
  white-space: pre-line;
  position: fixed;
  background: var(--gray-900);
  color: var(--white);
  padding: var(--space-md);
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
  max-width: 300px;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity var(--transition), transform var(--transition);
  box-shadow: var(--shadow-lg);
  line-height: 1.4;
}

.keyword-tooltip.show {
  opacity: 0.95;
  transform: translateY(0);
}

.keyword-tooltip::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: var(--gray-900);
}

.product-info-form {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.product-info-form .form-group {
  flex: 1;
  margin-bottom: 0;
}

.product-info-content {
  margin-top: var(--space-md);
  animation: slideDown var(--transition);
}

.product-info-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: var(--space-lg);
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: var(--space-md);
}

.product-info-box pre {
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
  color: var(--gray-700);
}

.info-message {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
  color: var(--gray-600);
  margin-top: var(--space-md);
}

.info-message.warning {
  background: #fff3cd;
  border-color: #ffc107;
  color: #856404;
}

.info-message i {
  flex-shrink: 0;
}

.action-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

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

.skeleton-container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--gray-200) 25%,
    var(--gray-100) 50%,
    var(--gray-200) 75%
  );
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

.skeleton-badge {
  height: 40px;
  width: 120px;
  border-radius: var(--radius-full);
}

.skeleton-container:empty::after {
  content: "Loading keywords...";
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  font-style: italic;
  width: 100%;
  padding: var(--space-xl);
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.selection-summary {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.action-section {
  display: flex;
  justify-content: center;
  padding-top: var(--space-md);
  border-top: 1px solid var(--gray-200);
}

.action-section button:first-child {
  margin-right: var(--space-md);
}

.toast {
  position: fixed;
  top: var(--space-xl);
  right: var(--space-xl);
  background: var(--success);
  color: var(--white);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  transform: translateX(calc(100% + var(--space-xl)));
  transition: transform var(--transition);
  z-index: 1000;
}

.toast.show {
  transform: translateX(0);
}

.toast.warning {
  background: var(--warning);
}

.toast.error {
  background: var(--danger);
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1500;
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: var(--font-size-xl);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--danger);
}

.modal-close {
  background: none;
  border: none;
  font-size: var(--font-size-2xl);
  cursor: pointer;
  color: var(--gray-500);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--gray-100);
}

.modal-body {
  padding: var(--space-lg);
}

.modal-footer {
  padding: var(--space-lg);
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .container {
    padding: var(--space-md);
  }

  .card-header {
    padding: var(--space-lg);
  }

  .card-body {
    padding: var(--space-lg);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .keywords-controls {
    align-items: stretch;
  }

  .control-buttons {
    justify-content: center;
  }

  .ai-legend {
    justify-content: center;
  }

  .form-actions {
    justify-content: center;
  }

  .product-info-form {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: var(--space-xl);
  }

  .product-info-form .form-group {
    width: 100%;
  }
}

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

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

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.manual-product-info-section {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-lg);
  padding: var(--space-lg);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  animation: slideDown var(--transition);
}

.manual-product-textarea {
  margin-top: var(--space-md);
  margin-bottom: var(--space-md);
}

.manual-product-textarea textarea {
  width: 100%;
  min-height: 150px;
  padding: var(--space-md);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: var(--font-size-base);
  font-family: var(--font-family);
  background: var(--white);
  resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.manual-product-textarea textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.help-text {
  display: block;
  margin-top: var(--space-xs);
  color: var(--gray-500);
  font-size: var(--font-size-sm);
  line-height: 1.4;
}

.help-text i {
  margin-right: var(--space-xs);
}

.product-info-display {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: var(--space-lg);
}

#editProductInfoBtn {
  transition: all var(--transition);
}

#editProductInfoBtn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.manual-product-info-section .info-message {
  margin: 0 0 var(--space-md) 0;
}

@media (max-width: 768px) {
  .manual-product-info-section {
    padding: var(--space-md);
  }

  .manual-product-textarea textarea {
    min-height: 120px;
  }
}

.highlighted-keyword {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 3px;
  padding: 1px 3px;
  font-weight: 500;
  position: relative;
}

/* disabled, need to fix overlap first (eg when kws = [soldering, soldering iron] it duplicate highlights */
/* .highlighted-keyword:hover::after {
  content: attr(data-search-volume) " searches";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
} */

.simple-nav {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 999;
  margin-bottom: var(--space-xl);
}

.nav-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-sm) var(--space-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-links {
  display: flex;
  gap: var(--space-lg);
}

.nav-link {
  color: var(--gray-700);
  text-decoration: none;
  font-weight: 500;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.nav-link:hover {
  color: var(--primary);
  background: var(--gray-50);
}

.nav-link.active {
  color: var(--white);
  background: var(--primary);
}

.nav-link.disabled {
  color: var(--gray-400);
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.6;
}

@media (max-width: 768px) {
  .nav-wrapper {
    padding: var(--space-md);
    flex-direction: column;
    gap: var(--space-md);
  }

  .nav-links {
    gap: var(--space-sm);
  }

  .nav-link {
    font-size: var(--font-size-sm);
    padding: var(--space-xs) var(--space-sm);
  }
}

/* 
Copy Translator 
TODO: Move to separate file later, divide upper part to base.css and keywordCreator.css 
*/

.file-upload-wrapper {
  position: relative;
}

.file-input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.file-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  background: var(--gray-50);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  min-height: 120px;
}

.file-label:hover,
.file-label.drag-over {
  border-color: var(--primary);
  background: rgba(102, 126, 234, 0.05);
}

.file-label i {
  font-size: var(--font-size-2xl);
  color: var(--primary);
  margin-bottom: var(--space-sm);
}

.file-info {
  margin-top: var(--space-md);
  animation: slideDown var(--transition);
}

.file-info-content {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
}

.file-info-content i {
  font-size: var(--font-size-xl);
  color: var(--success);
}

.file-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.file-name {
  font-weight: 600;
  color: var(--gray-700);
}

.file-size {
  font-size: var(--font-size-sm);
  color: var(--gray-500);
}

.btn-icon {
  background: none;
  border: none;
  color: var(--gray-500);
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.btn-icon:hover {
  background: var(--gray-200);
  color: var(--danger);
}

.progress-container {
  margin-bottom: var(--space-xl);
}

.progress-bar-wrapper {
  position: relative;
  height: 24px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-sm);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  transition: width 0.3s ease;
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.2) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.2) 75%,
    transparent 75%,
    transparent
  );
  background-size: 40px 40px;
  animation: progress-stripes 1s linear infinite;
}

@keyframes progress-stripes {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 40px 40px;
  }
}

.progress-percentage {
  text-align: center;
  font-weight: 600;
  color: var(--gray-700);
}

.progress-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.progress-step {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius);
  background: var(--gray-50);
  transition: all var(--transition);
}

.progress-step.processing {
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid var(--primary);
}

.progress-step.completed {
  background: rgba(40, 167, 69, 0.1);
  border: 1px solid var(--success);
}

.progress-step.error {
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid var(--danger);
}

.step-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--white);
  flex-shrink: 0;
}

.step-icon i {
  font-size: var(--font-size-lg);
  color: var(--gray-400);
}

.progress-step.processing .step-icon i {
  color: var(--primary);
}

.progress-step.completed .step-icon i {
  color: var(--success);
}

.progress-step.error .step-icon i {
  color: var(--danger);
}

.step-content h3 {
  font-size: var(--font-size-base);
  margin-bottom: var(--space-xs);
}

.step-status {
  font-size: var(--font-size-sm);
  color: var(--gray-500);
  white-space: pre-line;
}

.progress-log {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: var(--space-lg);
}

.progress-log h4 {
  font-size: var(--font-size-base);
  margin-bottom: var(--space-md);
  color: var(--gray-700);
}

.log-content {
  font-size: var(--font-size-sm);
  color: var(--gray-600);
  max-height: 200px;
  overflow-y: auto;
}

.log-entry {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--gray-200);
}

.log-entry:last-child {
  border-bottom: none;
}

.result-content {
  text-align: center;
}

.result-success {
  margin-bottom: var(--space-xl);
}

.result-success i {
  font-size: 4rem;
  color: var(--success);
  margin-bottom: var(--space-md);
}

.result-success h3 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-sm);
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  padding: var(--space-xl);
  background: var(--gray-50);
  border-radius: var(--radius-lg);
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.stat-label {
  font-size: var(--font-size-sm);
  color: var(--gray-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--primary);
}

@media (max-width: 768px) {
  .file-label {
    padding: var(--space-lg);
    min-height: 100px;
  }

  .progress-steps {
    gap: var(--space-md);
  }

  .progress-step {
    padding: var(--space-sm);
  }

  .result-stats {
    grid-template-columns: 1fr;
    gap: var(--space-md);
    padding: var(--space-lg);
  }

  .stat-value {
    font-size: var(--font-size-xl);
  }
}

.variants-input-wrapper {
  position: relative;
}

.variants-input-wrapper input {
  width: 100%;
  padding: var(--space-md);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: var(--font-size-base);
  font-family: inherit;
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.variants-input-wrapper input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Custom Keywords Section Styles */
.custom-keywords-section {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 2px solid var(--gray-100);
}

.custom-keywords-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.custom-keywords-header h3 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--gray-700);
}

.custom-keywords-form {
  background: var(--gray-50);
  padding: var(--space-lg);
  border-radius: var(--radius);
  animation: slideDown var(--transition);
}

.custom-keyword-input-wrapper {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.custom-keyword-input-wrapper input {
  flex: 1;
  padding: var(--space-md);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: var(--font-size-base);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.custom-keyword-input-wrapper input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.custom-keywords-list {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--gray-200);
}

.custom-keywords-list h4 {
  font-size: var(--font-size-base);
  color: var(--gray-600);
  margin-bottom: var(--space-md);
}

.custom-keywords-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.custom-keyword-badge {
  background: var(--primary);
  color: var(--white);
  border: 2px solid var(--primary);
  border-radius: var(--radius-full);
  padding: var(--space-sm) var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  position: relative;
}

.custom-keyword-badge .keyword-phrase {
  font-weight: 600;
  font-size: var(--font-size-sm);
}

.custom-keyword-badge .keyword-volume-input {
  width: 80px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius);
  color: var(--white);
  font-size: var(--font-size-sm);
  text-align: center;
}

.custom-keyword-badge .keyword-volume-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.custom-keyword-badge .remove-keyword {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
  color: var(--white);
}

.custom-keyword-badge .remove-keyword:hover {
  background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
  .custom-keywords-header {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-md);
  }

  .custom-keyword-input-wrapper {
    flex-direction: column;
  }

  .custom-keyword-badge .keyword-volume-input {
    width: 60px;
  }
}

.btn-retry {
  background-color: #ff9800;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background-color 0.2s;
}

.btn-retry:hover {
  background-color: #f57c00;
}

.btn-retry:active {
  transform: scale(0.98);
}

.progress-step.error {
  border-left-color: #dc3545;
}

.progress-step.error .step-icon {
  color: #dc3545;
}

.progress-step.error .step-status {
  color: #dc3545;
  font-weight: 600;
}

.fix-tooltip {
  position: absolute;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1100;
  width: 350px;
  max-width: 90vw;
  display: none;
  border: 1px solid var(--gray-200);
}

.fix-tooltip-header {
  padding: var(--space-md);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fix-tooltip-title {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--gray-700);
}

.fix-tooltip-body {
  padding: var(--space-lg);
}

.fix-tooltip-body .form-group {
  margin: 0;
}

.fix-tooltip-body input {
  width: 100%;
  padding: var(--space-md);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: var(--font-size-base);
}

.fix-tooltip-body input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.fix-tooltip-footer {
  padding: var(--space-md);
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
}

.card.tooltip-open {
  pointer-events: none;
}

.fix-tooltip-preview-wrapper {
  padding: var(--space-md);
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.fix-tooltip-preview-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gray-500);
  margin-bottom: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.fix-tooltip-selected-text {
  background: var(--white);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--primary);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
  font-size: var(--font-size-sm);
  font-style: italic;
  color: var(--gray-700);
  line-height: 1.5;
  max-height: 100px;
  overflow-y: auto;
  word-break: break-word;
  margin: 0;
}

.checkbox-wrapper {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}

#separatePrompts {
  width: 20px;
  height: 20px;
}
