/* ===== RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Color Palette - Modern & Vibrant */
  --bg-dark: #0a0e27;
  --bg-card: #1a1f3a;
  --bg-card-hover: #252b4a;
  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-secondary: #8b5cf6;
  --accent-success: #10b981;
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --border-color: #2d3348;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.3);
}

body {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #1a1f3a 100%);
  min-height: 100vh;
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1), transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* ===== HEADER ===== */
.header {
  padding: 40px 0 30px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.logo {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
  letter-spacing: -2px;
}

.tagline {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.lang-selector {
  margin-top: 15px;
}

.lang-selector select {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lang-selector select:hover {
  border-color: var(--accent-primary);
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 40px 0 60px;
  position: relative;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}

.progress-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 3px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-step.active .progress-circle {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-color: var(--accent-primary);
  color: white;
  box-shadow: var(--shadow-glow);
  transform: scale(1.1);
}

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

.progress-label {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.progress-step.active .progress-label {
  color: var(--accent-primary);
  font-weight: 600;
}

.progress-line {
  width: 80px;
  height: 3px;
  background: var(--border-color);
  margin: 0 -5px;
  position: relative;
  top: -20px;
}

/* ===== WIZARD STEPS ===== */
.wizard-container {
  min-height: 60vh;
  position: relative;
}

.wizard-step {
  display: none;
  animation: fadeIn 0.5s ease-in-out;
}

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

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

.step-card {
  background: rgba(26, 31, 58, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 50px 40px;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease;
}

.step-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.step-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 15px;
  background: linear-gradient(135deg, white, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.step-description {
  color: var(--text-secondary);
  margin-bottom: 30px;
  font-size: 1.05rem;
}

/* ===== INPUTS ===== */
.input-large {
  width: 100%;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  color: var(--text-primary);
  font-size: 1.05rem;
  font-family: inherit;
  resize: vertical;
  transition: all 0.3s ease;
  margin-bottom: 25px;
}

.input-large:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

/* ===== BUTTONS ===== */
.btn {
  padding: 14px 32px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  box-shadow: var(--shadow-md);
}

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

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

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

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

.btn-large {
  padding: 18px 40px;
  font-size: 1.1rem;
}

.btn-copy {
  background: var(--accent-success);
  color: white;
  width: 100%;
  margin-top: 15px;
}

.btn-copy:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.btn-copy.success {
  background: var(--accent-success);
}

.button-group {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

.button-group .btn {
  flex: 1;
}

/* ===== TRUST BADGES ===== */
.trust-badges {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.badge {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--accent-primary);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* ===== CLASSIFICATION CARD ===== */
.classification-card {
  margin-bottom: 40px;
}

.classification-success {
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  padding: 20px;
}

.classification-icon {
  width: 50px;
  height: 50px;
  background: var(--accent-success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.classification-info h3 {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.category-name {
  font-size: 1.3rem;
  font-weight: 600;
  color: white;
  margin: 0;
}

.confidence {
  font-size: 0.85rem;
  color: var(--accent-success);
  margin-top: 5px;
}

/* ===== QUESTIONS FORM ===== */
.question-item {
  margin-bottom: 30px;
}

.question-label {
  display: block;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
  font-size: 1.05rem;
}

.question-label .required {
  color: #ef4444;
  margin-left: 4px;
}

.question-input,
.question-select {
  width: 100%;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 14px;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

.question-input:focus,
.question-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.radio-option,
.checkbox-option {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.radio-option:hover,
.checkbox-option:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
}

.radio-option input,
.checkbox-option input {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.radio-option label,
.checkbox-option label {
  cursor: pointer;
  flex: 1;
  font-size: 0.95rem;
}

/* ===== BRIEF DISPLAY ===== */
.brief-summary {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
  text-align: center;
}

.brief-summary p {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin: 0;
}

.brief-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

.brief-text {
  background: transparent;
  color: var(--text-primary);
  padding: 30px;
  white-space: pre-wrap;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.8;
  max-height: 600px;
  overflow-y: auto;
  margin: 0;
}

.brief-text::-webkit-scrollbar {
  width: 8px;
}

.brief-text::-webkit-scrollbar-track {
  background: var(--bg-card);
}

.brief-text::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.brief-text::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 14, 39, 0.9);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 1000;
}

.loading-overlay.active {
  display: flex;
}

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

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

.loading-text {
  margin-top: 20px;
  font-size: 1.1rem;
  color: var(--text-secondary);
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 40px 0;
  margin-top: 80px;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border-color);
}

.footer a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .logo {
    font-size: 2.2rem;
  }

  .step-card {
    padding: 30px 25px;
  }

  .step-title {
    font-size: 1.5rem;
  }

  .progress-bar {
    flex-wrap: wrap;
    gap: 10px;
  }

  .progress-line {
    display: none;
  }

  .progress-circle {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }

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

  .trust-badges {
    flex-direction: column;
    align-items: center;
  }
}
