/* 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;
}

/* Header */
header {
    background: #2c3e50;
    color: #fff;
    padding: 1.5rem 0;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: fadeInDown 1s ease;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 700;
    animation: slideInLeft 1s ease;
}

header nav {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
    animation: fadeIn 1.5s ease;
}

header nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

header nav a:hover {
    color: #1abc9c;
    transform: translateY(-3px);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 4px 0;
}

/* 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 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;
}

/* 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;
    }
}

/* 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) {
    header h1 {
        font-size: 2rem;
    }

    header nav {
        gap: 1rem;
    }

    .menu-toggle {
        display: flex;
    }

    header nav {
        display: none;
        flex-direction: column;
        background: #333;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        padding: 1rem;
    }

    header nav.active {
        display: flex;
    }

    .tutorial-grid, .problem-grid, .features-grid, .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.75rem;
    }

    header nav a {
        font-size: 0.9rem;
    }

    .btn-primary, .btn-secondary, .btn-outline {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .featured-section h2 {
        font-size: 1.75rem;
    }
}