* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.navbar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease; /* Add transition for scrolled state */
}

/* Style for header when scrolled past the hero section */
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.9); /* More opaque background */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar.scrolled .logo span,
.navbar.scrolled .nav-links a {
    color: #333; /* Darker text color when scrolled */
}

.navbar.scrolled .logo a {
    color: #333; /* Darker text color for logo link when scrolled */
}

.navbar.scrolled .logo a:hover {
    color: #FF9000; /* Orange color on hover when scrolled */
}

.navbar.scrolled .logo i {
     color: #FF9000; /* Orange icon color */
}

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

.nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    transition: color 0.3s ease; /* Add transition */
}

.logo a {
    display: flex;
    align-items: center;
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo a:hover {
    color: #FF9000;
}

.logo i {
    margin-right: 10px;
    color: #FF9000;
    transition: color 0.3s ease; /* Add transition */
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #FF9000;
}

/* Nav Right Container */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Premium Link */
.premium-link {
    background: linear-gradient(45deg, #FF9000, #FFA500);
    color: white !important;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 144, 0, 0.3);
}

.premium-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 144, 0, 0.4);
    color: white !important;
}

/* Language Switcher */
.language-switcher {
    position: relative;
    display: flex;
    align-items: center;
    z-index: 1010; /* Ensure it's above other content */
}

.lang-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar.scrolled .lang-toggle-btn {
     background: rgba(0, 0, 0, 0.05); /* Darker background when scrolled */
     border-color: rgba(0, 0, 0, 0.1);
     color: #333; /* Darker text color */
}

.lang-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.navbar.scrolled .lang-toggle-btn:hover {
     background: rgba(0, 0, 0, 0.1);
}

.lang-toggle-btn i {
    transition: transform 0.3s ease;
}

.lang-toggle-btn.active i, /* Use a class like active on the button */
.lang-options.visible + .lang-toggle-btn i { /* Or use the sibling selector */
    transform: rotate(180deg);
}

.lang-options {
    display: none; /* Hidden by default */
    position: absolute;
    top: 100%; /* Position below the active button */
    right: 0;
    margin-top: 10px; /* Space between button and dropdown */
    background: rgba(255, 255, 255, 0.95); /* Slightly more opaque */
    border-radius: 10px;
    padding: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    min-width: 120px; /* Adjust width as needed */
    flex-direction: column;
    gap: 5px;
    z-index: 1011; /* Ensure it's above the active button */
}

.lang-options.visible {
    display: flex; /* Show when active */
}

.lang-options .lang-btn {
    background: none;
    border: none;
    color: #333;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 0.9rem;
    text-align: left;
    display: flex; /* Use flex to align flag and text */
    align-items: center;
    gap: 8px; /* Space between flag and text */
}

.lang-options .lang-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.lang-options .lang-btn.active {
    background: linear-gradient(45deg, #FF9000, #FFA500);
    color: white;
    font-weight: bold;
}

.lang-toggle-btn.active {
    /* Remove or override conflicting active styles if any */
    /* background/color is set by the base .lang-toggle-btn rule */
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    text-align: center;
    color: white;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #FF9000, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

/* Download Form */
.download-form {
    margin: 3rem 0;
}

.form-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 1rem;
}

#videoUrl {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    background: rgba(255, 255, 255, 0.9);
    color: #333; /* Ensure text is readable */
}

#videoUrl::placeholder {
    color: #666; /* Placeholder color */
    opacity: 1; /* Ensure placeholder is not transparent */
}

.download-btn {
    padding: 15px 30px;
    background: linear-gradient(45deg, #FF9000, #FFA500);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease; /* Added opacity transition */
    display: flex;
    align-items: center;
    gap: 10px;
}

.download-btn:hover:not(:disabled) { /* Apply hover only when not disabled */
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 144, 0, 0.3);
}

.download-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading Animation */
.loading-animation {
    display: none; /* Controlled by JS */
    text-align: center;
    padding: 1rem 0 0; /* Adjusted padding */
    color: white;
}

