body {
    font-family: Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1200px;
}

h1 {
    color: #333;
    background-color: rgba(0, 255, 0, 0.2); /* Vivid green with transparency for readability */
    border: 2px solid #00ff00;
    padding: 5px 10px;
    border-radius: 5px;
}

h2 {
    color: #333;
    background-color: rgba(0, 0, 255, 0.2); /* Vivid blue with transparency for readability */
    border: 2px solid #0000ff;
    padding: 5px 10px;
    border-radius: 5px;
}

h3 {
    color: white;
    background-color: rgba(255, 0, 0, 0.2); /* Vivid red with transparency for readability */
    border: 2px solid #ff0000;
    padding: 5px 10px;
    border-radius: 5px;
}

.form-group {
    margin-bottom: 15px;
}

.quality-btn, .orientation-btn, .style-btn {
    padding: 12px 24px;
    margin: 5px;
    border: 2px solid #ccc;
    background: #f9f9f9;
    cursor: pointer;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    min-width: 100px;
}

.quality-btn.active, .orientation-btn.active {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.quality-btn.disabled {
    background: #f0f0f0;
    color: #999;
    border-color: #ddd;
    cursor: not-allowed;
    text-decoration: line-through;
    opacity: 0.7;
}

.quality-note {
    font-size: 0.8em;
    color: #e91e63;
    margin-top: 5px;
    font-style: italic;
}

/* Style buttons with different colors for each animation style */
.style-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
    justify-content: flex-start;
    width: 100%;
}

.style-btn {
    min-width: 130px; /* Increased by 20% from 108px */
    max-width: 65%; /* Maintained */
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin: 5px;
    padding: 19px 38px; /* Increased padding by 20% */
    font-size: 0.9em; /* Maintained font size */
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5), 0 0 20px rgba(0, 255, 255, 0.3);
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.7);
    white-space: normal; /* Allow text wrapping */
    background: #f9f9f9;
    border-color: #607d8b; /* Default color for unmatched styles */
}

.style-btn .style-name {
    display: inline-block;
    max-width: 100%;
}

.style-btn.active {
    background: #607d8b; /* Default active color for unmatched styles */
    color: white;
    border-color: #546e7a;
    box-shadow: 0 0 15px rgba(96, 125, 139, 0.8), 0 0 25px rgba(96, 125, 139, 0.5);
    text-shadow: 0 0 8px rgba(96, 125, 139, 0.9);
}

.style-btn[data-style="ghibli"] {
    background: #f9f9f9;
    border-color: #78909c;
}

.style-btn[data-style="ghibli"].active {
    background: #78909c;
    color: white;
    border-color: #546e7a;
    box-shadow: 0 0 15px rgba(120, 144, 156, 0.8), 0 0 25px rgba(120, 144, 156, 0.5);
    text-shadow: 0 0 8px rgba(120, 144, 156, 0.9);
}

.style-btn[data-style="disney"] {
    background: #f9f9f9;
    border-color: #1e88e5;
}

.style-btn[data-style="disney"].active {
    background: #1e88e5;
    color: white;
    border-color: #1565c0;
    box-shadow: 0 0 15px rgba(30, 136, 229, 0.8), 0 0 25px rgba(30, 136, 229, 0.5);
    text-shadow: 0 0 8px rgba(30, 136, 229, 0.9);
}

.style-btn[data-style="pixar"] {
    background: #f9f9f9;
    border-color: #f57c00;
}

.style-btn[data-style="pixar"].active {
    background: #f57c00;
    color: white;
    border-color: #ef6c00;
    box-shadow: 0 0 15px rgba(245, 124, 0, 0.8), 0 0 25px rgba(245, 124, 0, 0.5);
    text-shadow: 0 0 8px rgba(245, 124, 0, 0.9);
}

.style-btn[data-style="business"] {
    background: #f9f9f9;
    border-color: #3949ab;
}

.style-btn[data-style="business"].active {
    background: #3949ab;
    color: white;
    border-color: #303f9f;
    box-shadow: 0 0 15px rgba(57, 73, 171, 0.8), 0 0 25px rgba(57, 73, 171, 0.5);
    text-shadow: 0 0 8px rgba(57, 73, 171, 0.9);
}

