:root {
    --primary-color: #4a90e2;
    --secondary-color: #f5a623;
    --background-color: #232629;
    --text-color: #333;
    --border-color: #e0e0e0;
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

h1, h2 {
    margin-bottom: 20px;
}


/* Gradient Text for Title */
h1 {
    background: linear-gradient(to right, #ff5f6d, #ffc371);
    -webkit-background-clip: text;
    color: transparent;
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.05); /* Apply text shadow */
}

/* Wrapper for the title, subtitle, and dynamic info */
.title-wrapper {
    text-align: center;
    margin-bottom: 20px; /* Add spacing between the header and other sections */
}

/* Subtitle styling */
.subtitle {
    font-weight: 400;
    margin-top: -10px; /* Fine-tune spacing */
    margin-left: 250px;
    font-size: 1.2rem;
}

.subtitle a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

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

/* Dynamic info styling */
.dynamic-info p {
    margin: 5px 0; /* Add spacing between dynamic paragraphs */
    font-size: 1rem; /* Set a consistent font size */
    color: #888; /* Neutral color for the placeholders */
}

main {
    display: flex;
    gap: 30px;
}

.left-column, .right-column {
    flex: 1;
}

section {
    background-color: #f7f7f7;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
    padding: 0 20px; /* Align with the card's inner padding */
    box-sizing: border-box;
}

/* Style the label for better readability */
.form-group label {
    display: block;
    margin-bottom: 8px; /* Slightly smaller margin for labels */
    font-weight: bold;
    color: var(--text-color);
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="text"], input[type="file"], select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
}

/* General button styles */
/* Gradient Button */
/* Button with dual gradient, shimmer effect, and pulse glow */
button, input[type="button"], input[type="file"] {
    position: relative;
    background: linear-gradient(45deg, #ff5f6d, #ffc371);
    background-size: 200% 200%;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 50px; /* Rounded button */
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 0 15px rgba(255, 99, 71, 0.5), 0 0 20px rgba(255, 193, 113, 0.3); /* Initial glow */
    transition: all 0.4s ease; /* Smooth transition */
}

button:hover {
    background-position: right center; /* Animate the background gradient */
    box-shadow: 0 0 25px rgba(255, 99, 71, 0.7), 0 0 30px rgba(255, 193, 113, 0.5); /* Enhanced glow on hover */
}

/* Shimmer effect using ::before pseudo-element */
button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.3);
    transform: skewX(-45deg);
    z-index: 0;
    transition: all 0.5s ease;
    animation: shimmer 2s infinite;
    pointer-events: none; /* Ensures the shimmer doesn't interfere with clicking */
}

@keyframes shimmer {
    0% {
        left: -200%;
    }
    50% {
        left: 200%;
    }
    100% {
        left: 200%;
    }
}

/* Add a glowing border on hover */
button:hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50px;
    border: 3px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5), 0 0 20px rgba(255, 255, 255, 0.4);
    z-index: 2;
}

/* Pulsing glow effect */
button:hover {
    animation: pulse-glow 1.5s infinite;
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 15px rgba(255, 99, 71, 0.5), 0 0 20px rgba(255, 193, 113, 0.3);
    }
    50% {
        box-shadow: 0 0 35px rgba(255, 99, 71, 0.9), 0 0 40px rgba(255, 193, 113, 0.7);
    }
    100% {
        box-shadow: 0 0 15px rgba(255, 99, 71, 0.5), 0 0 20px rgba(255, 193, 113, 0.3);
    }
}

/* Press effect for depth when clicking the button */
button:active {
    transform: scale(0.95); /* Slightly shrink the button on click */
    box-shadow: 0 0 10px rgba(255, 99, 71, 0.7), 0 0 15px rgba(255, 193, 113, 0.5); /* Reduced glow on press */
}



textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    resize: none;
}



/* Unified Placeholder Styling for Image and Video */
#imagePlaceholder, #videoPlaceholder {
    background-color: #f0f0f0;
    width: 100%; /* Ensure it takes the full width available */
    max-width: 600px; /* Set a consistent max width */
    height: 300px; /* Set consistent height */
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    color: #888;
    font-style: italic;
    margin: 0 auto; /* Center-align the placeholders */
    box-sizing: border-box;
}


.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.gallery-item {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}

