/* CSS Variables for Easy Customization */
:root {
  --primary-color: #6366f1;
  --secondary-color: #8b5cf6;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --dark-color: #1f2937;
  --light-bg: #f8fafc;
  --gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--light-bg);
  color: var(--dark-color);
  line-height: 1.6;
  padding-top: 76px; /* Account for fixed navbar */
}

/* Navigation Styles */
.navbar {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  background: var(--gradient-bg);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.navbar-brand:hover {
  -webkit-text-fill-color: transparent;
}

.nav-link {
  font-weight: 500;
  color: var(--dark-color) !important;
  transition: color 0.3s ease;
  padding: 0.5rem 1rem !important;
}

.nav-link:hover {
  color: var(--primary-color) !important;
}

.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* Hero Section */
.hero {
  background: var(--gradient-bg);
  color: white;
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.05"><circle cx="7" cy="7" r="1"/></g></svg>') repeat;
  animation: float 20s infinite linear;
}

@keyframes float {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-60px); }
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero p {
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 600px;
}

.btn-hero {
  background: white;
  color: var(--primary-color);
  padding: 15px 35px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  border: none;
}

.btn-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  color: var(--primary-color);
}

.btn-hero:focus {
  outline: 2px solid white;
  outline-offset: 2px;
}

/* Card Styles */
.learning-card {
  background: white;
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: none;
  overflow: hidden;
  position: relative;
  height: 100%;
}

.learning-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-bg);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  z-index: 1;
}

.learning-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.learning-card:hover::before {
  transform: scaleX(1);
}

.card-body {
  padding: 1.5rem;
  position: relative;
  z-index: 2;
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--gradient-bg);
  color: white;
  flex-shrink: 0;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 0.75rem;
}

/* Level Badges */
.level-badge {
  padding: 6px 16px;
  border-radius: 25px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
}