.style-btn[data-style="cyberpunk"] {
    background: #f9f9f9;
    border-color: #00e5ff;
}

.style-btn[data-style="cyberpunk"].active {
    background: #00e5ff;
    color: white;
    border-color: #00b8d4;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.8), 0 0 25px rgba(0, 229, 255, 0.5);
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.9);
}

.style-btn[data-style="watercolor"] {
    background: #f9f9f9;
    border-color: #64b5f6;
}

.style-btn[data-style="watercolor"].active {
    background: #64b5f6;
    color: white;
    border-color: #448aff;
    box-shadow: 0 0 15px rgba(100, 181, 246, 0.8), 0 0 25px rgba(100, 181, 246, 0.5);
    text-shadow: 0 0 8px rgba(100, 181, 246, 0.9);
}

.style-btn[data-style="retrocomic"] {
    background: #f9f9f9;
    border-color: #ff5252;
}

.style-btn[data-style="retrocomic"].active {
    background: #ff5252;
    color: white;
    border-color: #d32f2f;
    box-shadow: 0 0 15px rgba(255, 82, 82, 0.8), 0 0 25px rgba(255, 82, 82, 0.5);
    text-shadow: 0 0 8px rgba(255, 82, 82, 0.9);
}

.style-btn[data-style="surrealist"] {
    background: #f9f9f9;
    border-color: #ab47bc;
}

.style-btn[data-style="surrealist"].active {
    background: #ab47bc;
    color: white;
    border-color: #8e24aa;
    box-shadow: 0 0 15px rgba(171, 71, 188, 0.8), 0 0 25px rgba(171, 71, 188, 0.5);
    text-shadow: 0 0 8px rgba(171, 71, 188, 0.9);
}

.style-btn[data-style="steampunk"] {
    background: #f9f9f9;
    border-color: #795548;
}

.style-btn[data-style="steampunk"].active {
    background: #795548;
    color: white;
    border-color: #5d4037;
    box-shadow: 0 0 15px rgba(121, 85, 72, 0.8), 0 0 25px rgba(121, 85, 72, 0.5);
    text-shadow: 0 0 8px rgba(121, 85, 72, 0.9);
}

.style-btn[data-style="minimalist"] {
    background: #f9f9f9;
    border-color: #9e9e9e;
}

.style-btn[data-style="minimalist"].active {
    background: #9e9e9e;
    color: white;
    border-color: #757575;
    box-shadow: 0 0 15px rgba(158, 158, 158, 0.8), 0 0 25px rgba(158, 158, 158, 0.5);
    text-shadow: 0 0 8px rgba(158, 158, 158, 0.9);
}

.style-btn[data-style="kanyewest"] {
    background: #f9f9f9;
    border-color: #ff9800;
}

.style-btn[data-style="kanyewest"].active {
    background: #ff9800;
    color: white;
    border-color: #f57c00;
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.8), 0 0 25px rgba(255, 152, 0, 0.5);
    text-shadow: 0 0 8px rgba(255, 152, 0, 0.9);
}

.style-btn[data-style="trump"] {
    background: #f9f9f9;
    border-color: #ff5252;
}

.style-btn[data-style="trump"].active {
    background: #ff5252;
    color: white;
    border-color: #d32f2f;
    box-shadow: 0 0 15px rgba(255, 82, 82, 0.8), 0 0 25px rgba(255, 82, 82, 0.5);
    text-shadow: 0 0 8px rgba(255, 82, 82, 0.9);
}

.style-btn[data-style="scifi_logo"] {
    background: #f9f9f9;
    border-color: #00bcd4;
}

.style-btn[data-style="scifi_logo"].active {
    background: #00bcd4;
    color: white;
    border-color: #009688;
    box-shadow: 0 0 15px rgba(0, 188, 212, 0.8), 0 0 25px rgba(0, 188, 212, 0.5);
    text-shadow: 0 0 8px rgba(0, 188, 212, 0.9);
}

.style-btn[data-style="filtered_revelation"] {
    background: #f9f9f9;
    border-color: #9c27b0;
}

