/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Dark Theme Variables (Default) */
:root {
    --background-color: #1e1e1e;
    --text-color: #d4d4d4;
    --header-bg: #252526;
    --section-bg: #2d2d30;
    --section-alt-bg: #1e1e1e;
    --primary-color: #007acc;
    --secondary-color: #4ec9b0;
    --border-color: #3f3f46;
    --code-bg: #1a1a1a; /* Used by Monaco container */
    --code-text: #9cdcfe; /* Monaco handles internal text */
    --link-color: var(--primary-color);
    --link-hover-color: #569cd6;
    --button-text-color: #fff;
    --footer-text-color: #888;
    --placeholder-text-color: #888;
    --feature-item-bg: var(--header-bg);
    --tech-item-bg: var(--header-bg);
    --hero-gradient-start: rgba(30, 30, 30, 0.8);
    --hero-gradient-end: rgba(30, 30, 30, 0.8);
    --box-shadow-color: rgba(0, 122, 204, 0.3);
    --switcher-border-color: var(--border-color);
    --switcher-hover-bg: var(--header-bg);
}

/* Light Theme Variables */
body.light-theme {
    --background-color: #ffffff;
    --text-color: #333333;
    --header-bg: #f8f9fa;
    --section-bg: #f1f3f5;
    --section-alt-bg: #ffffff;
    --primary-color: #007bff;
    --secondary-color: #17a2b8; /* Adjusted teal for light bg */
    --border-color: #dee2e6;
    --code-bg: #f8f9fa; /* Light background for editor */
    --code-text: #333333; /* Monaco handles internal text */
    --link-color: var(--primary-color);
    --link-hover-color: #0056b3;
    --button-text-color: #fff;
    --footer-text-color: #6c757d;
    --placeholder-text-color: #6c757d;
    --feature-item-bg: #ffffff;
    --tech-item-bg: #ffffff;
    --hero-gradient-start: rgba(248, 249, 250, 0.8);
    --hero-gradient-end: rgba(248, 249, 250, 0.8);
    --box-shadow-color: rgba(0, 122, 204, 0.2);
    --switcher-border-color: var(--border-color);
    --switcher-hover-bg: #e9ecef;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--background-color);
    transition: background-color 0.3s ease, color 0.3s ease; /* Smooth theme transition */
    scroll-behavior: smooth;
}

header {
    background: var(--header-bg);
    color: var(--text-color);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

nav {
    max-width: 1200px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

nav .logo {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--secondary-color);
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 1.8rem;
}

nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active { /* Add active class possibility */
    color: var(--link-hover-color);
}

/* Language Switcher Styles */
.lang-switcher {
    margin-left: 2rem; /* Add some space from the nav links */
}

.lang-switcher button {
    background: none;
    border: 1px solid var(--switcher-border-color);
    color: var(--text-color);
    padding: 0.3rem 0.6rem;
    margin-left: 0.5rem;
    cursor: pointer;
    border-radius: 3px;
    font-size: 0.9em;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.lang-switcher button:hover {
    background-color: var(--switcher-hover-bg); /* Slightly darker on hover */
    color: var(--link-hover-color);
}

.lang-switcher button.active {
    background-color: var(--primary-color);
    color: var(--button-text-color); /* Use variable */
    border-color: var(--primary-color);
}

/* Theme Switcher Styles */
.theme-switcher {
    margin-left: 1rem; /* Space from language switcher */
}

#theme-toggle-button {
    background: none;
    border: 1px solid var(--switcher-border-color);
    color: var(--text-color);
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    border-radius: 3px;
    font-size: 1.1em; /* Make icon slightly larger */
    line-height: 1; /* Adjust line height for better vertical alignment */
    transition: background-color 0.3s ease, color 0.3s ease;
}

#theme-toggle-button:hover {
    background-color: var(--switcher-hover-bg);
    color: var(--link-hover-color);
}

main {
    max-width: 1200px;
    margin: 0 auto; /* Remove top margin */
    padding: 0; /* Remove padding */
}

section {
    padding: 4rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--section-bg);
}

section:nth-child(odd) { /* Alternate background for sections */
   background-color: var(--section-alt-bg);
}

section:last-of-type {
    border-bottom: none;
}

.hero {
    text-align: center;
    padding: 5rem 2rem;
    background: radial-gradient(circle at top, rgba(0, 122, 204, 0.18), transparent 35%), linear-gradient(var(--hero-gradient-start), var(--hero-gradient-end));
    background-color: var(--section-alt-bg); /* Fallback */
    border-bottom: 1px solid var(--border-color);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    font-weight: 700;
}
.hero h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-weight: 300; /* Lighter weight for subtitle */
}


