/* Professional CSS Tutorial - Global Styles */
:root {
  --primary-color: #2563eb;
  --secondary-color: #64748b;
  --accent-color: #0ea5e9;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --light-bg: #f8fafc;
  --border-color: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --code-bg: #1e293b;
  --font-mono: 'Fira Code', 'Monaco', 'Courier New', monospace;
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  margin: 0;
  background: #fff;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  padding: 2rem 0;
  text-align: center;
}

.site-header h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 700;
}

.site-header .subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-top: 0.5rem;
}

/* Navigation */
.nav-tabs {
  display: flex;
  background: white;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 2rem;
  overflow-x: auto;
}

.nav-tab {
  padding: 1rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 3px solid transparent;
}

.nav-tab:hover {
  background: var(--light-bg);
  color: var(--primary-color);
}

.nav-tab.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  font-weight: 600;
}

/* Cards Layout */
.lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.lesson-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
}

.lesson-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.lesson-number {
  position: absolute;
  top: -10px;
  left: 20px;
  background: var(--primary-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.lesson-card h3 {
  margin: 1rem 0 0.5rem;
  color: var(--text-primary);
  font-size: 1.25rem;
}

.lesson-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-secondary);
}

.difficulty {
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.difficulty.beginner { background: #dcfce7; color: #166534; }
.difficulty.intermediate { background: #fef3c7; color: #92400e; }
.difficulty.advanced { background: #fee2e2; color: #991b1b; }

.lesson-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn {
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  font-size: 0.9rem;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
}

/* Progress Indicator */
.progress-section {
  background: var(--light-bg);
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 3rem;
}

.progress-bar {
  background: #e2e8f0;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  background: linear-gradient(90deg, var(--success-color), var(--primary-color));
  height: 100%;
  width: 0%;
  transition: width 0.5s ease;
}

/* Footer */
.site-footer {
  background: var(--text-primary);
  color: white;
  padding: 2rem 0;
  text-align: center;
  margin-top: 4rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .site-header h1 {
    font-size: 2rem;
  }
  
  .lesson-grid {
    grid-template-columns: 1fr;
  }
  
  .nav-tabs {
    justify-content: flex-start;
  }
  
  .lesson-actions {
    flex-direction: column;
  }
}

/* Code Blocks */
code {
  font-family: var(--font-mono);
  background: #f1f5f9;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
}

pre {
  background: var(--code-bg);
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  font-family: var(--font-mono);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.6s ease-out;
}