/* Make sure videos inside the gallery item also use object-fit */
.gallery-item video {
    object-fit: cover;
    width: 100%;
    height: 100%;
}


#trainingOutput {
    background-color: #f0f0f0;
    padding: 10px;
    border-radius: 4px;
    margin-top: 20px;
    font-family: monospace;
    white-space: pre-wrap;
    text-align: center; /* Center align the content for better visual appearance */
}

#existingModelsForm {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#existingModelsForm label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

#existingModelsForm input[type="radio"] {
    margin: 0;
}





/* Add these styles to the existing styles.css file */

.error-message {
    background-color: #ff6b6b;
    color: white;
    padding: 10px;
    border-radius: 4px;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#imageOutput img {
    max-width: 100%;
    max-height: 450px; /* Limit the height */
    width: auto; /* Maintain aspect ratio */
    height: auto; /* Maintain aspect ratio */
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    display: block; /* Ensure it doesn't overflow */
    margin: 0 auto; /* Center horizontally */
    object-fit: contain; /* Ensure the image fits within the container */
}

#imageContent {
    display: flex;
    justify-content: center; /* Center image horizontally */
    align-items: center; /* Center image vertically */
    width: 100%; /* Ensure full width */
    max-width: 100%; /* Prevent overflow horizontally */
    max-height: 450px; /* Limit the height of the container */
    overflow: hidden; /* Hide overflow if the image is too large */
}


/* Limit generated video content to max 450px */
#videoOutput video {
    max-width: 100%; /* Ensures it scales proportionally within the wrapper */
    max-height: 450px; /* Restrict maximum height */
    width: auto; /* Maintain aspect ratio */
    height: auto; /* Maintain aspect ratio */
    margin: 0 auto; /* Center the video horizontally */
    display: block; /* Block-level for centering */
}


#sign-in {
    text-align: center;
    margin-bottom: 30px;
}

#sign-in .highlight {
    font-weight: bold;
    color: var(--primary-color);
}

.spacer {
    height: 30px;
}

#sign-in-container {
    max-width: 400px;
    margin: 0 auto;
}

/* Responsive design */
@media (max-width: 768px) {
    main {
        flex-direction: column;
    }

    .left-column, .right-column {
        width: 100%;
    }
}

/* Additional responsiveness for smaller mobile devices (max-width: 480px) */
@media (max-width: 480px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }

    input[type="text"], input[type="file"], select {
        font-size: 14px;
        padding: 8px;
    }

    button, input[type="button"], input[type="file"] {
        font-size: 14px;
        padding: 8px;
    }

    .custom-select {
        font-size: 14px;
        padding: 8px;
    }

    

    .left-column, .right-column {
        margin-bottom: 20px;
    }
    
    .modal-content {
        max-width: 90%;
        margin: 10% auto;
    }

    #cameraFeed {
        width: 100%;
        max-width: 100%;
    }

    #takePicture, #closeModal {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Specific styles for the file input buttons */
.upload-option input[type="file"] {
    display: none; /* Hide the default file input */
}

/* Fix for .upload-option buttons */

/* Container styling for better alignment */
.upload-options {
    display: flex; /* Align buttons in a row */
    gap: 15px; /* Add spacing between buttons */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

/* Specific styles for upload buttons */
.upload-option {
    display: inline-block; /* Keep buttons inline */
    width: auto; /* Ensure the button width matches its content */
    padding: 10px 20px; /* Add appropriate padding for button text */
    background-color: #17a2b8; /* Consistent button background */
    color: white; /* Button text color */
    border-radius: 5px; /* Rounded corners */
    cursor: pointer; /* Pointer cursor for interactivity */
    text-align: center; /* Center-align text inside the button */
    box-sizing: border-box; /* Include padding and border in width calculation */
    transition: background-color 0.3s ease, opacity 0.3s ease;
}

/* Ensure hidden file input doesn't interfere */
.upload-option input[type="file"] {
    display: none; /* Hide default file input */
}

/* Hover state for buttons */
.upload-option:hover {
    background-color: #138496; /* Darker shade for hover */
    opacity: 1; /* Ensure full opacity */
}

/* Responsive fix for buttons to ensure proper alignment */
@media (max-width: 768px) {
    .upload-options {
        gap: 10px; /* Reduce spacing between buttons */
    }

    .upload-option {
        width: auto; /* Prevent buttons from stretching full width */
        padding: 10px 15px; /* Adjust padding for smaller screens */
    }
}



.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.image-preview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    max-width: 500px;
    text-align: center;
}

