/**
 * CORE SPEC - AI Learning Route Diagnosis Styles
 * File: assets/css/ai_learning_diagnosis.css
 * Version: 1.0.0
 * Updated: 2026-09-21
 */

/* Container */
.cs-diag-container {
  width: 100%;
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 0 64px;
  box-sizing: border-box;
}

/* Glass Card Component */
.cs-diag-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

@media (min-width: 640px) {
  .cs-diag-card {
    padding: 32px;
  }
}

/* Progress Header */
.cs-diag-progress {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.cs-diag-progress__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cs-diag-progress__step {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #00f0ff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cs-diag-progress__category {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 9999px;
  background: rgba(0, 240, 255, 0.1);
  color: #00f0ff;
  border: 1px solid rgba(0, 240, 255, 0.25);
}

.cs-diag-progress__track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  overflow: hidden;
}

.cs-diag-progress__bar {
  height: 100%;
  background: linear-gradient(90deg, #00f0ff, #b026ff);
  border-radius: 9999px;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Question Header */
.cs-diag-qhead {
  margin-bottom: 24px;
}

.cs-diag-qhead__title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.4;
  margin-bottom: 8px;
}

@media (min-width: 640px) {
  .cs-diag-qhead__title {
    font-size: 1.6rem;
  }
}

.cs-diag-qhead__desc {
  font-size: 0.95rem;
  color: #9ca3af;
  line-height: 1.5;
}

/* Options Grid */
.cs-diag-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.cs-diag-option {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  width: 100%;
  color: #ffffff;
  position: relative;
  outline: none;
}

.cs-diag-option:hover {
  background: rgba(0, 240, 255, 0.06);
  border-color: rgba(0, 240, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.15);
}

.cs-diag-option:focus-visible {
  border-color: #00f0ff;
  box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.4);
}

.cs-diag-option.is-selected {
  background: rgba(0, 240, 255, 0.12);
  border-color: #00f0ff;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.25);
}

.cs-diag-option__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #00f0ff;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.cs-diag-option:hover .cs-diag-option__badge,
.cs-diag-option.is-selected .cs-diag-option__badge {
  background: #00f0ff;
  color: #0b0f19;
  border-color: #00f0ff;
}

.cs-diag-option__body {
  flex: 1;
}

.cs-diag-option__text {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f3f4f6;
  margin-bottom: 4px;
  line-height: 1.4;
}

.cs-diag-option__desc {
  font-size: 0.85rem;
  color: #9ca3af;
  line-height: 1.45;
}

/* Nav Actions */
.cs-diag-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cs-diag-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
  color: #9ca3af;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.cs-diag-btn:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.cs-diag-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.cs-diag-keyboard-hint {
  font-size: 0.75rem;
  color: #6b7280;
  display: none;
}

@media (min-width: 640px) {
  .cs-diag-keyboard-hint {
    display: inline-block;
  }
}

/* ==========================================================================
   Results Layout (Blocks 1 - 9)
   ========================================================================== */
#result-container {
  display: none;
  animation: csFadeInUp 0.45s ease forwards;
}

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

/* Block 1: Route Hero */
.cs-result-hero {
  border-left: 4px solid #00f0ff;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.08) 0%, rgba(176, 38, 255, 0.05) 100%);
}

.cs-result-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(0, 240, 255, 0.15);
  color: #00f0ff;
  border: 1px solid rgba(0, 240, 255, 0.3);
  margin-bottom: 12px;
}

.cs-result-hero__title {
  font-size: 1.5rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.35;
  margin-bottom: 12px;
}

@media (min-width: 640px) {
  .cs-result-hero__title {
    font-size: 1.85rem;
  }
}

.cs-result-hero__lead {
  font-size: 1rem;
  color: #d1d5db;
  line-height: 1.65;
  margin-bottom: 16px;
}

.cs-result-secondary {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
}

.cs-result-secondary__tag {
  color: #b026ff;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 2px 8px;
  background: rgba(176, 38, 255, 0.15);
  border: 1px solid rgba(176, 38, 255, 0.3);
  border-radius: 6px;
}

