/* Dashboard Styles for MDN JavaScript Skill Tests */

.dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.hero {
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 3rem 2rem;
  border-radius: 10px;
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.module-card {
  background: white;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.module-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.module-card.completed {
  border-color: #4caf50;
  background: linear-gradient(135deg, #f0fff4 0%, #e8f5e8 100%);
}

.module-card.in-progress {
  border-color: #ff9800;
  background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
}

.module-card.not-started {
  border-color: #9e9e9e;
  background: #f9f9f9;
}

.module-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.module-icon {
  font-size: 2rem;
  margin-right: 1rem;
}

.module-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
}

.module-description {
  color: #666;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.module-status {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.status-completed {
  background: #4caf50;
  color: white;
}

.status-in-progress {
  background: #ff9800;
  color: white;
}

.status-not-started {
  background: #9e9e9e;
  color: white;
}

.module-link {
  display: inline-block;
  background: #007bff;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease;
}

.module-link:hover {
  background: #0056b3;
}

.module-link.disabled {
  background: #ccc;
  cursor: not-allowed;
  pointer-events: none;
}

.progress-section {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 3rem;
}

.progress-bar {
  width: 100%;
  height: 20px;
  background: #f0f0f0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4caf50, #81c784);
  transition: width 0.3s ease;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  text-align: center;
}

.stat-item {
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  color: #007bff;
}

.stat-label {
  color: #666;
  font-size: 0.9rem;
}

.resources-section {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.resource-link {
  display: block;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  text-decoration: none;
  color: #007bff;
  transition: all 0.3s ease;
}

.resource-link:hover {
  background: #e9ecef;
  transform: translateX(5px);
}

footer {
  position: relative;
  margin-top: 3rem;
  text-align: center;
  color: #666;
  padding: 2rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-top: 1px solid #dee2e6;
  border-radius: 10px 10px 0 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

footer p {
  margin: 0.5rem 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

footer p:first-child {
  font-weight: 600;
  color: #495057;
  font-size: 1rem;
}

footer p:last-child {
  font-size: 0.9rem;
  color: #6c757d;
}

footer a {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  padding: 2px 4px;
  border-radius: 4px;
}

footer a:hover {
  color: #0056b3;
  background-color: rgba(0, 123, 255, 0.1);
  transform: translateY(-1px);
}

footer a:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

footer a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #007bff, #0056b3);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

footer a:hover::after {
  width: 100%;
}

#last-updated {
  font-weight: 500;
  color: #495057;
}

/* Responsive Design */
@media (max-width: 768px) {
  .dashboard {
    padding: 1rem;
  }

  .hero {
    padding: 2rem 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .modules-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .module-card {
    padding: 1.5rem;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  footer {
    padding: 1.5rem 1rem;
  }

  footer p {
    font-size: 0.85rem;
  }

  footer p:first-child {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.5rem;
  }

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

  .stat-number {
    font-size: 1.5rem;
  }

  footer p {
    line-height: 1.8;
  }

  footer p:last-child {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }
}
