
:root {
  --primary-color: #4B8BBE;
  --secondary-color: #306998;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --background-color: #f8fafc;
  --card-background: #ffffff;
  --text-primary: #2d3748;
  --text-secondary: #718096;
  --border-radius: 12px;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
  
  /* Level color themes */
  --level1-color: #ffc107; /* Blue */
  --level2-color: #10B981; /* Green */
  --level3-color: #07a4ff; /* Orange */
  --level4-color: #EF4444; /* Red */
  --level5-color: #8B5CF6; /* Purple */
  --level6-color: #EC4899; /* Pink */
  --level7-color: #06B6D4; /* Cyan */
}

* {
  box-sizing: border-box;
}

a {
  text-decoration: none;
  color: inherit;
}

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
  background: linear-gradient(135deg, var(--background-color) 0%, #e2e8f0 100%);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

header {
  text-align: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 3rem 1rem 2rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  pointer-events: none;
}

header h1 {
  margin: 0 0 0.5rem 0;
  font-size: 2.5rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

header p {
  margin: 0;
  font-size: 1.1rem;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

.roadmap-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1rem;
}

.progress-header {
  background: var(--card-background);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  text-align: center;
}

.progress-bar {
  background: #e2e8f0;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  margin: 1rem 0;
}

.progress-fill {
  background: linear-gradient(90deg, var(--success-color), #34d058);
  height: 100%;
  width: 0%;
  transition: width 0.5s ease;
  border-radius: 6px;
}

.progress-text {
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.roadmap {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.step {
  background: var(--card-background);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  border: 2px solid #e2e8f0;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.step::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: var(--warning-color);
  transition: all 0.3s ease;
}

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

.step-number {
  background: var(--warning-color);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

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

/* Level 1 - Essentials */
.step[data-step="1"] .step-number,
.step[data-step="2"] .step-number,
.step[data-step="3"] .step-number,
.step[data-step="4"] .step-number,
.step[data-step="5"] .step-number {
  background: var(--level1-color);
}

.step[data-step="1"]::before,
.step[data-step="2"]::before,
.step[data-step="3"]::before,
.step[data-step="4"]::before,
.step[data-step="5"]::before {
  background: var(--level1-color);
}

/* Level 2 - Modularity */
.step[data-step="6"] .step-number,
.step[data-step="7"] .step-number {
  background: var(--level2-color);
}

.step[data-step="6"]::before,
.step[data-step="7"]::before {
  background: var(--level2-color);
}

/* Level 3 - Basic Data Structures */
.step[data-step="8"] .step-number {
  background: var(--level3-color);
}

.step[data-step="8"]::before {
  background: var(--level3-color);
}

/* Level 4 - Advanced Operators (no data-step values, using class-based targeting) */
.level-title:nth-of-type(4) ~ .step:nth-of-type(-n+4) .step-number {
  background: var(--level4-color);
}

.level-title:nth-of-type(4) ~ .step:nth-of-type(-n+4)::before {
  background: var(--level4-color);
}

/* Level 5 - Modules (continuing sequence) */
.level-title:nth-of-type(5) ~ .step .step-number {
  background: var(--level5-color);
}

.level-title:nth-of-type(5) ~ .step::before {
  background: var(--level5-color);
}

/* Level 6 - Random Module */
.level-title:nth-of-type(6) ~ .step .step-number {
  background: var(--level6-color);
}

.level-title:nth-of-type(6) ~ .step::before {
  background: var(--level6-color);
}

/* Level 7 - Math Module */
.level-title:nth-of-type(7) ~ .step .step-number {
  background: var(--level7-color);
}

.level-title:nth-of-type(7) ~ .step::before {
  background: var(--level7-color);
}

/* Level 8 - DateTime Module */
.level-title:nth-of-type(8) ~ .step .step-number {
  background: var(--level1-color); /* Cycling back to first color */
}

.level-title:nth-of-type(8) ~ .step::before {
  background: var(--level1-color);
}

.step.completed .step-number::after {
  content: '✓';
  font-size: 1.2rem;
}

.step-content {
  flex: 1;
}

.step-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  transition: all 0.3s ease;
}

.step.completed .step-title {
  text-decoration: line-through;
  color: var(--text-secondary);
}

.step-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0.25rem 0 0 0;
}

.step:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-color);
}

.step.completed {
  background: #f0fff4;
  border-color: var(--success-color);
}

.step.completed:hover {
  background: #e6fffa;
}

.difficulty-badge {
  background: #e2e8f0;
  color: var(--text-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-left: auto;
}

.difficulty-beginner {
  background: #dcfce7;
  color: #166534;
}

.difficulty-intermediate {
  background: #fef3c7;
  color: #92400e;
}

.difficulty-advanced {
  background: #fee2e2;
  color: #991b1b;
}

.level-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2rem 0 1rem 0;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: var(--border-radius);
  border-left: 6px solid var(--primary-color);
  box-shadow: var(--shadow);
}

@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }
  
  .roadmap-container {
    margin: 1rem auto;
    padding: 0.5rem;
  }
  
  .step {
    padding: 1rem;
  }
  
  .step-number {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }
  
  .level-title {
    font-size: 1.1rem;
    margin: 1.5rem 0 0.75rem 0;
    padding: 0.5rem 0.75rem;
  }
}