#cameraFeed {
    width: 100%;
    max-width: 400px;
    margin-bottom: 20px;
}

#takePicture, #closeModal {
    margin: 0 10px;
}

/* Dropdown model selection menu */
.select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.select-wrapper::after {
    content: '\25BC';
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-color);
    font-size: 14px;
    transition: all 0.3s ease;
}

.select-wrapper:hover::after {
    color: var(--primary-color);
}

.custom-select::-ms-expand {
    display: none;
}

.custom-select option {
    padding: 12px;
}

/* Loading state for image generation */
#imageLoading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    background-color: #f0f0f0;
    border-radius: 8px;
}

.loading-gif {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
}

#imageLoading p {
    color: var(--text-color);
    font-style: italic;
}



.error {
    color: #ff4444;
    font-weight: bold;
}

#trainingGifContainer img {
    max-width: 100%;
}

/* New model notification styles */
.notification-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.notification {
    position: relative;
    padding: 10px 15px;
    background-color: #ffffff;
    border: 2px solid #4a90e2;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between; /* Ensure space between text and close button */
    z-index: 10;
}

.notification::before {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #4a90e2;
}

.notification p {
    margin: 0;
    font-size: 14px;
    color: #333;
}

.close-button {
    background: none;
    border: none;
    color: #4a90e2;
    font-size: 18px;
    cursor: pointer;
    margin-left: 15px;
    padding: 0;
    line-height: 1;
}

.hidden {
    display: none;
}


/* General header styles */
.floating-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Semi-transparent background */
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); /* Subtle shadow */
    backdrop-filter: blur(10px); /* Glass-like effect */
}

.header-left {
    flex: 1;
}

.site-logo {
    width: 50px;
    height: auto;
}

/* Center the navigation links */
.nav-bar {
    flex: 2;
    text-align: center;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: space-between;
    gap: 30px; /* Space between links */
}

.nav-links li {
    display: inline-block;
}

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

.nav-links a:hover {
    color: #ff5f6d; /* Hover color */
}

/* Social media icons on the right */
.header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.social-icon {
    width: 24px;
    height: auto;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.social-icon:hover {
    opacity: 0.7; /* Fades on hover */
}

/* Hamburger menu for mobile */
.hamburger-menu {
    display: none; /* Hidden by default */
    flex-direction: column;
    cursor: pointer;
}

.hamburger-menu span {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 4px 0;
    transition: 0.4s;
}

/* Mobile menu (hidden initially) */
.mobile-menu {
    display: none;
    background-color: rgba(0, 0, 0, 0.9);
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    padding-top: 50px;
}

.mobile-nav-links {
    list-style: none;
    padding: 0;
}

.mobile-nav-links li {
    margin-bottom: 20px;
}

.mobile-nav-links a {
    color: white;
    font-size: 1.5rem;
    text-decoration: none;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Hide main nav links */
    }

    .hamburger-menu {
        display: flex; /* Show hamburger menu on mobile */
    }
}

/* Display mobile menu when hamburger is clicked */
.hamburger-menu.active ~ .mobile-menu {
    display: block;
}

/* Responsive design for site logo and social icons */
@media (max-width: 480px) {
    .site-logo {
        width: 40px;
    }

    .social-icon {
        width: 20px;
    }
}

/* General header styles */
.floating-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    overflow: hidden; /* Prevent overflow */
    box-sizing: border-box;
    height: 40px;
}

/* Left: Logo */
.header-left {
    flex: 1; /* Ensure the logo takes up its space */
}

.site-logo {
    width: 25px;
    height: auto;
}

/* Center: Navigation (ensures titles are centered) */
.nav-bar {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 40px; /* Increase gap between menu items */
}

.nav-links li {
    display: inline-block;
}

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

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

/* Right: Social Icons */
.header-right {
    flex: 1; /* Keep space for social icons */
    display: flex;
    justify-content: flex-end; /* Align icons to the right */
    align-items: center;
    gap: 15px;
    overflow: hidden;
}

