/* ==========================================
   DiaChiVN-XT — Design System
   Premium Vietnamese Address Cleaner
   ========================================== */

/* ─── Google Font ─── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ─── CSS Custom Properties ─── */
:root {
  /* Color Palette — Deep Purple & Cyan */
  --color-bg-primary: #0a0a1a;
  --color-bg-secondary: #111127;
  --color-bg-card: rgba(25, 25, 60, 0.6);
  --color-bg-card-hover: rgba(35, 35, 80, 0.7);
  --color-bg-input: rgba(15, 15, 40, 0.8);

  --color-accent-1: #7c3aed;        /* Vivid Purple */
  --color-accent-2: #06b6d4;        /* Cyan */
  --color-accent-3: #a78bfa;        /* Lighter Purple */
  --color-accent-4: #22d3ee;        /* Light Cyan */
  --color-accent-success: #10b981;  /* Emerald */
  --color-accent-warning: #f59e0b;  /* Amber */
  --color-accent-error: #ef4444;    /* Red */

  --color-text-primary: #f1f5f9;
  --color-text-secondary: #94a3b8;
  --color-text-muted: #64748b;
  --color-text-accent: #a78bfa;

  --color-border: rgba(124, 58, 237, 0.2);
  --color-border-hover: rgba(124, 58, 237, 0.4);

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, #7c3aed 0%, #06b6d4 50%, #7c3aed 100%);
  --gradient-card: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(6, 182, 212, 0.05));
  --gradient-button: linear-gradient(135deg, #7c3aed, #06b6d4);
  --gradient-button-hover: linear-gradient(135deg, #6d28d9, #0891b2);
  --gradient-glow: radial-gradient(ellipse at 50% 0%, rgba(124, 58, 237, 0.15), transparent 70%);

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-xs: 0.75rem;
  --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: 2rem;
  --font-size-4xl: 2.5rem;
  --font-size-5xl: 3.5rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Borders */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(124, 58, 237, 0.3);
  --shadow-glow-cyan: 0 0 30px rgba(6, 182, 212, 0.2);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Glass */
  --glass-bg: rgba(25, 25, 60, 0.4);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(20px);
}

/* ─── Reset & Base ─── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--color-text-primary);
  background: var(--color-bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Background Effects ─── */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(circle at 20% 20%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(6, 182, 212, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(124, 58, 237, 0.03) 0%, transparent 70%);
  animation: backgroundShift 20s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes backgroundShift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(-2%, -1%) rotate(1deg); }
  66% { transform: translate(1%, 2%) rotate(-1deg); }
}

/* ─── Layout ─── */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-4);
  min-height: 100vh;
}

/* ─── Header / Hero ─── */
.hero {
  text-align: center;
  padding: var(--space-16) 0 var(--space-12);
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent-1), transparent);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  color: var(--color-accent-4);
  margin-bottom: var(--space-6);
  animation: fadeInDown 0.6s ease-out;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent-success);
  animation: pulse 2s ease-in-out infinite;
}

.hero h1 {
  font-size: var(--font-size-5xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--space-4);
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero h1 .gradient-text {
  background: var(--gradient-hero);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFlow 4s linear infinite;
}

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

.hero-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-8);
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* ─── Steps Indicator ─── */
.steps-indicator {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-10);
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

.step-dot {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  transition: var(--transition-base);
  cursor: default;
}

.step-dot .step-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xs);
  font-weight: 700;
  background: rgba(100, 116, 139, 0.2);
  color: var(--color-text-muted);
  transition: var(--transition-base);
}

.step-dot.active {
  border-color: var(--color-accent-1);
  color: var(--color-text-primary);
  background: rgba(124, 58, 237, 0.15);
}

.step-dot.active .step-number {
  background: var(--gradient-button);
  color: white;
}

.step-dot.completed {
  border-color: var(--color-accent-success);
  color: var(--color-accent-success);
}

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

.step-connector {
  width: 32px;
  height: 2px;
  background: var(--color-border);
  align-self: center;
  border-radius: 1px;
  transition: var(--transition-base);
}

.step-connector.completed {
  background: var(--color-accent-success);
}

/* ─── Glass Card ─── */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
  transition: var(--transition-base);
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.5), rgba(6, 182, 212, 0.5), transparent);
  opacity: 0;
  transition: var(--transition-base);
}

.glass-card:hover::before {
  opacity: 1;
}

/* ─── Step Panels ─── */
.step-panel {
  display: none;
  animation: fadeInUp 0.4s ease-out;
}

.step-panel.active {
  display: block;
}

/* ─── Upload Dropzone ─── */
.dropzone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-16) var(--space-8);
  text-align: center;
  transition: var(--transition-base);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.dropzone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-card);
  opacity: 0;
  transition: var(--transition-base);
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--color-accent-1);
  background: rgba(124, 58, 237, 0.05);
}

