/* General Styles */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}


/* Hero Section */
#hero {
    background: #1abc9c;
    color: #fff;
    padding: 4rem 0;
    text-align: center;
    animation: fadeIn 1s ease;
}

#hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    animation: slideInRight 1s ease;
}

#hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    animation: fadeIn 1.5s ease;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    animation: fadeInUp 1s ease;
}

.btn-primary, .btn-secondary, .btn-outline {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.btn-primary {
    background: #fff;
    color: #1abc9c;
}

.btn-primary:hover {
    background: #f0f0f0;
    transform: translateY(-3px);
}

.btn-secondary {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
}

.btn-secondary:hover {
    background: #fff;
    color: #1abc9c;
    transform: translateY(-3px);
}

.btn-outline {
    border: 2px solid #1abc9c;
    color: #1abc9c;
}

.btn-outline:hover {
    background: #1abc9c;
    color: #fff;
    transform: translateY(-3px);
}

/* Featured Sections */
.featured-section {
    padding: 4rem 0;
    animation: fadeIn 1s ease;
}

.featured-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #2c3e50;
    border-bottom: 2px solid #1abc9c;
    padding-bottom: 0.5rem;
    animation: slideInLeft 1s ease;
}

.tutorial-grid, .problem-grid, .features-grid, .testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    animation: fadeInUp 1s ease;
}

.tutorial-card, .problem-card, .feature-card, .testimonial-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tutorial-card:hover, .problem-card:hover, .feature-card:hover, .testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

.feature-card i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #1abc9c;
}

.tutorial-card img, .testimonial-card img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 1rem;
}

/* Topic Filter Styles */
.topic-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    animation: fadeIn 1s ease;
}

.filter-btn {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid #1abc9c;
    color: #1abc9c;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.filter-btn.active {
    background: #1abc9c;
    color: #fff;
}

.filter-btn:hover {
    background: #1abc9c;
    color: #fff;
    transform: translateY(-3px);
}

/* Subtopics Tutorials Page Styles */
#subtopics {
    padding: 1rem 0;
    animation: fadeIn 1s ease;
}

#subtopics h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    border-bottom: 2px solid #1abc9c;
    padding-bottom: 0.5rem;
    animation: slideInLeft 1s ease;
}

#subtopics p {
    text-align: center;
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #555;
    animation: fadeIn 1.5s ease;
}

.subtopic-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    animation: fadeInUp 1s ease;
}

.subtopic-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.subtopic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

.subtopic-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.subtopic-card h3 a {
    text-decoration: none;
    color: #2c3e50;
    transition: color 0.3s ease;
}

.subtopic-card h3 a:hover {
    color: #1abc9c;
}

.subtopic-card p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    #subtopics h2 {
        font-size: 2rem;
    }

    #subtopics p {
        font-size: 1.1rem;
    }

    .subtopic-list {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .subtopic-card {
        padding: 1rem;
    }

    .subtopic-card h3 {
        font-size: 1.25rem;
    }

    .subtopic-card p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    #subtopics h2 {
        font-size: 1.75rem;
    }

    #subtopics p {
        font-size: 1rem;
    }

    .subtopic-list {
        grid-template-columns: 1fr;
    }

    .subtopic-card {
        padding: 1rem;
    }

    .subtopic-card h3 {
        font-size: 1.1rem;
    }

    .subtopic-card p {
        font-size: 0.85rem;
    }
}

/* Problems Page Styles */
#problems {
    padding: 1rem 0;
    animation: fadeIn 1s ease;
}

#problems h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #2c3e50;
    border-bottom: 2px solid #1abc9c;
    padding-bottom: 0.5rem;
    animation: slideInLeft 1s ease;
}

#problems p {
    text-align: center;
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #555;
    animation: fadeIn 1.5s ease;
}

.problem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    animation: fadeInUp 1s ease;
}

.problem-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.problem-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

.problem-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.problem-card p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 1.5rem;
}

.problem-card a {
    text-decoration: none;
    color: #1abc9c;
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.problem-card .btn-outline:hover {
    background: #1abc9c;
    color: white;
  }

.problem-card a:hover {
    color: #16a085;
    transform: translateX(5px);
}

/* Problem Detail Page Styles */
#problem-detail {
    padding: 4rem 0;
    animation: fadeIn 1s ease;
}

#problem-detail h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    animation: slideInLeft 1s ease;
}

#problem-detail p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 1rem;
    animation: fadeIn 1.5s ease;
}

#problem-detail h3 {
    font-size: 2rem;
    margin-top: 2rem;
    color: #2c3e50;
    animation: slideInRight 1s ease;
}

#problem-detail select {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

#problem-detail select:hover {
    border-color: #1abc9c;
    transform: translateY(-3px);
}

#problem-detail select:focus {
    border-color: #1abc9c;
    outline: none;
}

#problem-detail pre {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    line-height: 1.5;
    margin-top: 1rem;
    animation: fadeIn 1s ease;
}