.social-icon {
    width: 25px;
    height: 25px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.social-icon:hover {
    opacity: 0.7;
}

/* Hamburger menu for mobile */
.hamburger-menu {
    display: none; /* Hidden by default */
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    position: absolute;
    right: 20px; /* Align to the right */
    top: 15px; /* Proper spacing from top */
}

.hamburger-menu span {
    width: 25px;
    height: 3px;
    background-color: white;
    transition: 0.4s;
}

/* Mobile menu (hidden initially) */
.mobile-menu {
    display: none;
    background-color: rgba(0, 0, 0, 0.9);
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    padding-top: 50px;
}

.mobile-nav-links {
    list-style: none;
    padding: 0;
}

.mobile-nav-links li {
    margin-bottom: 20px;
}

.mobile-nav-links a {
    color: white;
    font-size: 1.5rem;
    text-decoration: none;
}

/* Show social icons inside the mobile menu */
.mobile-nav-links .social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Hide the main nav links */
    }

    .header-right {
        display: none; /* Hide the social icons from the header on mobile */
    }

    .hamburger-menu {
        display: flex; /* Show hamburger menu on mobile */
    }

    /* Show the mobile menu when the hamburger is clicked */
    .hamburger-menu.active ~ .mobile-menu {
        display: block;
    }

    .mobile-nav-links .social-icons {
        display: flex; /* Show social icons inside the mobile menu */
    }

    /* Resize the logo for mobile */
    .site-logo {
        width: 15px;
    }
}

/* Even smaller screens (max-width: 480px) */
@media (max-width: 480px) {
    .floating-header {
        padding: 10px;
    }

    .nav-bar {
        text-align: left; /* Align the collapsed nav left */
    }

    .site-logo {
        width: 15px;
    }

    .social-icon {
        width: 18px;
    }
}

/* Container for the background image */
.background-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* Full height of the viewport */
    z-index: -1; /* Lower z-index to ensure it stays behind */
    overflow: hidden; /* Hide any overflow if the image is large */
}



/* Background image styling with animation */
.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%; /* Double the width to ensure smooth rolling */
    height: 100%;
    object-fit: cover;
    
    opacity: 0.7; /* Optional: Adjust for subtle effect */
    animation: roll 20s linear infinite; /* Apply rolling animation */
    
}


/* Keyframes for rolling animation */
@keyframes roll {
    0% {
        transform: translateX(0); /* Start position */
    }
    100% {
        transform: translateX(-50%); /* End position */
    }
}

/* Ensure buttons are absolutely positioned in the upper-right corner */
.copy-btn, .download-btn {
    position: absolute;
    top: 10px; /* Adjust this value to move the button vertically */
    right: 10px; /* Position the download button to the right */
    background-color: rgba(255, 255, 255, 0.8); /* Light background for visibility */
    color: black; /* Ensure text/icon is visible */
    padding: 5px 8px; /* Smaller padding to keep the buttons small */
    font-size: 1rem; /* Smaller text size */
    border: none; /* No border */
    border-radius: 4px; /* Slightly rounded corners */
    z-index: 100; /* Ensure buttons are above the image */
    cursor: pointer;
    box-shadow: none; /* Remove any shadow effects */
    transition: background-color 0.2s ease-in-out; /* Simple hover effect */
}

/* Position the copy button next to the download button */
#imageWrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.copy-btn, .download-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    color: black;
    padding: 5px 8px;
    font-size: 1rem;
    border: none;
    border-radius: 4px;
    z-index: 100;
    cursor: pointer;
}

.copy-btn {
    right: 50px;
}

.copy-btn:hover, .download-btn:hover {
    background-color: rgba(255, 255, 255, 1);
}

.modal-content.warning {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
}

.modal-content.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

#import-model {
    min-height: 320px; /* Adjust this value to suit your needs */
    padding-bottom: 20px; /* Adjust this value to add space inside the section */
}

#importModelAddress {
    margin-bottom: 20px; /* Adjust the value as per your requirement */
}

/* Drop Zone Styles */
.upload-zone {
    border: 2px dashed #ccc;
    border-radius: 5px;
    padding: 20px;
    text-align: center;
    background-color: #f8f8f8;
    cursor: pointer;
    margin-top: 10px;
    width: calc(100% - 40px); /* Match section's inner padding (20px on each side) */
    max-width: 100%; /* Ensure it doesn't exceed the card's width */
    display: flex;
    flex-direction: column; /* Stack content vertically */
    align-items: center;
    justify-content: center;
    box-sizing: border-box; /* Include padding and border in width calculation */
    transition: background-color 0.3s, border-color 0.3s;
}

