body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    /* Background color removed, will be handled by video and overlay */
    color: #e0e0e0;
    font-size: 16px;
    overflow-x: hidden; /* Prevent horizontal scrollbar if video slightly overflows */
}

.background-video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -2;
}

#bgVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(18, 18, 18, 0.75) 0%, rgba(12, 12, 12, 0.95) 100%);
    z-index: -1;
}

/* Header Styles */
.member-header {
    background-color: #1e1e1e; /* Slightly lighter than body, consistent with screenshot */
    padding: 10px 30px;
    display: flex;
    justify-content: space-between;
    flex-wrap:wrap;
    align-items: center;
    border-bottom: 1px solid #2a2a2a;
    position: relative; /* To ensure it's above the background video/overlay */
    z-index: 10;
}

.header-left {
    display: flex;
    align-items: center;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

nav ul li a, .main-nav .nav-link {
    color: #a0a0a0;
    text-decoration: none;
    padding: 10px 15px;
    margin-right:0;
    font-weight: 500;
    font-size: 0.9em;
    transition: color 0.3s ease, border-bottom-color 0.3s ease;
}

nav ul li a:hover,.main-nav .nav-link:hover {
    color: #ffffff;
}

nav ul li.active a,.main-nav .nav-link.active {
    color: #ffffff;
    border-bottom: 3px solid #00c6ff; /* Teal/Blue accent */
    font-weight:normal;
}

.main-nav .nav-link.active::after{display:none;}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.credits-plan span {
    color: #a0a0a0;
    font-size: 0.85em;
}
.credits-plan span.value {
    color: #00c6ff; /* Teal/Blue accent for credit value */
    font-weight: bold;
}
.credits-plan span.plan-label {
    margin-left: 10px;
}

.upgrade-btn {
    background: linear-gradient(90deg, #8e2de2, #4a00e0);
    color: white;
    padding: 8px 18px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.85em;
    cursor: pointer;
    transition: opacity 0.3s ease;
}
.upgrade-btn:hover {
    opacity: 0.9;
}

.user-icon {
    width: 32px;
    height: 32px;
    background-color: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    font-size: 1.2em; /* Placeholder for actual icon */
}
.user-icon svg { /* Basic user icon SVG */
    width: 18px;
    height: 18px;
    fill: #a0a0a0;
}


/* Main Content Styles */
/*.template-page-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
    position: relative; 
    z-index: 5;
}
*/

.template-page-container>* { max-width: 1000px;  margin: 40px auto; }

.template-page-container>#Results {max-width: unset; margin: 40px 0;}

.template-title {
    font-size: 2.8em;
    font-weight: bold;
    color: #ffffff;
    text-align: center;
    margin-bottom: 15px;
}

.template-description {
    font-size: 1.1em;
    color: #b0b0b0;
    text-align: center;
    margin-bottom: 30px; /* Reduced margin for featured graphic */
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.featured-graphic-container {
    margin-bottom: 40px;
    text-align: center;
}
.featured-graphic-container video,
.featured-graphic-container img { /* Added img as fallback */
    max-width: 100%;
    height: auto;
    max-height: 400px; /* Adjust as needed */
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    object-fit: contain;
}


.input-area {
    background-color: #1e1e1e; /* Panel background */
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.input-area h3 {
    font-size: 1.3em;
    color: #e0e0e0;
    margin-top: 0;
    margin-bottom: 40px;
}

/*.upload-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 0;
}

.upload-box, .choose-existing-btn {
    flex: 1;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.upload-box {
    border: 2px dashed #444;
    color: #888;
}
.upload-box:hover {
    background-color: #2a2a2a;
    border-color: #555;
}
.upload-box p {
    margin: 5px 0 0 0;
    font-size: 0.9em;
}
.upload-box svg { 
    width: 30px;
    height: 30px;
    fill: #888;
    margin-bottom: 5px;
}


.choose-existing-btn {
    background-color: #333;
    color: #c0c0c0;
    border: 2px solid #333; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.choose-existing-btn:hover {
    background-color: #404040;
}
.choose-existing-btn p {
     margin: 5px 0 0 0;
    font-size: 0.9em;
}
.choose-existing-btn svg { 
    width: 30px;
    height: 30px;
    fill: #c0c0c0;
    margin-bottom: 5px;
}

*/

#main_form.SettingsForm .Prop.Img .upload-box:hover {
    background-color: #2a2a2a;
}

#main_form.SettingsForm .Prop.Img .choose-existing-btn {
    background-color: #333;
}

#main_form.SettingsForm .Prop.Img .choose-existing-btn:hover {
    background-color: #404040;
}

#main_form.SettingsForm .Prop.Img .upload-options {flex-basis: 100%;}

.prompt-group {
    margin-bottom: 25px;
}

.prompt-group label {
    display: block;
    font-size: 1em;
    color: #c0c0c0;
/*    margin-bottom: 8px;*/
    font-weight: 500;
}

.prompt-group textarea {
    width: 100%; 
    background-color: #2a2a2a;
    border: 1px solid #444;
    color: #e0e0e0;
    padding: 12px;
    border-radius: 8px;
    min-height: 70px;
    font-size: 1em;
    resize: vertical;
    box-sizing: border-box;
}
.prompt-group textarea:focus {
    outline: none;
    border-color: #00c6ff;
    box-shadow: 0 0 0 2px rgba(0, 198, 255, 0.3);
}

.generate-button-container {
    text-align: center; /* Center the button */
    margin-top: 20px;
}

.generate-button {
    background: linear-gradient(90deg, #7c3aed, #06b6d4); /* Purple to Teal gradient */
    color: white;
    padding: 12px 28px; /* Adjusted padding */
    border: none;
    border-radius: 10px; /* Matched image */
    font-weight: bold;
    font-size: 1.1em;
    cursor: pointer;
    transition: opacity 0.3s ease;
    display: inline-flex; /* For icon and text alignment */
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.generate-button:hover {
    opacity: 0.9;
}
.generate-button .wand-icon {
    /* SVG is styled inline or via class */
    margin-right: 10px; /* Space between icon and text */
}

.generate-button .credit-cost {
    font-size: 0.8em;
    opacity: 0.8;
    display: block;
    margin-left: 10px; /* Space from Generate text */
    font-weight: normal;
}

/* Gallery Styles */
.example-gallery {
    margin-top: 50px;
}

.example-gallery h2 {
    font-size: 1.8em;
    color: #ffffff;
    text-align: center;
    margin-bottom: 30px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background-color: #2a2a2a; /* Placeholder bg if image load fails */
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 1 / 1; /* For square images, adjust if needed */
    transition: transform 0.3s ease;
}
.gallery-item:hover img {
    transform: scale(1.05);
}

.star-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    fill: #00c6ff; /* Teal/Blue accent */
    filter: drop-shadow(0 0 3px rgba(0,198,255,0.7));
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header-left nav {
        display: none; /* Simple hide for small screens, could be a burger menu */
    }
    .header-right .credits-plan {
        display: none; /* Hide credits on very small screens for space */
    }
    .template-title {
        font-size: 2.2em;
    }
    .template-description {
        font-size: 1em;
    }
/*    .upload-options {
        flex-direction: column;
    }
*/    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    .featured-graphic-container video,
    .featured-graphic-container img {
        max-height: 300px;
    }
}
@media (max-width: 480px) {
    header {
        padding: 15px 20px;
    }
    .template-title {
        font-size: 1.8em;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    .generate-button {
        font-size: 1em;
        padding: 10px 20px;
    }
    .featured-graphic-container video,
    .featured-graphic-container img {
        max-height: 250px;
    }
    
    .input-area {padding-left: 0; padding-right:0; }
}

#main_form .Prop {/*display: flex;*/}
#main_form .Prop+.Prop {margin-top: 20px;}
#main_form .Prop .Label {padding-bottom: 8px; text-transform: capitalize;}

#main_form .Prop .Descr {color: #888;
  padding: 8px;
  font-size: 14px;
  text-align: right;}
  
#main_form .Prop input {flex-basis: 100%; box-sizing: border-box; padding: 12px; border-radius: 8px; background-color: #2a2a2a;
  border: 1px solid #444;
  color: #e0e0e0; width: 100%;
}

/*#main_form .Prop input::placeholder { color: var(--text-placeholder); }*/

#main_form .Prop select {flex-basis: 100%; box-sizing: border-box; padding: 12px; border-radius: 8px; background-color: #2a2a2a;
  border: 1px solid #444;
  color: #e0e0e0; width: 100%;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23a0a0cc' class='bi bi-chevron-down' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 16px;  
}

#main_form .Prop.Checkbox {display: flex; flex-wrap: wrap;}
#main_form .Prop.Checkbox .Label {padding-right: 10px;}
#main_form .Prop.Checkbox .Descr {flex-basis: 100%; padding-left: 0; text-align: left;}
#main_form .Prop.Checkbox .Descr span {color: #fff; font-weight: bold;}