.badge-beginner {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.badge-intermediate {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.badge-advanced {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

/* Progress Section */
.progress-section {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: var(--card-shadow);
  margin: 2rem 0;
}

.progress {
  height: 12px;
  border-radius: 10px;
  background: #e5e7eb;
  overflow: hidden;
}

.progress-bar {
  background: var(--gradient-bg);
  border-radius: 10px;
  transition: width 0.6s ease;
}

/* Accordion Styles */
.accordion {
  --bs-accordion-border-width: 0;
}

.accordion-button {
  background: #f8fafc !important;
  border: none !important;
  border-radius: 10px !important;
  font-weight: 500;
  box-shadow: none !important;
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
}

.accordion-button:not(.collapsed) {
  background: var(--primary-color) !important;
  color: white !important;
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.25) !important;
}

.accordion-button::after {
  filter: invert(1);
}

.accordion-button:not(.collapsed)::after {
  filter: invert(1);
}

.accordion-item {
  border: none;
  margin-bottom: 0.5rem;
}

.accordion-body {
  background: #f8fafc;
  border-radius: 0 0 10px 10px;
  padding: 1rem;
  border-top: 1px solid #e5e7eb;
}

/* Button Styles */
.btn-complete {
  background: transparent;
  border: 2px solid var(--success-color);
  color: var(--success-color);
  border-radius: 25px;
  padding: 8px 20px;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 0.85rem;
}

.btn-complete:hover, 
.btn-complete.completed {
  background: var(--success-color) !important;
  color: white !important;
  transform: scale(1.05);
  border-color: var(--success-color);
}

.btn-learn {
  background: var(--gradient-bg);
  color: white;
  border: none;
  border-radius: 25px;
  padding: 8px 20px;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 0.85rem;
}

.btn-learn:hover {
  transform: translateX(5px);
  color: white;
  opacity: 0.9;
}

/* Statistics Cards */
.stats {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s ease;
  height: 100%;
}

.stats:hover {
  transform: translateY(-5px);
}

.stats h3 {
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--gradient-bg);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.stats p {
  font-weight: 500;
  color: #6b7280;
  margin: 0;
  font-size: 0.9rem;
}

/* List Styling */
.list-unstyled li {
  padding: 0.25rem 0;
  font-size: 0.9rem;
}

/* Footer */
.footer {
  background: var(--dark-color);
  color: #9ca3af;
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.footer h5 {
  color: white;
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer a {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: var(--primary-color);
}

.footer .list-unstyled li {
  margin-bottom: 0.5rem;
}

.footer hr {
  border-color: #374151 !important;
  opacity: 1;
}

/* Social Icons */
.footer .d-flex a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.footer .d-flex a:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sparkle {
  0% { 
    transform: scale(0) rotate(0deg); 
    opacity: 1; 
  }
  50% { 
    transform: scale(1.2) rotate(180deg); 
    opacity: 1; 
  }
  100% { 
    transform: scale(0) rotate(360deg); 
    opacity: 0; 
  }
}

@keyframes confetti {
  0% { 
    transform: translateY(-100vh) rotate(0deg);
    opacity: 1;
  }
  100% { 
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

@keyframes pulse {
  0%, 100% { 
    transform: scale(1); 
  }
  50% { 
    transform: scale(1.05); 
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

.learning-card {
  opacity: 1;
  transform: translateY(0);
}

.stats {
  opacity: 1;
  transform: translateY(0);
}

/* Utility Classes */
.text-gradient {
  background: var(--gradient-bg);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient {
  background: var(--gradient-bg);
}

/* Section Spacing */
section {
  position: relative;
}

.py-5 {
  padding: 4rem 0;
}

/* Level Headers */
.d-flex.align-items-center h3 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}

/* Features Section */
#features {
  background: white;
  position: relative;
}

#features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 49%, rgba(99, 102, 241, 0.02) 50%, transparent 51%);
}

#features .container {
  position: relative;
  z-index: 2;
}

#features .card-icon {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-color);
}

#features h5 {
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--dark-color);
}

/* Tools Section */
.tools-section {
  background: linear-gradient(135deg, #f8fafc 0%, #e5e7eb 100%);
}

.tools-section .stats {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tools-section .stats:hover {
  background: white;
  transform: translateY(-5px) scale(1.05);
}

/* Call to Action Section */
.bg-dark {
  background: var(--dark-color) !important;
}

.btn-light {
  border-radius: 50px;
  padding: 12px 30px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-outline-light {
  border-radius: 50px;
  padding: 12px 30px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-light:hover,
.btn-outline-light:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* Modal Styles */
.modal-content {
  border-radius: 20px !important;
  border: none !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3) !important;
}

.modal-body {
  padding: 3rem !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .card-icon {
    width: 55px;
    height: 55px;
    font-size: 1.3rem;
  }
}

@media (max-width: 992px) {
  body {
    padding-top: 70px;
  }
  
  .hero {
    padding: 60px 0 40px;
    min-height: 60vh;
  }
  
  .hero h1 {
    font-size: 3rem;
  }
  
  .card-icon {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  
  .py-5 {
    padding: 3rem 0;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 65px;
  }
  
  .hero {
    padding: 50px 0 30px;
    min-height: 50vh;
    text-align: center;
  }
  
  .hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }
  
  .hero p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
  }
  
  .btn-hero {
    padding: 12px 30px;
    font-size: 0.9rem;
  }
  
  .learning-card {
    margin-bottom: 2rem;
  }
  
  .stats h3 {
    font-size: 2rem;
  }
  
  .d-flex.align-items-center {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .d-flex.align-items-center h3 {
    font-size: 1.75rem;
  }
  
  .py-5 {
    padding: 2.5rem 0;
  }
  
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (max-width: 576px) {
  body {
    padding-top: 60px;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .btn-hero {
    padding: 10px 25px;
    font-size: 0.85rem;
  }
  
  .card-icon {
    width: 45px;
    height: 45px;
    font-size: 1rem;
  }
  
  .level-badge {
    font-size: 0.65rem;
    padding: 4px 12px;
  }
  
  .card-body {
    padding: 1.25rem;
  }
  
  .stats {
    padding: 1.25rem;
  }
  
  .stats h3 {
    font-size: 1.75rem;
  }
  
  .d-flex.gap-3 {
    flex-direction: column;
    gap: 1rem !important;
  }
  
  .btn-lg {
    width: 100%;
  }
}

/* Loading States */
.loading {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s infinite linear;
  z-index: 10;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Interactive States */
.card-body:hover .btn-learn {
  background: linear-gradient(135deg, #5b21b6, #7c3aed);
}

.card-body:hover .btn-complete:not(.completed) {
  border-color: #059669;
  color: #059669;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

/* Focus States for Accessibility */
.btn:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.accordion-button:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.nav-link:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .navbar,
  .btn,
  .footer {
    display: none !important;
  }
  
  .learning-card {
    break-inside: avoid;
    margin-bottom: 1rem;
  }
  
  .hero {
    background: none !important;
    color: black !important;
    padding: 1rem 0 !important;
  }
  
  body {
    padding-top: 0 !important;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: more) {
  .learning-card {
    border: 2px solid var(--dark-color);
  }
  
  .btn-complete {
    border-width: 3px;
  }
  
  .level-badge {
    border: 2px solid white;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .hero::before {
    animation: none;
  }
}

/* Animation Classes for Scroll Effects */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-color-scheme: dark) {
  body.dark-theme {
    background: #111827;
    color: #f9fafb;
  }
  
  body.dark-theme .learning-card {
    background: #1f2937;
    color: #f9fafb;
  }
  
  body.dark-theme .navbar {
    background: rgba(31, 41, 55, 0.95) !important;
  }
  
  body.dark-theme .footer {
    background: #000;
  }
}