/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* Universal reset: ensure consistent box model across all elements */

* {
    box-sizing: border-box;
}


/* Body styling for overall page layout */
body {
    /* solid background color */
    background-color: #e1e8df;
    font-family: 'Poppins', sans-serif;
    /* use flexbox for layout */
    display: flex;
    /* arrange children vertically */
    flex-direction: column;
    /* center children horizontally */
    align-items: center;
    /* center children vertically */
    justify-content: center;
    /* minimum height of viewport */
    min-height: 100vh;
    /* remove default margin */
    margin: 0;
    /* adding padding around edges */
    padding: 1rem;
}

/* Header Section */

.quiz-header-section {
    /* Gradient background from purple to dark purple */
    background: linear-gradient(135deg, #8e44ad 0%, #5e3370 100%);
    /* White text color */
    color: white;
    /* Padding inside header */
    padding: 1.5rem 1rem;
    /* Center align text */
    text-align: center;
    /* Space below header */
    margin-bottom: 1.5rem;
    /* Soft shadow for depth effect */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    /* Full width */
    width: 100%;
    /* Maximum width for larger screens */
    max-width: 600px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1.5rem;
}

/* Header content container */

.header-content {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    padding: 0 10px;
}

/* Main quiz title */
.quiz-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    line-height: 1.2;
}

/* Quiz tagline */



.quiz-tagline {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.4;
}

/* Quiz Container */

.quiz-container {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px 2px rgba(100, 100, 100, 0.1);
    width: 90%;
    /* Match header width */
    max-width: 600px;
    /* Hide overflow content */
    overflow: hidden;
    margin: 2rem auto;
}

.quiz-container ul {
    padding: 0;
    margin: 0;
}

.quiz-container li {
    list-style: none;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.quiz-container input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
}

.quiz-container label {
    font-size: 1rem;
    line-height: 1.4;
    word-break: break-word;
    flex: 1;
    cursor: pointer;
}

/* Quiz header inside container */
.quiz-header {
    padding: 2rem;
}

#question {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

/* Question heading */
h2 {
    padding: 1rem;
    text-align: center;
    margin: 0;
}

/* Remove list styling */

ul {
    list-style-type: none;
    padding: 0;
}

/* List items for answers */

ul li {
    font-size: 1.2rem;
    margin: 1rem 0;
}

/* Label styling */

ul li label {
    cursor: pointer;
}

/* Submit button */

button {
    background-color: #8e44ad;
    color: #fff;
    border: none;
    /* make button a block element */
    display: block;
    width: auto;
    cursor: pointer;
    font-size: 1.1rem;
    font-family: inherit;
    padding: 1rem 2rem;
    margin: 10px auto;
    border-radius: 5px;
    max-width: 200px;
}

button:hover {
    outline: none;
    background-color: #732d91;
    transform: translateY(-2px);
    /*gives a lift effect*/
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    /*smooth transition for all properties*/
}

/* Focus state for accessibility */
button:focus {
    outline: none;
    background-color: #5e3370;
    /*Even darker purple for focus*/
}