.upload-zone:hover {
    background-color: #e8e8e8;
}

.upload-zone.active {
    background-color: #b3f683;
    border-color: #4caf50;
}

.upload-zone p {
    margin: 0;
    font-size: 1rem;
    color: #555;
}

/* Responsive adjustments for medium screens */
@media (max-width: 768px) {
    .upload-zone {
        padding: 15px; /* Reduce padding */
        width: calc(100% - 20px); /* Match reduced section padding */
    }

    .upload-zone p {
        font-size: 0.9rem; /* Slightly smaller text */
    }
}

/* Responsive adjustments for small screens */
@media (max-width: 480px) {
    .upload-zone {
        padding: 10px; /* Reduce padding further */
        border-width: 1.5px; /* Thinner border */
        width: calc(100% - 10px); /* Match further reduced section padding */
    }

    .upload-zone p {
        font-size: 0.85rem; /* Adjust font size */
    }
}


/* Make text inputs fit the cards */
section input[type="text"],
section input[type="number"],
section input[type="url"],
section select,
section textarea {
    width: calc(100% - 40px); /* Reduce width slightly to leave space for padding */
    padding: 10px; /* Ensure a comfortable padding for user interaction */
    margin: 10px 20px; /* Add margin to align with the card's inner padding */
    font-size: 1rem; /* Match the font size to the design language */
    border: 1px solid var(--border-color); /* Consistent border styling */
    border-radius: 4px; /* Rounded corners for modern UI */
    box-sizing: border-box; /* Ensure padding and borders are included in width calculation */
    background-color: #fff; /* Maintain a clean background within the cards */
    transition: all 0.3s ease; /* Add a smooth transition effect for hover/focus */
}

/* Add focus and hover effects for better interactivity */
section input[type="text"]:focus,
section input[type="number"]:focus,
section input[type="url"]:focus,
section select:focus,
section textarea:focus {
    border-color: var(--primary-color); /* Highlight border on focus */
    box-shadow: 0 0 5px rgba(74, 144, 226, 0.5); /* Subtle glow effect */
    outline: none; /* Remove default outline */
}

/* Make the inputs look proportionate within the cards */
section label {
    display: block; /* Ensure labels take up their own line */
    margin: 10px 20px 5px 20px; /* Align with the inputs and add spacing */
    font-weight: bold; /* Emphasize labels for better readability */
}

/* Style the prompt textarea */
#promptInput {
    width: calc(100% - 40px); /* Match the card's width minus padding */
    height: 100px; /* Set a reasonable height for better usability */
    padding: 10px; /* Comfortable padding for text input */
    margin: 10px 20px; /* Align with the card's padding */
    font-size: 1rem; /* Match the font size to the design */
    border: 1px solid var(--border-color); /* Consistent border styling */
    border-radius: 4px; /* Rounded corners for modern UI */
    box-sizing: border-box; /* Ensure proper dimensioning */
    background-color: #333; /* Darker background */
    color: #fff; /* Light text for contrast */
    resize: vertical; /* Allow vertical resizing if needed */
    transition: all 0.3s ease; /* Smooth transition for interactivity */
}

/* Placeholder styling for prompt textarea */
#promptInput::placeholder {
    font-size: 1.2rem; /* Larger font size */
    color: #aaa; /* Lighter color for placeholder text */
}

/* Style the video prompt textarea */
#videoPromptInput {
    width: calc(100% - 40px); /* Match the card's width minus padding */
    height: 100px; /* Set a reasonable height for better usability */
    padding: 10px; /* Comfortable padding for text input */
    margin: 10px 20px; /* Align with the card's padding */
    font-size: 1rem; /* Match the font size to the design */
    border: 1px solid var(--border-color); /* Consistent border styling */
    border-radius: 4px; /* Rounded corners for modern UI */
    box-sizing: border-box; /* Ensure proper dimensioning */
    background-color: #333; /* Darker background */
    color: #fff; /* Light text for contrast */
    resize: vertical; /* Allow vertical resizing if needed */
    transition: all 0.3s ease; /* Smooth transition for interactivity */
}