#problem-detail code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
}

/* Solution Tabs */
.solution {
    display: none; /* Hide solution by default */
    margin-top: 20px;
}

.solution-tabs button {
    padding: 10px 15px;
    margin-right: 10px;
    border: 1px solid #007bff;
    background-color: #fff;
    color: #007bff;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

.solution-tabs button.active {
    background-color: #007bff;
    color: #fff;
}

.solution-code {
    display: none; /* Hide all code blocks by default */
    margin-top: 20px;
}

.solution-code.active {
    display: block; /* Show active code block */
}

/* Sort Container */
.sort-container {
    margin-bottom: 20px;
}

.sort-container label {
    font-weight: bold;
    margin-right: 10px;
}

.sort-container select {
    padding: 5px;
    font-size: 16px;
    border-radius: 5px;
}

/* About Us Page Styles */
#about {
    padding: 1rem 0;
    animation: fadeIn 1s ease;
}

#about h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #2c3e50;
    border-bottom: 2px solid #1abc9c;
    padding-bottom: 0.5rem;
    animation: slideInLeft 1s ease;
}

#about h3 {
    font-size: 2rem;
    margin-top: 2rem;
    color: #2c3e50;
    animation: slideInRight 1s ease;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    animation: fadeInUp 1s ease;
}

.team-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

.team-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.team-card h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.team-card p {
    font-size: 1rem;
    color: #555;
}


/* Responsive Design for Problems Page */
@media (max-width: 768px) {
    #problems h2 {
        font-size: 2rem; /* Smaller heading for mobile */
    }

    #problems p {
        font-size: 1.1rem; /* Smaller paragraph text for mobile */
    }

    .problem-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Adjust grid for smaller screens */
    }

    .problem-card {
        padding: 1rem; /* Reduce padding for smaller screens */
    }

    .problem-card h3 {
        font-size: 1.25rem; /* Smaller card heading for mobile */
    }

    .problem-card p {
        font-size: 0.9rem; /* Smaller card text for mobile */
    }
}

@media (max-width: 480px) {
    #problems h2 {
        font-size: 1.75rem; /* Even smaller heading for very small screens */
    }

    #problems p {
        font-size: 1rem; /* Smaller paragraph text for very small screens */
    }

    .problem-grid {
        grid-template-columns: 1fr; /* Single column layout for very small screens */
    }

    .problem-card {
        padding: 1rem; /* Reduce padding for very small screens */
    }

    .problem-card h3 {
        font-size: 1.1rem; /* Smaller card heading for very small screens */
    }

    .problem-card p {
        font-size: 0.85rem; /* Smaller card text for very small screens */
    }
}

/* Contact Page Styles */
#contact {
    padding: 1rem 0;
    animation: fadeIn 1s ease;
}

#contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #2c3e50;
    border-bottom: 2px solid #1abc9c;
    padding-bottom: 0.5rem;
    animation: slideInLeft 1s ease;
}

#contact p {
    text-align: center;
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #555;
    animation: fadeIn 1.5s ease;
}

#contact-form {
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 1s ease;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #1abc9c;
    outline: none;
    transform: translateY(-3px);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

#contact-form button {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    background: #1abc9c;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

#contact-form button:hover {
    background: #16a085;
    transform: translateY(-3px);
}

/* Responsive Design for About and Contact Pages */
@media (max-width: 768px) {
    #about h2, #contact h2 {
        font-size: 2rem;
    }

    #about h3 {
        font-size: 1.75rem;
    }

    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .team-card h4 {
        font-size: 1.25rem;
    }

    .team-card p {
        font-size: 0.9rem;
    }

    #contact p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    #about h2, #contact h2 {
        font-size: 1.75rem;
    }

    #about h3 {
        font-size: 1.5rem;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .team-card {
        padding: 1rem;
    }

    .team-card h4 {
        font-size: 1.1rem;
    }

    .team-card p {
        font-size: 0.85rem;
    }

    #contact p {
        font-size: 0.9rem;
    }
}



  
 

  body.dark-mode h3{
    color: #ffffff;
  }
  body.dark-mode h2 {
    color: #ffffff; /* White color for the heading */
  }

  body.dark-mode #problems p {
    color: #ffffff; /* White color for the heading */
  }

  body.dark-mode p {
    color: #ffffff; /* White color for the heading */
  }

