:root {
    --primary-color: #00a8ff;
    --secondary-color: #9c88ff;
    --dark-color: #1a1a1a;
    --light-color: #f4f4f4;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background-color: var(--dark-color);
    color: var(--light-color);
    overflow-x: hidden;
    background: linear-gradient(rgba(26, 26, 26, 0.7), rgba(26, 26, 26, 0.7)), url('https://raw.githubusercontent.com/CodeWithHarry123/TextToSpeechApp/main/sitebackground/background.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

header {
    background-color: rgba(26, 26, 26, 0.8);
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* Added for positioning menu button */
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

li {
    margin-left: 2rem;
}

a {
    text-decoration: none;
    color: var(--light-color);
    font-weight: 300;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

#theme-switcher {
    background: none;
    border: none;
    color: var(--light-color);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
    margin-left: 2rem; /* Add some spacing */
}

#theme-switcher:hover {
    color: var(--primary-color);
}

/* Light Mode Styles */
body.light-mode {
    --dark-color: #f4f4f4;
    --light-color: #1a1a1a;
}

body.light-mode header {
    background-color: rgba(244, 244, 244, 0.8);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

body.light-mode .card {
    background-color: #fff;
    border: 1px solid #ddd;
}

body.light-mode .card:hover {
    background-color: #f9f9f9;
}

body.light-mode .how-it-works,
body.light-mode .download {
    background-color: #e9e9e9;
}

body.light-mode .demo-content textarea {
    background-color: #fff;
    border: 1px solid #ccc;
    color: #1a1a1a;
}

body.light-mode .download-button {
    background-color: #e0e0e0;
    color: #333;
    border: 1px solid #ccc;
}

body.light-mode .download-button:hover {
    background-color: var(--primary-color);
    color: #fff;
}

body.light-mode #language-select {
    background-color: #fff;
    border: 1px solid #ccc;
    color: #1a1a1a;
}

body.light-mode #language-select option {
    background-color: #fff;
    color: #1a1a1a;
}

body.light-mode footer {
    background-color: #e0e0e0;
    color: #555;
}

.hero {
    color: #fff;
    text-align: center;
    padding: 10rem 1rem 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.hero-icon {
    display: block;
    max-width: 150px; /* Adjust as needed */
    width: 100%;
    margin: 0 auto 2rem; /* Center and add space below */
    height: auto;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.cta-button {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: #fff;
    padding: 1rem 3rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 168, 255, 0.3);
}

.features, .how-it-works, .demo, .download {
    padding: 6rem 2rem;
    text-align: center;
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 3rem;
}

.feature-cards {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.card {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 2.5rem;
    border-radius: 15px;
    width: 320px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card:hover {
    transform: translateY(-10px);
    background-color: rgba(255, 255, 255, 0.1);
}

.card i {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.how-it-works {
    background-color: rgba(0,0,0,0.2);
}

.steps {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 4rem;
}

.step {
    text-align: center;
    max-width: 250px;
}

.step span {
    display: inline-block;
    width: 50px;
    height: 50px;
    line-height: 50px;
    border-radius: 50%;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.demo-content textarea {
    width: 100%;
    max-width: 600px;
    height: 150px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    margin-bottom: 2rem;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--light-color);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
}

#speak-button {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: #fff;
    padding: 1rem 3rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#speak-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 168, 255, 0.3);
}

.download {
    background-color: rgba(0,0,0,0.2);
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
}

.download-button {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--light-color);
    padding: 1rem 2rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.download-button:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

.download-button i {
    margin-right: 0.5rem;
}

footer {
    background-color: #111;
    color: #888;
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
    header {
        padding: 1rem;
    }

    nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        position: relative; /* Ensure nav is relative for absolute positioning of children */
    }

    .logo {
        font-size: 1.5rem;
    }

    #theme-switcher {
        margin-left: auto;
        margin-right: 1rem;
    }

    #menu-button {
        display: block;
        background: none;
        border: none;
        color: var(--light-color);
        font-size: 1.8rem;
        cursor: pointer;
        z-index: 101;
        position: relative;
        transform: none;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(26, 26, 26, 0.98);
        justify-content: center;
        align-items: center;
        z-index: 99;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 1.5rem 0;
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }

    .feature-cards, .steps, .download-buttons {
        flex-direction: column;
        align-items: center;
    }

    .card, .step, .download-button {
        width: 90%;
        max-width: 350px;
    }

    /* Further mobile optimizations */
    .hero {
        padding: 8rem 1rem 4rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .features, .how-it-works, .demo, .download {
        padding: 4rem 1rem;
    }

    h2 {
        font-size: 2rem;
    }

    .card {
        padding: 1.5rem;
    }

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

    .step span {
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 1.2rem;
    }

    .demo-content textarea {
        padding: 1rem;
        font-size: 0.9rem;
    }

    #speak-button {
        padding: 0.8rem 2rem;
        font-size: 0.9rem;
    }

    .download-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}



#language-select {
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--light-color);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 600px;
    appearance: none; /* Remove default select arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20fill%3D%22%23f4f4f4%22%20d%3D%22M208.49%2096.49L136.49%20168.49a12%2012%200%200%201-17%200L47.51%2096.49a12%2012%200%200%201%2017-17L128%20142.07l63.49-62.58a12%2012%200%200%201%2017%2017z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

#language-select option {
    background-color: var(--dark-color);
    color: var(--light-color);
}

/* Desktop Styles */
@media (min-width: 769px) {
    .nav-links {
        display: flex !important;
        position: static !important;
        height: auto !important;
        background-color: transparent !important;
        flex-direction: row !important;
        justify-content: flex-end !important;
        align-items: center !important;
        z-index: auto !important;
    }

    .nav-links li {
        margin: 0 0 0 2rem; /* Reset margin for desktop */
    }

    .nav-links a {
        font-size: 1rem; /* Reset font size for desktop */
    }

    #menu-button {
        display: none; /* Hide menu button on desktop */
    }
}