/* Placeholder styling for video prompt textarea */
#videoPromptInput::placeholder {
    font-size: 1.2rem; /* Larger font size */
    color: #aaa; /* Lighter color for placeholder text */
}


/* Remove default button styles */


/* Specific focus styles to suppress halo effect */
#copyModelButton:focus {
    outline: none; /* Ensure no focus outline */
    box-shadow: none; /* Suppress shadow effects */
}

/* Style the SVG icon */
#copyModelButton svg {
    stroke: var(--primary-color); /* Use primary color for the icon */
    transition: stroke 0.3s ease; /* Smooth color transition */
}

/* Hover effect */
#copyModelButton:hover svg {
    stroke: var(--secondary-color); /* Change icon color on hover */
}

/* Active (pressed) effect */
#copyModelButton:active {
    transform: scale(0.95); /* Slightly shrink on click */
    box-shadow: none; /* Suppress any active box-shadow effects */
}

/* Wrapper for the text input and upload icon */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* Styling for the text input */
#remoteImageLink {
    width: 100%;
    padding-right: 50px; /* Space for the icon */
}

/* Styling for the upload button (icon) */
.upload-icon {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary-color); /* Light blue color */
    transition: color 0.3s ease; /* Smooth transition on hover */
}

/* Hover effect for the upload icon */
.upload-icon:hover {
    color: var(--secondary-color); /* Orangish color on hover */
}



/* Make some section cards of the same hight */
@media (min-width: 992px) { /* Apply to wide screens (desktop and above) */
    #model-training, 
    #import-model {
        min-height: 400px; /* Minimum height */
        display: flex; /* Use flexbox for alignment */
        flex-direction: column; /* Ensure content flows vertically */
        justify-content: space-between; /* Distribute content evenly */
        overflow: visible;
    }
}

@media (min-width: 992px) { /* Apply to wide screens (desktop and above) */
    #image-generation, 
    #generated-image,
    #video-generation,
    #videoOutputSection {
        min-height: 850px; /* Minimum height */
        display: flex; /* Use flexbox for alignment */
        flex-direction: column; /* Ensure content flows vertically */
        justify-content: space-between; /* Distribute content evenly */
        overflow: visible; /* Allow content overflow to be visible */
    }
}

@media (min-width: 992px) { /* Apply only to wide screens */
    #generated-image,
    #videoOutputSection {
       display: flex;
        flex-direction: column; /* Arrange children vertically */
        justify-content: flex-start; /* Ensure content starts at the top */
        align-items: center; /* Center horizontally */
        min-height: 850px; /* Set a minimum height */
        position: relative; /* For absolute positioning if needed */
        padding-top: 20px; /* Optional: Add padding for spacing */
        overflow: visible; /* Ensure no clipping of expanded content */
    }

    /* Ensure the title and download button are at the top */
    #generated-image h2,
    #videoOutputSection h2 {
        margin-bottom: 20px; /* Space below the title */
        text-align: center; /* Center align the title */
    }

   

/* Ensure the card is positioned relative for absolute button placement */
#generated-image {
    position: relative; /* Required for positioning the download button */
}

/* Styling for the download button */
#downloadImageButton {
    position: absolute; /* Position relative to the card */
    top: 10px; /* Distance from the top */
    right: 10px; /* Distance from the right */
    display: flex; /* Flexbox for centering icon */
    align-items: center;
    justify-content: center;
    background-color: transparent; /* Transparent background */
    border: none; /* Remove default border */
    outline: none; /* Remove focus outline */
    color: var(--primary-color); /* Default light blue color */
    cursor: pointer; /* Pointer cursor for interactivity */
    padding: 0; /* Remove padding */
    margin: 0; /* Remove margin */
    z-index: 10; /* Ensure it stays on top */
    transition: color 0.3s ease, transform 0.2s ease; /* Smooth color and interaction effects */
}

/* Hover effect for the download button */
#downloadImageButton:hover {
    color: var(--secondary-color); /* Change to orangish on hover */
    transform: scale(1.1); /* Slight zoom on hover */
}

/* Active effect for the download button */
#downloadImageButton:active {
    transform: scale(0.95); /* Shrink slightly when clicked */
}

/* Styling the SVG inside the download button */
#downloadImageButton svg {
    width: 20px; /* Match size with other buttons */
    height: 20px;
    stroke: var(--primary-color); /* Use primary color */
    transition: stroke 0.3s ease; /* Smooth transition for color */
}

