/**
 * Progress Visualization Styles
 * Skills radar chart, learning path map, time stats
 */

/* ============================================ */
/* Skills Radar Chart */
/* ============================================ */

.skills-radar-container {
  background: var(--bg-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 2rem;
  margin: 2rem 0;
}

.skills-radar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.skills-radar-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#skillsRadarChart {
  max-width: 500px;
  max-height: 500px;
  margin: 0 auto;
}

/* ============================================ */
/* Skills Breakdown List */
/* ============================================ */

.skills-breakdown {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.skill-name {
  font-weight: 600;
  color: var(--text);
  font-size: 1rem;
}

.skill-progress-text {
  font-weight: 700;
  color: var(--brand);
  font-size: 1.1rem;
}

.skill-progress-bar {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.skill-progress-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.skill-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.skill-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ============================================ */
/* Time Stats Display */
/* ============================================ */

.time-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.time-stat {
  background: linear-gradient(135deg, rgba(91, 138, 255, 0.1), rgba(118, 221, 255, 0.1));
  border: 1px solid rgba(91, 138, 255, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.time-stat:hover {
  transform: translateY(-4px);
  border-color: rgba(91, 138, 255, 0.4);
  box-shadow: 0 8px 24px rgba(91, 138, 255, 0.15);
}

.time-stat-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.time-stat-value {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #5b8aff, #76ddff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.25rem;
}

.time-stat-label {
  font-size: 0.9rem;
  color: var(--muted);
}

.percentile-display {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(236, 72, 153, 0.15));
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.percentile-icon {
  font-size: 1.5rem;
}

/* ============================================ */
/* Learning Path Map */
/* ============================================ */

.learning-path-container {
  background: var(--bg-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 2rem;
  margin: 2rem 0;
}

.learning-path-header {
  margin-bottom: 2rem;
}

.learning-path-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.learning-path-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
}

.learning-path-tier {
  margin-bottom: 3rem;
}

.learning-path-tier:last-child {
  margin-bottom: 0;
}

.tier-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.tier-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tier-progress-text {
  font-size: 0.9rem;
  color: var(--muted);
}

.tier-locked-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--muted);
}

.lesson-path {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  position: relative;
}

.lesson-node {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 3px solid transparent;
}

.lesson-node.completed {
  background: linear-gradient(135deg, #5b8aff, #76ddff);
  color: #fff;
  box-shadow: 0 4px 12px rgba(91, 138, 255, 0.3);
}

.lesson-node.current {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  border-color: #fff;
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.5);
  animation: pulse 2s infinite;
}

.lesson-node.locked {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.5;
}

.lesson-node:not(.locked):hover {
  transform: scale(1.15);
  box-shadow: 0 6px 20px rgba(91, 138, 255, 0.4);
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.5);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(168, 85, 247, 0.7);
  }
}

.lesson-node-tooltip {
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.95);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 1000;
  border: 1px solid rgba(91, 138, 255, 0.5);
}

.lesson-node:hover .lesson-node-tooltip {
  opacity: 1;
}

.lesson-node-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.95);
}

.current-position-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(236, 72, 153, 0.15));
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text);
}

/* ============================================ */
/* Responsive Design */
/* ============================================ */

@media (max-width: 768px) {
  .skills-radar-container,
  .learning-path-container {
    padding: 1.5rem 1rem;
  }

  #skillsRadarChart {
    max-width: 100%;
    max-height: 350px;
  }

  .time-stats-grid {
    grid-template-columns: 1fr;
  }

  .lesson-node {
    width: 40px;
    height: 40px;
    font-size: 0.8rem;
  }

  .tier-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .percentile-display {
    font-size: 1rem;
    padding: 0.75rem 1rem;
  }
}

@media (max-width: 480px) {
  .lesson-node {
    width: 36px;
    height: 36px;
    font-size: 0.75rem;
  }

  .skills-radar-title,
  .learning-path-title {
    font-size: 1.25rem;
  }

  .tier-title {
    font-size: 1rem;
  }
}
