/* Base styles */
html, body {
    height: 100%; /* Ensure html and body take full viewport height */
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Prevent horizontal scrollbar */
}

body {
    font-family: 'Inter', sans-serif;
    color: #333;
    position: relative;
    display: flex; /* Use flexbox for body to manage overall layout */
    flex-direction: column;
}

/* --- Video Background Styles --- */
#background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2; /* Ensure video is behind everything */
    filter: brightness(0.8); /* Keep the video slightly darker */
}

/* --- Header & Navigation --- */
header {
    background-color: transparent !important; /* Force no background */
    border: none !important; /* Ensure no inherited border */
    box-shadow: none !important; /* Ensure no inherited shadow */
    position: relative;
    z-index: 20;
    width: 100%;
    padding: 1rem 1.5rem;
    box-sizing: border-box;
    display: flex; /* Apply flex to header itself to center nav */
    justify-content: center; /* Center nav content */
    align-items: center;
}

/* Hamburger Button (now for all views) */
#hamburger-btn {
    color: white !important; /* Force hamburger icon to be white */
    font-size: 2.5rem; /* Make it more prominent */
    background: none !important; /* No background */
    border: none !important; /* No border */
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1; /* Adjust vertical alignment */
}

/* --- Mobile Menu Container (now in document flow) --- */
/* Default (closed) state */
#mobile-menu {
    position: fixed; /* Make it fixed relative to viewport for centering */
    top: 0; /* Align to top */
    left: 50%; /* Start at horizontal center */
    transform: translateX(-50%) translateY(-100%); /* Center and hide above viewport */
    width: 90%; /* Responsive width */
    max-width: 800px; /* Max width for larger screens */

    background-color: rgba(31, 41, 55, 0.95); /* bg-gray-800 with opacity */
    border-radius: 0 0 1.5rem 1.5rem; /* Rounded bottom corners */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 50; /* Ensure it's above the overlay and content */
    text-align: center; /* Center menu items */
    padding: 1.5rem;
    box-sizing: border-box;

    opacity: 0; /* Start fully transparent */
    visibility: hidden; /* Start completely hidden */
    pointer-events: none; /* Not clickable when hidden */
    transition: transform 0.4s ease-out, opacity 0.4s ease-out, visibility 0.4s ease-out; /* Smooth transitions */
}

/* Class added by JS when menu is open */
#mobile-menu.mobile-menu-open {
    transform: translateX(-50%) translateY(0); /* Slide down to center */
    opacity: 1; /* Fully opaque */
    visibility: visible; /* Make visible */
    pointer-events: auto; /* Make clickable */
}

/* Close button inside the menu */
#close-menu-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: white !important;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
}

/* Menu items inside the mobile menu */
#mobile-menu ul {
    list-style: none; /* Remove bullet points */
    padding: 0;
    margin-top: 1.5rem; /* Space from close button */
}
#mobile-menu li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
#mobile-menu li:last-child {
    border-bottom: none;
}


/* Menu Overlay (for dimming the page) */
#menu-overlay {
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black overlay */
    z-index: 40; /* Above content, below menu */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0; /* Start hidden */
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

#menu-overlay:not(.hidden) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* --- Main Content Wrapper --- */
.content-wrapper {
    position: relative;
    z-index: 1; /* Below header/menu, above video */
    flex-grow: 1; /* Allow content to grow and take available space */
    display: flex;
    justify-content: center;
    align-items: center; /* Center content vertically */
    padding: 2rem;
    box-sizing: border-box;
}

/* --- Container for the Form (applies to both main and contact forms) --- */
.container {
    background-color: rgba(255, 255, 255, 0.9) !important; /* Force form background opacity to 90% */
    padding: 2.5rem; /* Generous internal padding */
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 1200px !important; /* Force max-width to 1200px */
    width: 90% !important; /* Add width to ensure it takes space up to max-width */
    border: 1px solid rgba(224, 224, 224, 0.5); /* Lighter, semi-transparent border */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

/* Specific styling for the contact form container if different max-width is desired */
.contact-form-container {
    max-width: 800px !important; /* Adjust max-width for contact form if desired */
}


/* --- Logo Styling --- */
.logo-image {
    width: 400px; /* Logo width set to 400px */
    height: auto;
    max-width: 100%; /* Ensure responsiveness on smaller screens */
    display: block; /* Ensure it's a block element for centering */
    margin-left: auto;
    margin-right: auto;
}


/* --- Form Elements --- */
.form-group {
    margin-bottom: 1.5rem; /* Consistent spacing below each form group */
}
label {
    display: block;
    margin-bottom: 0.75rem; /* Increased spacing below labels for clarity */
    font-weight: 600;
    color: #4E4D4D !important; /* Retained label color to #4E4D4D */
    font-size: 1.125rem;
    text-shadow: none !important; /* Retained muted drop shadow */
}
input[type="text"],
input[type="number"],
input[type="email"], /* Added email input */
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem !important; /* IMPORTANT: Added vertical and horizontal padding for inputs/selects */
    height: 3.25rem !important; /* IMPORTANT: Consistent height for input and select */
    border: 1px solid #cbd5e0;
    border-radius: 0.5rem;
    font-size: 1rem;
    color: #2d3748;
    box-sizing: border-box;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    background-color: rgba(255, 255, 255, 0.5) !important; /* Force text field background opacity at 50% */
}
textarea {
    height: auto !important; /* Override fixed height for textarea */
    min-height: 80px;
    resize: vertical;
}