/* Hover effect for the SVG icon */
#downloadImageButton:hover svg {
    stroke: var(--secondary-color); /* Change to orangish on hover */
}

/* Ensure the image gallery matches the width of the columns */
.columns-wrapper + #image-gallery {
    display: block; /* Ensure the section takes full width */
    max-width: 100%; /* Match the full width of the columns-wrapper */
    margin: 0 auto; /* Center the gallery */
    padding: 20px 0; /* Optional padding for aesthetics */
    box-sizing: border-box; /* Include padding in width calculations */
}

/* To explicitly align the gallery with the two columns */
.columns-wrapper {
    max-width: 1200px; /* Or the width set for your columns */
    margin: 0 auto; /* Ensure columns are centered */
    display: flex; /* Flexbox layout for two columns */
}

/* Image Gallery Styling */
#imageGallery {
    display: grid; /* Use grid for layout */
    grid-template-columns: repeat(2, 1fr); /* Two equal columns */
    gap: 15px; /* Space between images */
    width: 100%; /* Ensure gallery spans the full width of its container */
}

/* Gallery Images */
.gallery-item img {
    width: 100%; /* Ensure images fill their containers */
    height: auto; /* Maintain aspect ratio */
    border-radius: 8px; /* Optional: Rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

/* Responsive: Single column layout for smaller screens */
@media (max-width: 768px) {
    #imageGallery {
        grid-template-columns: 1fr; /* Single column for images */
    }

    .columns-wrapper {
        flex-direction: column; /* Stack columns vertically */
    }
}


/* Wrapper for left and right columns */
.columns-wrapper {
    display: flex;
    gap: 30px; /* Space between columns */
    width: 100%;
}

/* Image Gallery Section */
#image-gallery {
    max-width: 1200px; /* Match the container width */
    margin: 30px auto; /* Center the gallery horizontally */
    padding: 20px; /* Add padding for spacing */
    box-sizing: border-box; /* Include padding in width calculation */
}

/* Gallery grid layout */
#imageGallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); /* Responsive grid */
    gap: 15px; /* Space between gallery items */
}

/* Gallery item styles */
.gallery-item img {
    width: 100%; /* Fill the grid cell */
    height: auto; /* Maintain aspect ratio */
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .columns-wrapper {
        flex-direction: column; /* Stack columns vertically */
    }

    #imageGallery {
        grid-template-columns: repeat(2, 1fr); /* Two columns on smaller screens */
    }
}

@media (max-width: 480px) {
    #imageGallery {
        grid-template-columns: 1fr; /* Single column on very small screens */
    }
}

textarea {
    background-color: #333; /* Darker background */
    color: #fff; /* Light text for contrast */
    border: 1px solid #555; /* Subtle border for definition */
    padding: 10px;
    border-radius: 4px; /* Optional for rounded corners */
    transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transitions */
}

/* Optional: Change color on focus */
textarea:focus {
    background-color: #444; /* Slightly lighter on focus */
    color: #fff;
    outline: none; /* Remove default focus outline */
    border-color: #888; /* Highlight border */
}

/* Aspect Ratio For Video Stylews */

.aspect-ratio-icons {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.aspect-ratio-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.3s ease, transform 0.2s ease;
}

.aspect-ratio-icon:hover {
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.aspect-ratio-icon.selected {
    border-color: var(--secondary-color);
    background-color: rgba(245, 166, 35, 0.1);
}



/* Help icon styling */
.help-icon {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    text-align: center;
    line-height: 24px;
    font-size: 16px;
    font-weight: bold;
    margin-left: 10px;
    cursor: pointer;
}

.popup.hidden {
    display: none;
}

/* Popup styling */
.popup {
    display: block;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 20px;
    z-index: 1000;
    width: 80%;
    max-width: 500px;
    max-height: 80vh; /* Limit the height to 80% of the viewport */
    
}

/* Popup content styling */
.popup-content {
    position: relative;
    padding: 10px;
    max-height: 80vh; /* Limit content height to make it scrollable */
    overflow-y: auto; /* Add scrollbars when content overflows */
}

/* Close button styling */
.close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
}

.close-popup:hover {
    color: #000;
}

/* Background overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}


.popup-overlay.active {
    display: block;
}