/* Block 2: Reason Box */
.cs-result-reasons {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.cs-result-reasons__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #9ca3af;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cs-result-reasons__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cs-result-reasons__item {
  font-size: 0.9rem;
  color: #e5e7eb;
  line-height: 1.5;
  padding-left: 20px;
  position: relative;
}

.cs-result-reasons__item::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #00f0ff;
  font-weight: bold;
}

/* Block 3: Start Level */
.cs-result-level {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.cs-result-level__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.cs-result-level__name {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
}

.cs-result-level__badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(56, 239, 125, 0.15);
  color: #38ef7d;
  border: 1px solid rgba(56, 239, 125, 0.3);
}

.cs-result-level__desc {
  font-size: 0.9rem;
  color: #d1d5db;
  line-height: 1.6;
}

.cs-result-bridge-alert {
  margin-top: 8px;
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(255, 183, 3, 0.08);
  border: 1px solid rgba(255, 183, 3, 0.3);
  color: #ffb703;
}

.cs-result-bridge-alert__title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cs-result-bridge-alert__desc {
  font-size: 0.85rem;
  color: #f3f4f6;
  line-height: 1.5;
}

/* Learning Steps Grid (Blocks 4 & 5) */
.cs-step-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

@media (min-width: 640px) {
  .cs-step-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .cs-step-grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cs-step-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  position: relative;
  transition: all 0.2s ease;
}

.cs-step-card:hover {
  border-color: rgba(0, 240, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
}

.cs-step-card__num {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  color: #00f0ff;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.cs-step-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f9fafb;
  line-height: 1.45;
}

/* Block 6: Defer for now */
.cs-defer-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.cs-defer-box__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #9ca3af;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cs-defer-box__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.cs-defer-tag {
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: #9ca3af;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: line-through;
  opacity: 0.85;
}

.cs-defer-box__desc {
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.5;
}

/* Block 7: 30-day Challenge */
.cs-challenge-card {
  background: linear-gradient(135deg, rgba(56, 239, 125, 0.05) 0%, rgba(0, 240, 255, 0.05) 100%);
  border: 1px solid rgba(56, 239, 125, 0.3);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.cs-challenge-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.cs-challenge-card__title {
  font-size: 1rem;
  font-weight: 800;
  color: #38ef7d;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cs-challenge-card__pace {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(56, 239, 125, 0.15);
  color: #38ef7d;
}

.cs-challenge-card__task {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.5;
}

/* Block 8: Article Grid */
.cs-article-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

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

.cs-article-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 16px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.cs-article-card:hover {
  background: rgba(0, 240, 255, 0.06);
  border-color: rgba(0, 240, 255, 0.4);
  transform: translateY(-2px);
}

.cs-article-card__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #f3f4f6;
  line-height: 1.45;
  margin-bottom: 12px;
}

.cs-article-card__link {
  font-size: 0.8rem;
  color: #00f0ff;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Block 9: Support & Courses */
.cs-support-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.cs-support-box__badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: #b026ff;
  padding: 3px 10px;
  background: rgba(176, 38, 255, 0.12);
  border: 1px solid rgba(176, 38, 255, 0.3);
  border-radius: 9999px;
  display: inline-block;
  margin-bottom: 8px;
}

.cs-support-box__title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}

.cs-support-box__desc {
  font-size: 0.9rem;
  color: #9ca3af;
  line-height: 1.6;
  margin-bottom: 16px;
}

.cs-support-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.cs-support-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f3f4f6;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.cs-support-link-item:hover {
  border-color: rgba(176, 38, 255, 0.4);
  background: rgba(176, 38, 255, 0.05);
}

.cs-direct-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  border-radius: 10px;
  background: linear-gradient(135deg, #00f0ff 0%, #0099ff 100%);
  color: #0b0f19;
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 240, 255, 0.3);
}

.cs-direct-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 240, 255, 0.45);
}

/* Philosophy Banner */
.cs-philosophy-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 24px;
  margin-top: 32px;
  margin-bottom: 32px;
  text-align: center;
}

.cs-philosophy-card__title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #00f0ff;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.cs-philosophy-card__text {
  font-size: 0.95rem;
  color: #d1d5db;
  line-height: 1.7;
  max-width: 720px;
  margin: 0 auto;
}