.dropzone:hover::before,
.dropzone.dragover::before {
  opacity: 1;
}

.dropzone-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--space-4);
  border-radius: var(--radius-lg);
  background: rgba(124, 58, 237, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  transition: var(--transition-spring);
}

.dropzone:hover .dropzone-icon {
  transform: translateY(-4px) scale(1.05);
  background: rgba(124, 58, 237, 0.2);
  box-shadow: var(--shadow-glow);
}

.dropzone-icon svg {
  width: 32px;
  height: 32px;
  color: var(--color-accent-3);
}

.dropzone-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
  position: relative;
  z-index: 1;
}

.dropzone-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  position: relative;
  z-index: 1;
}

.dropzone-subtitle .highlight {
  color: var(--color-accent-3);
  font-weight: 500;
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

/* ─── File Info Card ─── */
.file-info {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-md);
  margin-top: var(--space-4);
  animation: fadeInUp 0.3s ease-out;
}

.file-info-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.file-info-icon svg {
  width: 22px;
  height: 22px;
  color: var(--color-accent-success);
}

.file-info-details {
  flex: 1;
  min-width: 0;
}

.file-info-name {
  font-weight: 600;
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-info-meta {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.file-info .btn-remove {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-accent-error);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.file-info .btn-remove:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* ─── Column Selector ─── */
.column-selector-header {
  margin-bottom: var(--space-6);
}

.column-selector-header h3 {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.column-selector-header p {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.column-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.column-option {
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg-input);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-base);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.column-option:hover {
  border-color: var(--color-border-hover);
  background: var(--color-bg-card-hover);
}

.column-option.selected {
  border-color: var(--color-accent-1);
  background: rgba(124, 58, 237, 0.1);
}

.column-option .radio-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.column-option.selected .radio-dot {
  border-color: var(--color-accent-1);
}

.column-option.selected .radio-dot::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent-1);
  animation: scaleIn 0.2s ease-out;
}

.column-option .column-name {
  font-weight: 500;
  font-size: var(--font-size-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.column-option .column-preview {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Preview Table ─── */
.preview-section {
  margin-top: var(--space-6);
}

.preview-section h4 {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-3);
}

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.data-table th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-weight: 600;
  color: var(--color-text-secondary);
  background: rgba(124, 58, 237, 0.08);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--color-text-primary);
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-table tr:hover td {
  background: rgba(124, 58, 237, 0.04);
}

.data-table td.address-col {
  color: var(--color-accent-4);
  font-weight: 500;
}

.data-table td.parsed-col {
  color: var(--color-accent-success);
}

.data-table td.error-col {
  color: var(--color-accent-error);
}

/* ─── Processing State ─── */
.processing-container {
  text-align: center;
  padding: var(--space-12) 0;
}

.processing-animation {
  width: 120px;
  height: 120px;
  margin: 0 auto var(--space-8);
  position: relative;
}

.processing-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  animation: spin 1.5s linear infinite;
}

.processing-ring:nth-child(1) {
  border-top-color: var(--color-accent-1);
  animation-duration: 1.5s;
}

.processing-ring:nth-child(2) {
  inset: 10px;
  border-right-color: var(--color-accent-2);
  animation-duration: 2s;
  animation-direction: reverse;
}

.processing-ring:nth-child(3) {
  inset: 20px;
  border-bottom-color: var(--color-accent-3);
  animation-duration: 2.5s;
}

.processing-center-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  color: var(--color-accent-3);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.processing-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.processing-subtitle {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-6);
}

/* Progress Bar */
.progress-bar-container {
  max-width: 400px;
  margin: 0 auto;
}

.progress-bar {
  height: 6px;
  background: rgba(124, 58, 237, 0.15);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-2);
}

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

.progress-bar-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 30px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
  animation: shimmer 1.5s ease-in-out infinite;
}

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

.progress-text {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  display: flex;
  justify-content: space-between;
}

/* ─── Results ─── */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.results-header h3 {
  font-size: var(--font-size-xl);
  font-weight: 700;
}

.results-stats {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.stat-badge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.stat-badge.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-accent-success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.stat-badge.warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-accent-warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.stat-badge.error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-accent-error);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.stat-badge .stat-icon {
  width: 16px;
  height: 16px;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--gradient-button);
  color: white;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover:not(:disabled) {
  background: var(--gradient-button-hover);
  box-shadow: 0 6px 25px rgba(124, 58, 237, 0.4);
  transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--glass-bg);
  color: var(--color-text-primary);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--color-border-hover);
  background: var(--color-bg-card-hover);
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover:not(:disabled) {
  box-shadow: 0 6px 25px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-group {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* ─── Features Grid ─── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-4);
  margin: var(--space-8) 0;
}

