/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Public Sans', sans-serif;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 3rem;
  background: linear-gradient(90deg, #fbb69f, #f68c6e, #f16363); /* warm, soft professional gradient */
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.logo-container {
  display: flex;
  align-items: center;
  gap: 15px; /* space between logo and text */
}

.logo-img img {
  height: 50px;
  width: 50px;
}

.navbar .nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.navbar .nav-links li a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.navbar .nav-links li a:hover {
  color: #ffe5d4; /* subtle highlight */
}

/* Navbar Buttons */
.navbar .nav-links li a {
  display: inline-block;
  padding: 8px 20px;
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  border-radius: 5px; /* rounded pill shape */
  background: linear-gradient(90deg, #f5c686, #ffcc70, #ffd9a6); /* warm professional gradient */
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}

/* Hover effect */
.navbar .nav-links li a:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.15);
  background: linear-gradient(90deg, #ffd9a6, #ffcc70, #ffb347); /* subtle gradient shift */
}

/* Optional active button style */
.navbar .nav-links li a.active {
  box-shadow: 0 8px 15px rgba(0,0,0,0.2);
  background: linear-gradient(90deg, #ffcc70, #ffb347, #ffd9a6);
}


.navbar .logo {
  font-size: 1.7rem;
  font-weight: bold;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 0;
  background: linear-gradient(90deg, #fbb69f, #f68c6e, #f16363);
  color: #fff;
  margin-top: 3rem;
  font-size: 0.95rem;
  box-shadow: 0 -4px 10px rgba(0,0,0,0.08);
}

/* Responsive */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 1rem;
  }
}

main {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.about-section, .contact-section {
  background-color: #ffffff;
  padding: 2rem 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.about-section h1, .contact-section h1 {
  text-align: center;
  color: #007BFF;
  margin-bottom: 1rem;
}

.about-section p, .contact-section p {
  line-height: 1.6;
  margin-bottom: 1rem;
}
/* Highlighted text */
.highlight {
  color: #ff6f61;
  font-weight: 600;
  transition: color 0.3s;
}
.highlight:hover {
  color: #ff3b2e;
}

/* Features list */
.features ul li {
  background: #fdf2f0;
  margin: 0.5rem 0;
  padding: 10px 15px;
  border-radius: 6px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px; /* space between icon and text */
  transition: transform 0.3s, background 0.3s;
}

.features ul li:hover {
  transform: translateX(5px);
  background: #ffe5d4;
}

.features ul li .material-icons {
  color: #33b833;
  font-size: 1.2rem;
}


/* Mission & Vision */
.mission-vision {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2rem;
}
.mission, .vision {
  background: #fdf2f0;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  flex: 1 1 300px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}
.mission:hover, .vision:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.mission h3, .vision h3 {
  color: #ff6f61;
  margin-bottom: 0.5rem;
}
/* Right side container (links + snake button) */
.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem; /* space between links and button */
}
/* Dark Mode Toggle Button */
.dark-mode-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 25px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.dark-mode-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
}

.footer-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s, text-decoration 0.2s;
  padding: 0.5rem;
  border-radius: 4px;
}

.footer-links a:hover,
.footer-links a:focus {
  color: #ffe5d4;
  outline: 2px solid #ffe5d4;
  outline-offset: 2px;
}

.footer-links a:focus {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .contact-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .contact-info {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .info-card {
    flex: 1;
    min-width: 250px;
  }
}

.dark-mode-btn.active {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Dark Mode Styles */
body.dark-mode {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #e0e0e0;
  transition: all 0.4s ease;
}

body.dark-mode main {
  background: transparent;
}

body.dark-mode main h1 {
  color: #bb86fc;
  text-shadow: 0 0 20px rgba(187, 134, 252, 0.3);
}

body.dark-mode main h1::after {
  background: linear-gradient(90deg, #bb86fc, #cf6679, #03dac6, #bb86fc);
  background-size: 300% 100%;
}

/* Dark Mode Navbar */
body.dark-mode .navbar {
  background: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%);
  box-shadow: 0 4px 20px rgba(106, 17, 203, 0.4);
}

body.dark-mode .navbar .nav-links li a {
  background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
  background-size: 200% 100%;
}

body.dark-mode .navbar .nav-links li a:hover {
  background: linear-gradient(90deg, #764ba2, #667eea, #764ba2);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.5);
}

/* Dark Mode Cards */
body.dark-mode .card {
  background: linear-gradient(145deg, #2d2d44, #1f1f33);
  color: #e0e0e0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(187, 134, 252, 0.2);
}

body.dark-mode .card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(187, 134, 252, 0.4);
  border-color: rgba(187, 134, 252, 0.5);
}

body.dark-mode .card h3 {
  color: #bb86fc;
}

body.dark-mode .card p {
  color: #b0b0b0;
}

/* Dark Mode Footer */
body.dark-mode footer {
  background: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%);
  box-shadow: 0 -4px 20px rgba(106, 17, 203, 0.3);
}

/* Dark Mode Recently Viewed Sidebar */
body.dark-mode .recently-viewed-sidebar {
  background-color: #2d2d44;
  border: 1px solid rgba(187, 134, 252, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

body.dark-mode .recently-viewed-sidebar h2 {
  color: #bb86fc;
}

body.dark-mode .recently-viewed-sidebar:hover h2 {
  border-bottom-color: #bb86fc;
}

body.dark-mode #recently-viewed-list a {
  color: #03dac6;
}

body.dark-mode #recently-viewed-list a:hover {
  color: #bb86fc;
}

body.dark-mode #clear-history-btn {
  border-color: #cf6679;
  color: #cf6679;
}

body.dark-mode #clear-history-btn:hover {
  background-color: #cf6679;
  color: white;
}
/* Dark Mode - Problem Statement Box */
body.dark-mode .problem-statement,
body.dark-mode .problem-box,
body.dark-mode .approach-box,
body.dark-mode .approach-section {
  background-color: #2d2d44;
  color: #e0e0e0;
  border: 1px solid rgba(187, 134, 252, 0.3);
}

body.dark-mode .problem-statement h2,
body.dark-mode .problem-statement h3,
body.dark-mode .approach-box h2,
body.dark-mode .approach-box h3 {
  color: #bb86fc;
}

body.dark-mode .problem-statement p,
body.dark-mode .approach-box p,
body.dark-mode .explanation,
body.dark-mode .time-complexity,
body.dark-mode .space-complexity {
  color: #b0b0b0;
}

/* Dark Mode - Code Blocks */
body.dark-mode pre,
body.dark-mode code {
  background-color: #1a1a2e;
  color: #03dac6;
  border: 1px solid rgba(187, 134, 252, 0.2);
}

/* Dark Mode - Breadcrumb Navigation */
body.dark-mode .breadcrumb,
body.dark-mode .breadcrumb a {
  color: #b0b0b0;
}

body.dark-mode .breadcrumb a:hover {
  color: #bb86fc;
}

/* Dark Mode - Example text */
body.dark-mode .example,
body.dark-mode .example-text {
  color: #e0e0e0;
}

/* Dark Mode - Highlighted text (like "structured learning path") */
body.dark-mode strong,
body.dark-mode b,
body.dark-mode .highlight {
  color: #cf6679;
}

/* Dark Mode - Lists */
body.dark-mode ul li,
body.dark-mode ol li {
  color: #b0b0b0;
}

/* Dark Mode - Checkmark icons in features */
body.dark-mode .features li::before,
body.dark-mode .key-features li::before {
  color: #03dac6;
}

/* Dark Mode - About Page Content */
body.dark-mode .about-container,
body.dark-mode .about-content {
  background-color: rgba(45, 45, 68, 0.6);
  color: #e0e0e0;
}

body.dark-mode .about-content h1,
body.dark-mode .about-content h2 {
  color: #bb86fc;
}

body.dark-mode .about-content p {
  color: #b0b0b0;
}

/* Dark Mode - Feature boxes with checkmarks */
body.dark-mode .feature-item {
  background-color: rgba(45, 45, 68, 0.4);
  color: #e0e0e0;
}
/* Dark Mode - All content boxes */
body.dark-mode .content-box,
body.dark-mode .info-box,
body.dark-mode .section-box {
  background-color: #2d2d44;
  color: #e0e0e0;
  border-color: rgba(187, 134, 252, 0.3);
}

/* Dark Mode - Input/Output examples */
body.dark-mode .input-output,
body.dark-mode .example-input,
body.dark-mode .example-output {
  background-color: #1f1f33;
  color: #e0e0e0;
  border-left: 3px solid #bb86fc;
}
/* Key Features text in dark mode */
body.dark-mode .features h2 {
  color: #e7dede; /* black heading */
}

body.dark-mode .features li {
  color: #000000; /* black text */
  font-weight: 600;
}

body.dark-mode .features .material-icons {
  color: #6d6666; /* black icons */
}
/* Mission & Vision text in dark mode */
body.dark-mode .mission h3,
body.dark-mode .vision h3 {
  color: #373535; /* heading color similar to Key Features */
}

body.dark-mode .mission p,
body.dark-mode .vision p {
  color: #000000; /* paragraph text black */
  font-weight: 500; /* slightly bolder for readability */
}

/* Optional: subtle color for icons if any inside Mission/Vision */
body.dark-mode .mission .material-icons,
body.dark-mode .vision .material-icons {
  color: #6d6666; /* grayish icons */
}