.style-btn[data-style="filtered_revelation"].active {
    background: #9c27b0;
    color: white;
    border-color: #7c1c8d;
    box-shadow: 0 0 15px rgba(156, 39, 176, 0.8), 0 0 25px rgba(156, 39, 176, 0.5);
    text-shadow: 0 0 8px rgba(156, 39, 176, 0.9);
}

.style-btn[data-style="futuristic_ad_2040"] {
    background: #f9f9f9;
    border-color: #ff4081;
}

.style-btn[data-style="futuristic_ad_2040"].active {
    background: #ff4081;
    color: white;
    border-color: #d81b60;
    box-shadow: 0 0 15px rgba(255, 64, 129, 0.8), 0 0 25px rgba(255, 64, 129, 0.5);
    text-shadow: 0 0 8px rgba(255, 64, 129, 0.9);
}

.style-btn[data-style="tooth_whitener"] {
    background: #f9f9f9;
    border-color: #00bcd4;
}

.style-btn[data-style="tooth_whitener"].active {
    background: #00bcd4;
    color: white;
    border-color: #009688;
}

.style-btn[data-style="victorian_anatomical"] {
    background: #f9f9f9;
    border-color: #8D6E63;
}

.style-btn[data-style="victorian_anatomical"].active {
    background: #6D4C41;
    color: white;
    border-color: #5D4037;
}

.style-btn[data-style="pepe"] {
    background: #f9f9f9;
    border-color: #0369a1;
}

.style-btn[data-style="pepe"].active {
    background: #0369a1;
    color: white;
    border-color: #0369a1;
}

button[type="submit"] {
    padding: 12px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    min-width: 120px;
    max-width: 100%;
    white-space: normal;
    overflow: visible;
    min-height: 60px;
    box-sizing: border-box;
}

button[type="submit"]:hover {
    background: #45a049;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

button[type="submit"]:disabled, button[type="submit"].cooldown {
    background: #cccccc;
    cursor: not-allowed;
    opacity: 0.6;
}

#library {
    margin-top: 20px;
}

.image-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.image-input-group label {
    font-weight: bold;
}

.image-input-group input {
    margin-top: 5px;
}

.ip-section {
    margin-bottom: 20px;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(150px, 1fr)) !important;
    gap: 10px;
}

.image-item {
    position: relative;
    text-align: center;
    cursor: pointer;
}

.image-item img {
    max-width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.image-item p {
    margin: 3px 0;
    font-size: 0.8em;
    color: #666;
}

.delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: red;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    line-height: 24px;
    text-align: center;
}

.delete-btn:hover {
    background: darkred;
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.clear-btn {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: red;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    line-height: 24px;
    text-align: center;
}

.clear-btn:hover {
    background: darkred;
}

#image-preview {
    margin: 20px 0;
    border: 2px solid #4CAF50;
    padding: 15px;
    border-radius: 8px;
    background-color: #f9f9f9;
}

#viewport-image {
    text-align: center;
}

#viewport-image img {
    max-width: 100%;
    max-height: 500px;
    border-radius: 4px;
}

#user-cost-summary {
    margin: 20px 0;
    padding: 15px;
    border: 2px solid #4CAF50;
    border-radius: 8px;
    background-color: #f9f9f9;
    text-align: center;
}

#total-user-cost {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    margin-top: 10px;
}

#generation-cost {
    font-size: 1.2em;
    font-weight: bold;
    color: #e91e63;
    margin-top: 5px;
    display: inline-block;
}

#progress-area {
    margin-top: 30px;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 4px;
}

#progress-area h2 {
    margin-top: 0;
}

.progress-item {
    margin-bottom: 10px;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.progress-item p {
    margin: 0 0 5px 0;
    font-size: 0.9em;
}

.progress-bar-container {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 4px;
    height: 20px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background-color: #2196F3; /* Blue for in-progress */
    text-align: center;
    line-height: 20px;
    color: white;
    transition: width 0.4s ease, background-color 0.4s ease;
}

.progress-status {
    font-size: 0.8em;
    color: #555;
    margin-top: 5px;
}

/* Floating Generate Button */
.floating-button-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

#floatingGenerateBtn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

#floatingGenerateBtn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

#floatingGenerateBtn:active {
    transform: scale(0.98);
}

/* Hide the original submit button */
#submitBtn {
    display: none;
}