.feature-card {
  padding: var(--space-5);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  transition: var(--transition-base);
}

.feature-card:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
  font-size: 1.5rem;
}

.feature-icon.purple { background: rgba(124, 58, 237, 0.15); }
.feature-icon.cyan { background: rgba(6, 182, 212, 0.15); }
.feature-icon.green { background: rgba(16, 185, 129, 0.15); }
.feature-icon.amber { background: rgba(245, 158, 11, 0.15); }

.feature-card h4 {
  font-size: var(--font-size-base);
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.feature-card p {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ─── Footer ─── */
.footer {
  text-align: center;
  padding: var(--space-12) 0 var(--space-6);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.footer a {
  color: var(--color-accent-3);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer a:hover {
  color: var(--color-accent-4);
}

/* ─── Toast Notification ─── */
.toast-container {
  position: fixed;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.toast {
  padding: var(--space-3) var(--space-5);
  background: var(--color-bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-lg);
  font-size: var(--font-size-sm);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  animation: slideInRight 0.3s ease-out;
  max-width: 380px;
}

.toast.success { border-left: 3px solid var(--color-accent-success); }
.toast.error { border-left: 3px solid var(--color-accent-error); }
.toast.warning { border-left: 3px solid var(--color-accent-warning); }

.toast.removing {
  animation: slideOutRight 0.3s ease-in forwards;
}

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

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

@keyframes scaleIn {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

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

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

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

/* ─── Confidence Indicator ─── */
.confidence-bar {
  width: 60px;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-right: var(--space-2);
}

.confidence-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.confidence-bar-fill.high { background: var(--color-accent-success); }
.confidence-bar-fill.medium { background: var(--color-accent-warning); }
.confidence-bar-fill.low { background: var(--color-accent-error); }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .hero h1 {
    font-size: var(--font-size-3xl);
  }

  .hero-subtitle {
    font-size: var(--font-size-base);
  }

  .glass-card {
    padding: var(--space-5);
  }

  .steps-indicator {
    flex-wrap: wrap;
  }

  .step-dot .step-label {
    display: none;
  }

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

  .results-header {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-group {
    flex-direction: column;
  }

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

@media (max-width: 480px) {
  .app-container {
    padding: var(--space-4) var(--space-3);
  }

  .hero {
    padding: var(--space-10) 0 var(--space-8);
  }

  .hero h1 {
    font-size: var(--font-size-2xl);
  }

  .dropzone {
    padding: var(--space-10) var(--space-4);
  }
}

/* ─── Config Panel / Checkbox ─── */
.config-panel {
  margin-top: var(--space-6);
  padding: var(--space-5);
  background: rgba(25, 25, 60, 0.4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-base), background-color var(--transition-base);
}

.config-panel:hover {
  border-color: var(--color-border-hover);
  background: rgba(35, 35, 80, 0.5);
}

.checkbox-container {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  cursor: pointer;
  user-select: none;
}

.checkbox-container input[type="checkbox"] {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: var(--color-accent-1);
  cursor: pointer;
}

.checkbox-label {
  font-weight: 600;
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  display: block;
}

.checkbox-description {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  display: block;
  margin-top: var(--space-2);
  line-height: 1.5;
}

/* ─── Checkbox Dot (for multi-column selection grid) ─── */
.column-option .checkbox-dot {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.column-option.selected .checkbox-dot {
  border-color: var(--color-accent-1);
  background: var(--color-accent-1);
}

.column-option.selected .checkbox-dot::after {
  content: '✓';
  color: white;
  font-size: 11px;
  font-weight: bold;
}

/* ─── Mode Selector Panel (Step 2) ─── */
.mode-selector-panel {
  margin-top: var(--space-6);
  padding: var(--space-5);
  background: rgba(25, 25, 60, 0.4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-base), background-color var(--transition-base);
}

.mode-selector-panel:hover {
  border-color: var(--color-border-hover);
  background: rgba(35, 35, 80, 0.5);
}

.mode-selector-panel h4 {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-4);
}

.mode-options-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
}

.mode-option-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-bg-input);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-base);
  user-select: none;
}

.mode-option-card:hover {
  border-color: var(--color-border-hover);
  background: var(--color-bg-card-hover);
}

.mode-option-card input[type="radio"] {
  margin-top: 4px;
  accent-color: var(--color-accent-1);
  cursor: pointer;
}

.mode-option-title {
  font-weight: 600;
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  display: block;
  margin-bottom: var(--space-1);
}

.mode-option-desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  display: block;
  line-height: 1.4;
}

/* ─── Preview Switcher (Step 4) ─── */
.preview-tab-btn {
  transition: var(--transition-base);
}
.preview-tab-btn.active {
  background: var(--color-accent-1);
  border-color: var(--color-accent-1);
  color: white;
}