.spinner {
    width: 30px; /* Smaller spinner */
    height: 30px; /* Smaller spinner */
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #FF9000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 0.5rem; /* Adjusted margin */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Progress Container */
.progress-container {
    display: none; /* Controlled by JS */
    margin-top: 1.5rem;
    padding: 1rem 0;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF9000, #FFA500);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.progress-text {
    text-align: center;
    color: white;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Message Styles */
.message {
    display: none; /* Controlled by JS */
    padding: 15px 20px;
    border-radius: 10px;
    margin: 1rem 0;
    font-size: 0.9rem;
    text-align: center;
    animation: messageSlideIn 0.3s ease;
}

.message.success {
    background: rgba(76, 175, 80, 0.9);
    color: white;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.message.error {
    background: rgba(244, 67, 54, 0.9);
    color: white;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* How to Use Section */
.how-to-use {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 80px 0;
}

.how-to-use h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.step-number {
    background: linear-gradient(45deg, #FF9000, #FFA500);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.step-content p {
    color: #666;
    line-height: 1.6;
}

/* Features Section */
.features {
    background: white;
    padding: 80px 0;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

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

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 15px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-card i {
    font-size: 3rem;
    color: #FF9000;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

/* Testimonials Section */
.testimonials {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 80px 0;
    color: white;
}

.testimonials h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: white;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.testimonial-content {
    margin-bottom: 1.5rem;
}

.testimonial-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    font-style: italic;
    position: relative;
    padding: 0 1rem;
}

.testimonial-content p::before {
    content: '"';
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.3);
    position: absolute;
    left: -10px;
    top: -10px;
    font-family: serif;
}

.testimonial-content p::after {
    content: '"';
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.3);
    position: absolute;
    right: -10px;
    bottom: -20px;
    font-family: serif;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: #FF9000;
}

.author-info span {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* FAQ Section */
.faq {
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    padding: 80px 0;
    color: white;
}

.faq h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.1);
}

.faq-question h3 {
    font-size: 1.1rem;
}

.faq-answer {
    padding: 0 1.5rem 1.5rem;
    display: none;
    opacity: 0.9;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer p {
    padding-top: 0.5rem; /* Add padding to the text inside the answer */
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    overflow: auto; /* Allow scrolling if content is too tall */
}

.modal-content {
    background: white;
    margin: 10% auto; /* Adjusted margin for better centering on smaller screens */
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
    z-index: 2001; /* Ensure content is above modal background */
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 2rem;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #333;
}

.modal-content h2 {
    color: #333; /* Ensure modal title is dark */
    margin-bottom: 1rem;
}

.video-preview {
    display: flex;
    gap: 1rem;
    margin: 1rem 0 2rem; /* Adjusted margin */
    align-items: center;
}

#videoThumbnail {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0; /* Prevent shrinking on small screens */
}

.video-info {
    flex-grow: 1; /* Allow info to take available space */
}

.video-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #333;
    word-break: break-word; /* Prevent long titles from overflowing */
}

.video-info p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.final-download-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #FF9000, #FFA500);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease; /* Added background transition */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.final-download-btn:hover {
    transform: translateY(-2px);
}

.final-download-btn:active {
    transform: translateY(0);
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.1);
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding-top: 100px; /* Adjusted padding for fixed header */
    }

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

    .form-container {
        padding: 1.5rem; /* Smaller padding */
    }

    .input-group {
        flex-direction: column;
        gap: 15px; /* Adjusted gap */
    }

    #videoUrl, .download-btn {
        width: 100%; /* Full width on small screens */
        text-align: center;
        justify-content: center; /* Center content in button */
    }

    .download-btn {
        padding: 15px 20px; /* Adjusted padding */
    }

    .nav-links {
        display: none; /* Hide nav links on mobile */
    }

    .video-preview {
        flex-direction: column;
        text-align: center;
    }

    #videoThumbnail {
        width: 100%; /* Make thumbnail wider on mobile */
        max-width: 200px;
        height: auto; /* Maintain aspect ratio */
    }

    .video-info h3, .video-info p {
        text-align: center; /* Center video info text */
    }

    .nav-container {
        flex-wrap: wrap; /* Allow items to wrap */
        gap: 10px; /* Space between wrapped items */
        justify-content: center; /* Center items when wrapped */
    }

    .logo, .nav-right {
        flex-grow: 0; /* Prevent logo/nav-right from growing */
        flex-basis: auto; /* Allow basis to be auto */
    }

    .logo {
        margin-right: auto; /* Push logo to the left */
    }
    .nav-right {
        margin-left: auto; /* Push nav-right to the right */
        gap: 0.5rem; /* Reduce gap on mobile */
    }

    .premium-link {
        font-size: 0.8rem; /* Smaller text on mobile */
        padding: 6px 12px; /* Smaller padding on mobile */
    }

    .nav-center {
        order: 3; /* Move nav-center below logo and switcher */
        flex-basis: 100%; /* Make it take full width */
        margin-top: 15px; /* Add space above */
    }

    .nav-links {
        display: flex; /* Re-show links now that nav-center takes full width */
        justify-content: center; /* Center links */
        width: 100%; /* Ensure links container takes full width */
        gap: 1rem; /* Reduce gap for smaller screens */
    }

    .lang-options {
        left: auto; /* Reset left */
        right: 0; /* Keep dropdown aligned to the right */
    }

    /* How to Use Section Mobile */
    .steps-container {
        gap: 1.5rem;
    }

    .step {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 1rem;
    }

    .step-number {
        margin-bottom: 1rem;
    }

    .how-to-use h2 {
        font-size: 2rem;
    }

    /* Testimonials Section Mobile */
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .testimonial-card {
        padding: 1.5rem;
    }

    .testimonials h2 {
        font-size: 2rem;
    }

    .testimonial-content p::before,
    .testimonial-content p::after {
        font-size: 2rem;
    }
}