/* Navigation Bar Styles */
.navbar {
    background: linear-gradient(135deg, #8e44ad 0%, #5e3370 100%);
    color: white;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
}

.nav-logo {
    width: 40px;
    height: 40px;
    display: block;
    border-radius: 50%;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

/* Hover effect for navigation links */
.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Focus state for keyboard navigation (accessibility) */
.nav-link:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* Active page indicator */
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

/* Hamburger menu for mobile */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: all 0.3s ease;
}

/* Home Page styles */

/* Hero section (for home page) */
.hero-section {
    background-color: #fff;
    padding: 4rem 1rem;
    text-align: center;
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
    border-radius: 10px;
    box-shadow: 0 0 10px 2px rgba(100, 100, 100, 0.1);
}

.hero-title {
    font-size: 2.5rem;
    color: #5e3370;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #000000;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Call to Action buttons */
.cta-button {
    display: inline-block;
    background-color: #8e44ad;
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: #732d91;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.cta-secondary {
    background-color: transparent;
    border: 2px solid #8e44ad;
    color: #8e44ad;
}

.cta-secondary:hover {
    background-color: #8e44ad;
    color: white;
}

/* Features Section */
.features-section {
    padding: 3rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: #5e3370;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 0 10px 2px rgba(100, 100, 100, 0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: #5e3370;
    margin-bottom: 0.5rem;
}

/* How It Works Section */
.how-it-works {
    background-color: #f5f5f5;
    padding: 3rem 1rem;
    border-radius: 10px;
}

.steps-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.step {
    flex: 1;
    min-width: 250px;
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 10px 2px rgba(100, 100, 100, 0.1);
}

.step-number {
    width: 50px;
    height: 50px;
    background-color: #8e44ad;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

/* Preview section (shows sample questions) */
.preview-section {
    padding: 3rem 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.preview-card {
    background: white;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 0 10px 2px rgba(100, 100, 100, 0.1);
}

.preview-question {
    font-size: 1.2rem;
    font-weight: 600;
    color: #5e3370;
    margin-bottom: 1rem;
}

.preview-options {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.preview-option {
    background-color: #f0f0f0;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.95rem;
}

.preview-option.correct {
    background-color: #8e44ad;
    color: white;
}

.text-center {
    text-align: center;
    margin-top: 2rem;
}

/* About page styles */

.page-header {
    background: linear-gradient(135deg, #8e44ad 0%, #5e3370 100%);
    color: white;
    text-align: center;
    padding: 3rem 1rem;
    margin: 2rem auto;
    max-width: 800px;
    border-radius: 10px;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.about-content section {
    background: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 10px 2px rgba(100, 100, 100, 0.1);
}

.about-content h2 {
    color: #5e3370;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #8e44ad;
    padding-bottom: 0.5rem;
}

.feature-item {
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 4px solid #8e44ad;
}

.feature-item h3 {
    color: #5e3370;
    margin-bottom: 0.5rem;
}

.tech-list {
    list-style: none;
    padding: 0;
}

.tech-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.tech-list li:before {
    content: "✅";
    color: #8e44ad;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* 404 Page styles */

.not-found {
    text-align: center;
    padding: 4rem 1rem;
    max-width: 600px;
    margin: 2rem auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 10px 2px rgba(100, 100, 100, 0.1);
}

.not-found h1 {
    font-size: 6rem;
    color: #8e44ad;
    margin: 0;
    line-height: 1;
}

.not-found h2 {
    color: #5e3370;
    margin-bottom: 1rem;
}

.redirect-message {
    font-size: 1.2rem;
    color: #666;
    margin: 2rem 0;
}

/* Footer  */
.footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    width: 100%;
    border-radius: 10px;
}

.footer p {
    margin: 0.5rem 0;
    opacity: 0.8;
}

.footer a {
    color: white;
    text-decoration: underline;
}

/* Score Display styles (for quiz results) */

.score-display {
    text-align: center;
    padding: 1rem;
}

.final-score {
    font-size: 1.5rem;
    color: #5e3370;
    font-weight: 600;
}

.score-percentage {
    font-size: 2rem;
    color: #8e44ad;
    font-weight: 700;
    margin: 1rem 0;
}

.result-message {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

.reload-btn {
    background-color: #8e44ad;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reload-btn:hover {
    background-color: #732d91;
    transform: translateY(-2px);
}

/* Responsive Styles */

/* Tablet and Mobile devices */
@media screen and (max-width: 768px) {
    body {
        padding: 0.5rem;
        justify-content: flex-start;
    }

    .navbar {
        position: sticky;
        top: 0;
        width: 100%;
        z-index: 1000;
    }

    .nav-container {
        padding: 0.6rem 1rem;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .nav-logo {
        width: 30px;
        height: 30px;
    }



    .hamburger {
        display: flex !important;
        padding: 8px;
        z-index: 1001;
    }

    .bar {
        width: 22px;
        height: 3px;
        margin: 3px 0;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background: linear-gradient(135deg, #8e44ad 0%, #5e3370 100%);
        width: 100%;
        text-align: center;
        transition: 0.3s ease-in-out;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
        padding: 1.5rem 0;
        gap: 0.5rem;
        z-index: 999;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 0.8rem 0;
        width: 100%;
    }

    .nav-link {
        font-size: 1.1rem;
        display: block;
        width: 80%;
        margin: 0 auto;
        padding: 0.8rem 1rem;
    }


    .quiz-header-section {
        margin-bottom: 1rem;
        margin-top: 0.5rem;
        padding: 1rem 0.8rem;
        border-radius: 8px;
        max-width: 100%;
    }


    .quiz-title {
        font-size: 1.8rem;
        margin-bottom: 0.3rem;
    }

    .quiz-tagline {
        font-size: 0.9rem;
        line-height: 1.3;
        padding: 0 0.5rem;
    }

    .quiz-container {
        border-radius: 8px;
        max-width: 100%;
        margin: 0 auto;
    }

    .quiz-header {
        padding: 1.2rem;
    }

    h2 {
        font-size: 1.2rem;
        padding: 0.5rem;
        line-height: 1.4;
    }

    ul {
        margin: 0 0.3rem;
    }


    ul li {
        font-size: 1rem;
        margin: 0.8rem 0;
    }

    ul li label {
        display: inline-block;
        padding: 0.3rem 0;
    }

    button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        max-width: 180px;
        margin: 0.5rem auto;
    }

    .hero-section {
        padding: 2rem 1rem;
        margin: 1rem auto;
    }

    .hero-title {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.4;
        padding: 0 0.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }

    .hero-image {
        max-width: 90%;
        margin-bottom: 1.5rem;
    }

    .quiz-header-image {
        width: 60px;
    }

    .page-header-image {
        max-width: 80%;
    }

    .cta-button {
        width: 100%;
        max-width: 280px;
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .features-section {
        padding: 2rem 1rem;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
        padding: 0;
    }

    .feature-card {
        padding: 1.5rem;
        margin: 0;
    }

    .feature-icon {
        font-size: 2.5rem;
        margin-bottom: 0.8rem;
    }

    .feature-card h3 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }

    .feature-card p {
        font-size: 0.95rem;
        line-height: 1.4;
    }

    .how-it-works {
        padding: 2rem 1rem;
    }

    .steps-container {
        flex-direction: column;
        gap: 1.2rem;
    }

    .step {
        padding: 1.5rem;
        width: 100%;
    }

    .step-number {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .step h3 {
        font-size: 1.2rem;
    }

    .step p {
        font-size: 0.95rem;
        line-height: 1.4;
    }

    .preview-section {
        padding: 2rem 1rem;
    }

    .preview-card {
        padding: 1.2rem;
    }

    .preview-question {
        font-size: 1.1rem;
        line-height: 1.4;
    }

    .preview-options {
        flex-direction: column;
        gap: 0.6rem;
    }

    .preview-option {
        width: 100%;
        padding: 0.7rem;
        font-size: 0.95rem;
        text-align: center;
    }

    .page-header {
        padding: 2rem 1rem;
        margin: 1rem auto;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .page-header p {
        font-size: 1rem;
    }

    .page-header-image {
        max-width: 90%;
    }

    .about-content {
        padding: 1rem;
    }

    .about-content section {
        padding: 1.5rem;
    }

    .about-content h2 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }

    .feature-item h3 {
        font-size: 1.2rem;
    }

    .feature-item p {
        font-size: 0.95rem;
        line-height: 1.4;
    }

    .tech-list li {
        font-size: 0.95rem;
        padding: 0.4rem 0 0.4rem 1.5rem;
    }

    .not-found {
        padding: 2rem 1rem;
        margin: 1rem auto;
    }

    .not-found h1 {
        font-size: 4rem;
    }

    .not-found h2 {
        font-size: 1.5rem;
    }

    .redirect-message {
        font-size: 1rem;
        line-height: 1.4;
    }

    .footer {
        padding: 1.5rem;
        margin-top: 2rem;
    }

    .footer p {
        font-size: 0.9rem;
        margin: 0.3rem 0;
    }

}

/* Small Mobile Devices (under 480px) */
@media screen and (max-width: 480px) {
    .hero-title {
        font-size: 1.6rem;
    }

    .quiz-title {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .nav-link {
        width: 90%;
        font-size: 1rem;
    }

    .feature-card {
        padding: 1.2rem;
    }

    .step {
        padding: 1.2rem;
    }

    .preview-question {
        font-size: 1rem;
    }

    .preview-option {
        font-size: 0.6rem;
        padding: 0.9rem;
    }

    .quiz-container label {
        font-size: 0.95rem;
    }

    .quiz-container li {
        gap: 8px;
        margin-bottom: 1.2rem;
    }
    
    .quiz-container input[type="radio"] {
        width: 20px;
        height: 20px;
        margin-top: 2px;
    }

    .quiz-header {
        padding: 1rem;
    }

    #question {
        font-size: 1.2rem;
        margin-bottom: 1.2rem;
        line-height: 1.4;
    }

    .page-header-image {
        max-width: 95%;
    }
}

/* Tablet Landscape (768px - 1024px) */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .nav-container {
        padding: 0.8rem 1.5rem
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .quiz-title {
        font-size: 2rem;
    }

    .quiz-container {
        max-width: 700px;
        width: 85%;
    }

    .step {
        min-width: 200px;
    }

}

/* Larger Screens */
@media screen and (min-width: 1400px) {

    .nav-container,
    .hero-section,
    .features-section,
    .quiz-container,
    .about-content {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Images styles added  */

.hero-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.page-header-image {
    height: auto;
    display: block;
    margin: 0 auto 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
}

