/* Base Styles */
:root {
  --primary-color: #007bff;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --dark-color: #1a1a1a;
  --light-color: #f8f9fa;
  --text-color: #212529;
  --text-muted: #6c757d;
  --border-color: #dee2e6;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --card-bg: #ffffff;
  --header-bg: #ffffff;
  --footer-bg: #f8f9fa;
  --stat-bg: rgba(0, 123, 255, 0.1);
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --transition: all 0.3s ease;
  --border-radius: 8px;
  --card-shadow: 0 4px 6px var(--shadow-color);
}

.dark-theme {
  --primary-color: #4dabf7;
  --secondary-color: #adb5bd;
  --dark-color: #f8f9fa;
  --light-color: #343a40;
  --text-color: #e9ecef;
  --text-muted: #adb5bd;
  --border-color: #495057;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --card-bg: #2b3035;
  --header-bg: #212529;
  --footer-bg: #212529;
  --stat-bg: rgba(77, 171, 247, 0.2);
}

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

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-color);
  transition: var(--transition);
  overflow-x: hidden;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: #0056b3;
}

h1, h2, h3, h4, h5, h6 {
  margin-bottom: 0.5em;
  font-weight: 600;
  line-height: 1.2;
}

p {
  margin-bottom: 1rem;
}

img {
  max-width: 100%;
  height: auto;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-block;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: var(--border-radius);
  transition: var(--transition);
  cursor: pointer;
}

.btn-primary {
  color: #fff;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: #0069d9;
  border-color: #0062cc;
  color: #fff;
}

.btn-secondary {
  color: #fff;
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.btn-secondary:hover {
  background-color: #5a6268;
  border-color: #545b62;
  color: #fff;
}

/* Header Styles */
.header {
  background-color: var(--header-bg);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px var(--shadow-color);
  transition: var(--transition);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-image {
  width: 40px;
  height: 40px;
}

.logo h1 {
  font-size: 1.5rem;
  margin-bottom: 0;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-color);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

.nav-links a:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

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

.github-link {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-color);
}

.theme-toggle {
  cursor: pointer;
  margin-left: 1rem;
  font-size: 1.2rem;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  margin-left: 1rem;
}

.mobile-menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  border-radius: 3px;
  transition: var(--transition);
}

/* Hero Section */
.hero {
  padding: 120px 0 80px;
  background: linear-gradient(135deg, rgba(0, 123, 255, 0.1) 0%, rgba(0, 123, 255, 0.05) 100%);
}

.hero .container {
  display: flex;
  align-items: center;
  gap: 40px;
}

.hero-content {
  flex: 1;
}

.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--secondary-color);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  border-radius: var(--border-radius);
  background-color: var(--stat-bg);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
}

.hero-image img {
  max-width: 100%;
  height: auto;
}

/* Section Styles */
section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* About Section */
.about-content {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.about-mission, .about-focus {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 2rem;
}

.about-mission h3, .about-focus h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

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

.card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  height: 100%;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px var(--shadow-color);
}

.card-icon {
  margin-bottom: 1rem;
  font-size: 2rem;
  color: var(--primary-color);
}

.card h4 {
  margin-bottom: 0.5rem;
}

/* Categories Overview Section */
.categories-visualization {
  max-width: 800px;
  margin: 0 auto 2rem;
  height: 400px;
}

.categories-description {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

/* Resources Section */
.resources-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.search-bar {
  flex: 1;
  position: relative;
  min-width: 250px;
}

.search-bar input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background-color: var(--card-bg);
  font-size: 1rem;
  color: var(--text-color);
}

.search-bar i {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.filter-options select {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background-color: var(--card-bg);
  font-size: 1rem;
  color: var(--text-color);
  cursor: pointer;
}

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

.resource-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.resource-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px var(--shadow-color);
}

.resource-card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.resource-icon {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.resource-title {
  flex: 1;
}

.resource-title h3 {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.resource-category {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.resource-description {
  margin-bottom: 1rem;
  flex: 1;
}

.resource-link {
  display: inline-block;
  margin-top: auto;
  color: var(--primary-color);
  font-weight: 500;
}

.warning-message {
  background-color: rgba(255, 193, 7, 0.2);
  border-left: 4px solid #ffc107;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: var(--border-radius);
}

.warning-message p {
  margin: 0;
  color: #856404;
  display: flex;
  align-items: center;
}

.warning-message i {
  margin-right: 0.5rem;
  font-size: 1.2rem;
}

.error-message {
  background-color: rgba(220, 53, 69, 0.1);
  border-left: 4px solid #dc3545;
  padding: 1rem;
  margin: 2rem 0;
  border-radius: var(--border-radius);
}

.error-message p {
  margin: 0;
  color: #721c24;
  display: flex;
  align-items: center;
}

.error-message i {
  margin-right: 0.5rem;
  font-size: 1.2rem;
}

/* Loading animation */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(0, 123, 255, 0.2);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

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

/* Contribute Section */
.contribute-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.step {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  position: relative;
  text-align: center;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  font-weight: bold;
  margin: 0 auto 1rem;
}

.contribute-cta {
  text-align: center;
}

/* Community Section */
.contributors-visualization {
  max-width: 800px;
  margin: 0 auto 2rem;
  height: 400px;
}

.community-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
}

/* Footer */
.footer {
  background-color: var(--footer-bg);
  padding: 4rem 0 2rem;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
  min-width: 200px;
}

.footer-logo img {
  width: 40px;
  height: 40px;
  margin-bottom: 0.5rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  flex: 2;
}

.footer-link-group {
  min-width: 120px;
}

.footer-link-group h4 {
  margin-bottom: 1rem;
  font-size: 1rem;
}

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

.footer-link-group li {
  margin-bottom: 0.5rem;
}

.footer-link-group a {
  color: var(--text-muted);
}

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

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
}

/* Media Queries */
@media (max-width: 992px) {
  .hero .container {
    flex-direction: column;
  }
  
  .hero-content {
    text-align: center;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .contribute-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .navbar {
    position: relative;
  }
  
  .nav-links {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--header-bg);
    padding: 1rem;
    gap: 0.5rem;
    box-shadow: 0 4px 6px var(--shadow-color);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
  }
  
  .nav-links.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .contribute-steps {
    grid-template-columns: 1fr;
  }
  
  .community-stats {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }
}

@media (max-width: 576px) {
  .hero-stats {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .stat {
    width: 100%;
    max-width: 250px;
  }
  
  .section-header h2 {
    font-size: 1.75rem;
  }
  
  .about-cards {
    grid-template-columns: 1fr;
  }
}
