/* Apply basic styling to the entire page */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

/* Style the header section */
header {
  background-color: #e1e4bc;
  color: #333;
  padding: 20px 0;
  text-align: center;
}


/* Main container that holds all sections */
.container {
    width: 80%;
    margin: 20px auto;
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}


/* Add spacing between individual sections */
.container div {
    margin-bottom: 20px;
}

/* Make the layout responsive on smaller screens */
@media (max-width: 768px) {
    .container {
        width: 95%;
    }
}

form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}


input, textarea, button {
  font: inherit;  /* Use the same font as the rest of the page */
  padding: 10px;
}

button {
  background-color: #333;
  color: #fff;
  border: none;
  cursor: pointer;
}

/* Style project images */
.project img {
    width: 100%;
    max-width: 300px;
    border-radius: 5px;
}

/* Makes widths and padding behave correctly on all elements */
* {
  box-sizing: border-box;
}

/* Prevent any horizontal scrolling on mobile */
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.project-button {
  background-color: #333;
  color: #fff;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  margin-top: 10px;
}

.project-details {
  margin-top: 10px;
  display: none; /* Initially hide the project details */
}

/* Dark mode styles */
.dark-mode {
  background-color: #121212;
  color: #fff;
}
.dark-mode .container {
  background-color: #1e1e1e;
}
.dark-mode .project-button {
  background-color: #555;
}
.dark-mode .project-details {
  color: #ccc;
}
.dark-mode header {
  background-color: #333;
  color: #fff;
}
.dark-mode .filter-btn {
    color: #9d5cf6;
    border-color: #9d5cf6;
}

.dark-mode #sort-btn {
    color: #9d5cf6;
    border-color: #9d5cf6;
}

.dark-mode .repo-card {
    border-color: #9d5cf6;
}

.dark-mode .repo-card a {
    color: #9d5cf6;
}
/* Style the theme toggle button */
#theme-toggle {
    margin-top: 10px;
    padding: 10px 16px;
    border: none;
    cursor: pointer;
    background-color: #7c3aed;
    color: white;
    border-radius: 8px;
    transition: 0.3s;
}

#theme-toggle:hover {
    background-color: #5b21b6;
}
/* Add a hover effect to buttons */
button:hover {
  transform: scale(1.05);
}
/* Add a transition effect to sections for smooth appearance */
section {
  transition: opacity 0.5s ease;
}

/* Style the form message */
#form-message {
  margin-top: 10px;
  font-weight: bold;
  transition: opacity 0.3s ease;
}
/* Style error and success messages */
.error {
  color: red;
  font-size: 0.9em;
}
.success {
  color: green;
  font-size: 0.9em;
}

html {
  scroll-behavior: smooth; /* Enable smooth scrolling for anchor links */
}

/* Style the navigation menu */
nav ul {
  display: flex;
  justify-content: center;
  gap: 20px;
  list-style: none;
}
/* Style the navigation links */
nav a {
  color: #5b21b6;   /* darker purple */
  font-weight: bold;
}
/* Add a hover effect to navigation links */
nav a:hover {
  color: #0077cc;
}


/* Filter Buttons */
.filter-buttons {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 8px 18px;
    border: 2px solid #7c3aed;
    background: transparent;
    color: #7c3aed;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: #7c3aed;
    color: white;
}

/* Sort Button */
.sort-buttons {
    margin-bottom: 20px;
}

#sort-btn {
    padding: 8px 18px;
    border: 2px solid #7c3aed;
    background: transparent;
    color: #7c3aed;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

#sort-btn:hover {
    background: #7c3aed;
    color: white;
}

/* GitHub Repos Section */
#repos-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
}

.repo-card {
    border: 2px solid #7c3aed;
    border-radius: 12px;
    padding: 16px;
    width: 250px;
}

.repo-card h3 {
    margin: 0 0 8px;
    font-size: 16px;
}

.repo-card p {
    font-size: 14px;
    margin-bottom: 12px;
}

.repo-card a {
    color: #7c3aed;
    text-decoration: none;
    font-weight: bold;
}

.repo-card a:hover {
    text-decoration: underline;
}

.error-message {
    color: red;
}

/* Ensure images are responsive and display correctly */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.guide-section {
  padding: 60px 20px;
  background: #eef1f5;
  text-align: center;
}

.guide-section h2 {
  font-size: 2rem;
  margin-bottom: 10px;
  color: #333;
}

.guide-subtitle {
  color: #666;
  margin-bottom: 40px;
  font-size: 1rem;
}

.guide-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.guide-card {
  background: #fff;
  padding: 25px 20px;
  border: 1px solid #ddd;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: left;
}

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

.step-number {
  display: inline-block;
  width: 35px;
  height: 35px;
  line-height: 35px;
  text-align: center;
  border-radius: 50%;
  background: #f4b400;
  color: #000;
  font-weight: bold;
  margin-bottom: 15px;
}

.guide-card h3 {
  color: #333;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.guide-card p {
  color: #333;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Dark mode for guide section */
.dark-mode .guide-section {
  background: #111;
}

.dark-mode .guide-section h2 {
  color: #fff;
}

.dark-mode .guide-subtitle {
  color: #bbb;
}

.dark-mode .guide-card {
  background: #1c1c1c;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.dark-mode .guide-card:hover {
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.dark-mode .guide-card h3 {
  color: #fff;
}

.dark-mode .guide-card p {
  color: #ccc;
}

/* Add a transition effect to buttons for smooth interaction */
button, .project-button {
  transition: 0.3s ease;
  border-radius: 8px;
}

input:focus, textarea:focus {
  outline: none;
  border: 2px solid #7c3aed;
}

section {
  animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}