.hero p {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    color: var(--text-color);
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.hero-badges,
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.hero-badges {
    margin-bottom: 2rem;
}

.hero-badges span {
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background-color: var(--feature-item-bg);
    font-size: 0.95rem;
}

.hero-actions {
    margin-top: 2rem;
}

.screenshot-placeholder {
    max-width: 1100px;
    margin: 0 auto;
}

.screenshot-placeholder img {
    border: 1px solid var(--border-color);
    background-color: var(--header-bg); /* Placeholder bg */
    margin-bottom: 0.5rem;
    border-radius: 10px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
    width: 100%;
    height: auto;
}
.screenshot-placeholder p small {
    color: var(--placeholder-text-color); /* Use variable */
}


.cta-button, .secondary-button {
    display: inline-block;
    color: var(--button-text-color); /* Use variable */
    padding: 0.9rem 2rem;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.cta-button {
    background-color: var(--primary-color);
}

.cta-button:hover {
    background-color: var(--link-hover-color);
    transform: translateY(-2px); /* Subtle lift effect */
    box-shadow: 0 4px 8px var(--box-shadow-color); /* Use variable */
}

.secondary-button {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.secondary-button:hover {
    background-color: var(--primary-color);
    color: var(--button-text-color); /* Use variable */
}


section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.section-intro {
    max-width: 760px;
    margin: 0 auto 2rem;
    text-align: center;
}

/* SQL Editor Section Styles */
#editor {
    text-align: center;
}

#editor p {
    max-width: 700px;
    margin: 0 auto 2rem auto;
}

/* Remove or comment out the old pre styling if not needed elsewhere */
/*
pre {
    background-color: var(--code-bg);
    color: var(--code-text);
    padding: 1.5rem;
    border-radius: 5px;
    overflow-x: auto;
    text-align: left;
    max-width: 800px;
    margin: 1rem auto 2rem auto;
    border: 1px solid var(--border-color);
}
*/

/* Remove Monaco Editor Container Styles */
/*
#sql-editor-container {
    height: 250px;
    max-width: 800px;
    margin: 1rem auto 2rem auto;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    text-align: left;
}
*/

/* Add styles for the new pre/code block if needed (Prism themes often handle this) */
#editor pre {
    max-width: 800px; /* Maintain max-width */
    margin: 1rem auto 2rem auto; /* Maintain centering and margins */
    text-align: left;
    border-radius: 5px; /* Optional: match previous style */
    border: 1px solid var(--border-color); /* Optional: match previous style */
    font-size: 14px; /* Match Monaco font size */
    /* Prism themes usually set background, text color, padding, and overflow */
}

/* Features Section */
.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-item {
    background: var(--feature-item-bg); /* Slightly different background */
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.feature-item i { /* Placeholder for icons */
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    /* Add display: block; if using actual icon font */
}

.feature-item h3 {
    margin-bottom: 0.8rem;
    color: var(--secondary-color);
    font-size: 1.3rem;
}

.feature-item p {
    font-size: 0.95rem;
    color: var(--text-color); /* Fix typo: remove space */
}

/* Technology Section */
#tech {
    text-align: center;
}
/* Remove old list styles */
/*
#tech ul { ... }
#tech ul li { ... }
#tech ul li strong { ... }
*/

/* New Grid Layout for Tech Stack */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Adjust minmax as needed */
    gap: 1.5rem;
    margin-top: 2rem;
    max-width: 900px; /* Optional: Limit grid width */
    margin-left: auto;
    margin-right: auto;
}

.tech-item {
    background: var(--tech-item-bg); /* Use variable */
    padding: 1.5rem 1rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.tech-item:hover {
    transform: translateY(-3px);
}

.tech-item strong {
    display: block; /* Make strong element block level */
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.tech-item span {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8; /* Slightly dimmer description text */
}

/* Style links within tech items */
.tech-item a {
    text-decoration: none; /* Remove underline */
    color: inherit; /* Inherit text color from parent */
}

.tech-item a:hover strong { /* Optional: Add hover effect to strong tag */
    color: var(--link-hover-color);
}

/* Download Section */
#download {
    text-align: center;
}

#download p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.install-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 2rem auto 2.5rem;
}