/* Placeholder text styling */
input::placeholder,
textarea::placeholder {
    color: rgba(45, 55, 72, 0.7) !important; /* Slightly more opaque placeholder */
    opacity: 1; /* Firefox default opacity override */
}

/* Custom Select Arrow */
select {
    -webkit-appearance: none; /* Remove default arrow for Chrome/Safari */
    -moz-appearance: none; /* Remove default arrow for Firefox */
    appearance: none; /* Remove default arrow */
    background-image: url('data:image/svg+xml;utf8,<svg fill="%234A5568" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>') !important;
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.5em; /* Adjust arrow size */
    padding-right: 2.5rem !important; /* Make space for the custom arrow, IMPORTANT for padding */
}


input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus, /* Added email focus */
textarea:focus,
select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    outline: none;
    background-color: rgba(255, 255, 255, 0.7) !important; /* Slightly less opaque on focus */
}


/* --- Fieldset and Legend Styling --- */
.form-fieldset {
    border: 1px solid rgba(224, 224, 224, 0.5); /* Subtle border for grouping */
    border-radius: 0.75rem;
    padding: 1rem 1.5rem 0.5rem; /* Adjust padding */
    margin-bottom: 1.5rem; /* Consistent spacing */
}

.form-legend {
    font-weight: 600;
    color: #4E4D4D !important; /* Consistent label color */
    font-size: 1.125rem;
    padding: 0 0.5rem; /* Padding around text */
    margin-left: -0.5rem; /* Pull legend slightly left to align with fieldset border */
}


/* --- Generate/Submit Button Styling --- */
#generateBtn, #submitBtn { /* Apply styles to both generate and submit buttons */
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    display: block;
    width: 100%;
    padding: 1rem 1.5rem;
    background-color: #193062 !important; /* Solid blue color */
    color: white;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out;
}
#generateBtn:hover:not(:disabled), #submitBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    background-color: #284A95 !important; /* Lighter shade on hover */
}
#generateBtn:disabled, #submitBtn:disabled {
    background-color: #88A9FF !important; /* Lighter shade when disabled */
    cursor: not-allowed;
    box-shadow: none;
    background-image: none !important; /* Ensure no gradient when disabled */
}

/* --- Copy to Clipboard Button Styling --- */
#copyBtn {
    display: block;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    padding: 1rem 1.5rem;
    background-color: #D38E10 !important; /* Solid orange color */
    color: white;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out;
}
#copyBtn:hover:not(:disabled) {
    background-color: #D79835 !important; /* Lighter shade on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}


.output-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(226, 232, 240, 0.5); /* Lighter, semi-transparent border */
}
#generatedDescription {
    background-color: rgba(248, 250, 252, 0.8) !important; /* Slightly more opaque background for output text */
    border: 1px dashed rgba(203, 213, 224, 0.5); /* Lighter, semi-transparent dashed border */
    padding: 1.5rem;
    min-height: 150px;
    white-space: pre-wrap;
    word-wrap: break-word;
    border-radius: 0.75rem;
    font-size: 1.15rem;
    line-height: 1.75;
    color: #2d3748;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}
#formMessages { /* Styling for success/error messages */
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    font-weight: 600;
    text-align: center;
}
.form-success {
    background-color: rgba(16, 185, 129, 0.2); /* green-500 with opacity */
    color: #065F46; /* green-900 */
}
.form-error {
    background-color: rgba(239, 68, 68, 0.2); /* red-500 with opacity */
    color: #991B1B; /* red-900 */
}
#loadingMessage {
    text-align: center;
    font-style: italic;
    color: white !important; /* Force loading message color to white */
    margin-top: 1rem;
    font-size: 1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5); /* Added subtle shadow for readability */
}
.hidden {
    display: none;
}

/* --- Cookie Notification Styles --- */
#cookie-notification {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background-color: rgba(0, 0, 0, 0.85); /* Dark, semi-transparent background */
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 100; /* Ensure it's on top of everything */
    opacity: 0; /* Initially hidden */
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

#cookie-notification.show {
    opacity: 1;
    visibility: visible;
}

#cookie-notification p {
    margin: 0;
    font-size: 0.95rem;
    text-align: center;
    line-height: 1.4;
}

#cookie-notification #accept-cookies-btn {
    display: inline-block;
    width: auto;
    max-width: 200px;
    padding: 0.75rem 1.5rem;
    background-color: #3E6DFF;
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out;
    margin-top: 0;
    box-shadow: none;
}

#cookie-notification #accept-cookies-btn:hover {
    background-color: #2A5BD5;
    transform: translateY(-1px);
}


/* --- Responsive Adjustments --- */
@media (max-width: 767px) { /* Mobile styles */
    .container {
        padding: 1.5rem;
        margin: 1rem;
    }
    label {
        font-size: 1rem;
    }
    #generateBtn,
    #copyBtn,
    #submitBtn { /* Added submitBtn here */
        font-size: 1.125rem;
        max-width: 100%; /* Ensure buttons are full width on mobile */
    }
    #generatedDescription {
        font-size: 1rem;
        padding: 1rem;
    }
    .logo-image {
        width: 100%; /* Full width logo on mobile */
        max-width: 250px; /* But keep it from being too huge */
    }
    #cookie-notification {
        padding: 1rem;
        bottom: 0.5rem;
        width: 95%; /* Wider on small screens */
    }
}
