:root {
  --primary-color: #4f46e5;
  --primary-dark: #4338ca;
  --secondary-color: #06b6d4;
  --background-color: #f8fafc;
  --card-background: #ffffff;
  --text-color: #1e293b;
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;

}

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

header {
  background: rgba(22, 33, 62, 0.98);
  backdrop-filter: blur(15px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.logo {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(45deg, #00b4d8, #90e0ef);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: logo-glow 3s ease-in-out infinite;
}

.logo::before {
  content: '⚙️';
  font-size: 1.8rem;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: #e6f1ff;
  font-weight: 500;
  position: relative;
  font-size: 1.05rem;
  transition: all 0.3s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 0;
  height: 3px;
  background: #90e0ef;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a:hover {
  color: #90e0ef;
  transform: translateY(-2px);
}

.dropdown {
  position: relative;
  text-align: center;
}

.dropdown-content {
  list-style: none;
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(22, 33, 62, 0.98);
  backdrop-filter: blur(15px);
  border-radius: 12px;
  padding: 1rem 0;
  min-width: 220px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 999;
}

/* Show dropdown on hover for desktop */
.dropdown:hover .dropdown-content {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-content a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.8rem 1.5rem;
  margin: 0 0.5rem;
  color: #e6f1ff;
  transition: all 0.2s ease;
  border-radius: 8px;
  font-size: 0.95rem;
}

.dropdown-content a:hover {
  background: rgba(144, 224, 239, 0.05);
  transform: translateX(8px);
}

@keyframes logo-glow {
  0% {
    text-shadow: 0 0 10px rgba(144, 224, 239, 0.4);
  }

  50% {
    text-shadow: 0 0 20px rgba(144, 224, 239, 0.6);
  }

  100% {
    text-shadow: 0 0 10px rgba(144, 224, 239, 0.4);
  }
}


@media (max-width: 1024px) {
  .menu-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
  }

  .menu-toggle span {
    display: block;
    width: 28px;
    height: 2px;
    background: #e6f1ff;
    margin: 6px 0;
    transition: 0.4s;
    border-radius: 2px;
  }

  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 6px);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -6px);
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(22, 33, 62, 0.98);
    backdrop-filter: blur(15px);
    padding: 2rem;
    gap: 2rem;
  }

  .nav-links.active {
    display: flex;
  }

  .dropdown-content {
    position: static;
    width: 100%;
    margin-top: 1rem;
    box-shadow: none;
    padding: 0;
    transform: none;
    background: transparent;
  }

  .dropdown-content a {
    padding: 1rem 1.5rem;
    margin: 0;
  }

  .dropdown-content a:hover {
    background: rgba(144, 224, 239, 0.1);
    transform: translateX(10px);
  }
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 9rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('https://images.unsplash.com/photo-1517134191118-9d595e4c8c2b?ixlib=rb-1.2.1&auto=format&fit=crop&w=2850&q=80') center/cover;
  opacity: 0.1;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.search-bar {
  display: flex;
  max-width: 600px;
  margin: 0 auto 2rem;
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.search-bar input {
  flex: 1;
  padding: 1rem 1.5rem;
  border: none;
  font-size: 1rem;
  outline: none;
}

.search-bar button {
  padding: 0 1.5rem;
  background: var(--primary-color);
  color: white;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.search-bar button:hover {
  background: var(--primary-dark);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3rem;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
}

.stat-label {
  font-size: 0.875rem;
  opacity: 0.9;
}

/* Filters Section */
.filters-section {
  margin: 4rem 0 2rem;
  text-align: center;
}

.filters-section h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--text-color);
}

.filters {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 250px;
}

.filter-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
}

.filter-group label i {
  color: var(--primary-color);
}

select {
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
  border: 1px solid #e2e8f0;
  font-size: 1rem;
  cursor: pointer;
  background-color: white;
  transition: var(--transition);
}

select:hover {
  border-color: var(--primary-color);
}

/* Tutorial Cards */
#tutorials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.tutorial-card {
  background: var(--card-background);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
}

.tutorial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.tutorial-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.tutorial-content h3 {
  color: var(--text-color);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.tutorial-content p {
  color: #64748b;
  font-size: 0.95rem;
}

.tutorial-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  padding-top: 1rem;
}

.tutorial-link:hover {
  color: var(--primary-dark);
}

/* Article Section Styles */
.challenge-article {
  margin-top: 3rem;
  padding: 2rem;
  background: #f8fafc;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.challenge-article h2 {
  font-size: 2rem;
  color: #1f2937;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
  padding-bottom: 1rem;
}

.challenge-article h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: #4f46e5;
  border-radius: 2px;
}

.challenge-article section {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
}

.challenge-article h3 {
  font-size: 1.25rem;
  color: #1f2937;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.challenge-article h3::before {
  content: '';
  display: block;
  width: 4px;
  height: 24px;
  background: #4f46e5;
  border-radius: 2px;
}

.challenge-article p {
  color: #4b5563;
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* Global List Styles */
article ul, article ol {
    list-style: none;
    margin: 1rem 0;
    padding-left: 0;
}

article ul li {
    color: #4b5563;
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

article ul li::before {
    content: '→';
    color: #4f46e5;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

article ol {
    counter-reset: item;
}

article ol li {
    color: #4b5563;
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

article ol li::before {
    content: counter(item) ".";
    counter-increment: item;
    color: #4f46e5;
    position: absolute;
    left: 0;
}


/* Related Pages Section */
.related-pages {
  margin: 4rem 0;
  padding: 2rem;
  background: #f8fafc;
  border-radius: 16px;
}

.related-pages h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: #0f172a;
}

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

.page-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  text-decoration: none;
  color: #1e293b;
  transition: all 0.3s ease;
  border: 1px solid #e2e8f0;
}

.page-link:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.page-link i {
  font-size: 2rem;
  color: #0ea5e9;
  margin-bottom: 1rem;
}

.page-link h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

.page-link p {
  font-size: 0.875rem;
  color: #64748b;
  text-align: center;
}



/* Footer Styles */
.main-footer {
  background-color: #1e293b;
  color: #e2e8f0;
  padding: 4rem 0 0;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  padding-bottom: 3rem;
}

.footer-section h3 {
  color: white;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.footer-section p {
  line-height: 1.6;
  opacity: 0.8;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 0.75rem;
}

.footer-section ul li a {
  color: #e2e8f0;
  text-decoration: none;
  transition: color 0.3s ease;
  opacity: 0.8;
}

.footer-section ul li a:hover {
  color: #60a5fa;
  opacity: 1;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  color: #e2e8f0;
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

.social-link:hover {
  color: #60a5fa;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem 0;
  text-align: center;
}

.footer-bottom p {
  opacity: 0.8;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
  }

  .footer-section {
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }

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

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

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

  .hero-stats {
    flex-direction: column;
    gap: 2rem;
  }

  .filters {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group {
    width: 100%;
  }

  #tutorials-grid {
    grid-template-columns: 1fr;
  }
}