.install-card {
    background: var(--feature-item-bg);
    padding: 1.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.install-card h3 {
    margin-bottom: 0.75rem;
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.install-card p {
    margin-bottom: 0;
    font-size: 0.98rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 0; /* Remove margin */
    background: var(--header-bg);
    color: var(--footer-text-color); /* Use variable */
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

footer a {
    color: var(--link-color);
    text-decoration: none;
}

footer a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

/* Contact Section Styles */
#contact {
    text-align: center;
    background-color: var(--section-alt-bg);
    padding: 4rem 2rem; /* Ensure consistent section padding */
}

#contact h2 { /* Ensure contact title matches other section titles */
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--secondary-color);
}

#contact form {
    max-width: 600px;
    margin: 0 auto; /* Remove top margin, center horizontally */
    text-align: left;
    background-color: var(--section-bg); /* Give form a slightly different background */
    padding: 2.5rem; /* Add padding inside the form */
    border-radius: 8px; /* Add rounded corners */
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Add subtle shadow */
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem; /* Slightly more space */
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem; /* Adjust label font size */
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 0.9rem; /* Increase padding */
    border: 1px solid var(--border-color);
    background-color: var(--background-color);
    color: var(--text-color);
    border-radius: 5px; /* Consistent border-radius */
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease; /* Add transitions */
}

/* Add focus styles */
.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--box-shadow-color); /* Highlight focus */
}

.form-group textarea {
    resize: vertical;
    min-height: 120px; /* Set a minimum height */
}

#contact form button {
    display: block;
    width: 100%; /* Make button full width */
    /* margin: 0 auto; */ /* No longer needed */
    padding: 0.9rem 2rem; /* Ensure consistent padding with other buttons */
    font-size: 1.1rem; /* Match other buttons */
    margin-top: 1rem; /* Add margin above button */
}

.form-status-message {
    margin-top: 1.5rem;
    text-align: center;
    font-weight: 500;
    padding: 0.8rem; /* Add padding */
    border-radius: 5px; /* Add border-radius */
    display: none; /* Hide by default, show via JS */
}

.form-status-message.success {
    color: #155724; /* Darker green text */
    background-color: #d4edda; /* Light green background */
    border: 1px solid #c3e6cb; /* Green border */
    display: block; /* Show when class is added */
}

.form-status-message.error {
    color: #721c24; /* Darker red text */
    background-color: #f8d7da; /* Light red background */
    border: 1px solid #f5c6cb; /* Red border */
    display: block; /* Show when class is added */
}

/* Responsive Adjustments (Optional Example) */
@media (max-width: 768px) {
    nav {
        /* Remove flex-direction: column; */
        flex-wrap: wrap; /* Allow items to wrap */
        justify-content: center; /* Center items horizontally */
        padding: 0.8rem 1rem;
    }
    nav .logo {
        width: 100%; /* Make logo take full width in the first row */
        text-align: center; /* Center the logo text */
        margin-bottom: 0.5rem; /* Add space below logo */
    }
    nav ul {
        /* Remove flex-direction: column; */
        /* Remove align-items: center; */
        /* Remove margin-top: 0.8rem; */
        width: 100%; /* Allow ul to take full width */
        justify-content: center; /* Center nav links */
        flex-wrap: wrap; /* Allow links to wrap if needed */
        padding: 0; /* Reset padding if any */
        margin-bottom: 0.5rem; /* Space below links */
    }
    nav ul li {
        margin: 0.3rem 0.5rem; /* Adjust horizontal and vertical margins */
        margin-left: 0; /* Override default left margin */
    }
    /* Remove rule to reduce font size for nav links on mobile */
    /*
    nav ul li a {
        font-size: 0.95rem;
    }
    */
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero h2 {
        font-size: 1.5rem;
    }
    .hero-badges span {
        width: 100%;
    }
    section h2, #contact h2 { /* Adjust section title size */
        font-size: 2rem;
    }
    /* Adjust Monaco container width on smaller screens if needed */
    /*
    #sql-editor-container {
        max-width: 90%;
    }
    */
    /* Adjust pre width on smaller screens if needed */
    #editor pre {
        max-width: 90%;
    }
    .lang-switcher {
        /* Remove margin-top: 0.8rem; */
        margin-left: 0.5rem; /* Add some horizontal space */
        margin-right: 0.5rem;
        /* text-align: center; */ /* No longer needed if nav is centered */
    }
    .theme-switcher {
        /* Remove margin-top: 0.5rem; */
        margin-left: 0.5rem; /* Add some horizontal space */
        /* Align with lang switcher */
    }
    /* Group switchers together if needed */
    .lang-switcher, .theme-switcher {
         margin-bottom: 0.5rem; /* Add some bottom margin */
    }
}