body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
  }
  
  .dark-mode header {
    background-color: #1f1f1f;
    color: #ffffff;
  }
  
  .dark-mode #hero {
    background-color: #1f1f1f;
    color: #ffffff;
  }
  
  .dark-mode .btn-primary {
    background-color: #333;
    color: #ffffff;
  }
  
  .dark-mode .btn-primary:hover {
    background-color: #444;
  }
  
  .dark-mode .btn-secondary {
    background-color: transparent;
    border-color: #ffffff;
    color: #ffffff;
  }
  
  .dark-mode .btn-secondary:hover {
    background-color: #ffffff;
    color: #1f1f1f;
  }
  
  .dark-mode .tutorial-card,
  .dark-mode .problem-card,
  .dark-mode .feature-card,
  .dark-mode .testimonial-card {
    background-color: #1f1f1f;
    color: #e0e0e0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  }
  
  .dark-mode .tutorial-card:hover,
  .dark-mode .problem-card:hover,
  .dark-mode .feature-card:hover,
  .dark-mode .testimonial-card:hover {
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.5);
  }
  
  .dark-mode #problem-detail pre {
    background-color: #2c3e50;
    color: #ffffff;
  }
  
  .dark-mode .solution-tabs button {
    background-color: #333;
    color: #ffffff;
    border-color: #007bff;
  }
  
  .dark-mode .solution-tabs button.active {
    background-color: #007bff;
    color: #ffffff;
  }
  
  .dark-mode footer {
    background-color: #1f1f1f;
    color: #ffffff;
  }
  
  .dark-mode .chatbot-popup {
    background-color: #1f1f1f;
    color: #ffffff;
  }
  
  .dark-mode .chatbot-header {
    background-color: #1abc9c;
    color: #ffffff;
  }
  
  .dark-mode .chatbot-messages {
    background-color: #121212;
    color: #ffffff;
  }
  
  .dark-mode .chatbot-input input {
    background-color: #333;
    color: #ffffff;
    border: 1px solid #444;
  }
  
  .dark-mode .chatbot-input button {
    background-color: #1abc9c;
    color: #ffffff;
  }
  
  .dark-mode .message.bot p {
    background-color: #444;
    color: #ffffff;
  }
  
  .dark-mode .message.user p {
    background-color: #1abc9c;
    color: #ffffff;
  }
/* Chatbot Button */
.chatbot-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #1abc9c;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
  }
  
  /* Add to your existing CSS */
.scroll-button {
    position: absolute;
    bottom: 70px; /* Adjust based on your input area height */
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1abc9c;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-button:hover {
    background: #16a085;
    transform: translateY(-2px);
}

.chatbot-messages {
    position: relative;
    max-height: 350px;
    overflow-y: auto;
    padding-right: 40px; /* Make room for scroll button */
    scrollbar-width: thin;
    scrollbar-color: #1abc9c transparent;
}

/* Custom scrollbar styles */
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background-color: #1abc9c;
    border-radius: 3px;
}

/* Ensure messages don't get hidden behind scroll button */
.message {
    margin-right: 10px;
}

  .chatbot-button:hover {
    background-color: #16a085;
  }
  
  /* Chatbot Popup */
  .chatbot-popup {
    position: fixed;
    bottom: 60px;
    right: 20px;
    width: 350px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: none;
    flex-direction: column;
    overflow: hidden;
  }
  
  .chatbot-popup.active {
    display: flex;
  }
  
  .chatbot-header {
    background: #1abc9c;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .chatbot-header h3 {
    margin: 0;
    font-size: 18px;
  }
  
  .close-chatbot {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
  }
  
  .chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f9f9f9;
  }
  
  .chatbot-input {
    display: flex;
    border-top: 1px solid #ccc;
  }
  
  .chatbot-input input {
    flex: 1;
    padding: 10px;
    border: none;
    outline: none;
  }
  
  .chatbot-input button {
    background: #1abc9c;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  .chatbot-input button:hover {
    background: #16a085;
  }
  
  /* Chatbot Messages */
  .message {
    margin-bottom: 15px;
  }
  
  .message.user {
    text-align: right;
  }
  
  .message.bot {
    text-align: left;
  }
  
  .message p {
    display: inline-block;
    padding: 10px;
    border-radius: 10px;
    max-width: 80%;
  }
  
  .message.user p {
    background: #1abc9c;
    color: white;
  }
  
  .message.bot p {
    background: #e0e0e0;
    color: #333;
  }

/* Footer */
footer {
    background: #2c3e50;
    color: #fff;
    padding: 2rem 0;
    text-align: center;
    animation: fadeInUp 1s ease;
}

footer nav {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

footer nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

footer nav a:hover {
    color: #1abc9c;
    transform: translateY(-3px);
}

footer .social-links {
    margin-top: 1rem;
}

footer .social-links a {
    color: #fff;
    margin: 0 0.5rem;
    font-size: 1.2rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    

    .tutorial-grid, .problem-grid, .features-grid, .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    

    .btn-primary, .btn-secondary, .btn-outline {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .featured-section h2 {
        font-size: 1.75rem;
    }
}

/* Chat Heading */
.chat-heading {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #4f46e5; /* Indigo */
  margin: 6px 0;
}

/* Bullet List */
.chat-list {
  padding-left: 20px;
  margin: 6px 0;
}

.chat-list li {
  margin-bottom: 6px;
  font-size: 14px;
  color: #333;
}

/* Message text */
.message p {
  margin: 4px 0;
  line-height: 1.5;
}
