/* Image Generator Specific Styles */

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input[type="text"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #ff6b35;
}

.form-group input[type="range"] {
    width: 100%;
    margin-top: 10px;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #ff6b35 0%, #f44336 100%);
    border-radius: 5px;
    outline: none;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.form-group input[type="range"]:hover {
    opacity: 1;
}

.form-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 3px solid #ff6b35;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.form-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 10px rgba(255, 107, 53, 0.4);
}

.form-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 3px solid #ff6b35;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.form-group input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 10px rgba(255, 107, 53, 0.4);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #ff6b35;
    font-weight: 600;
    margin-top: 8px;
}

.slider-labels span {
    padding: 4px 8px;
    background: rgba(255, 107, 53, 0.1);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.slider-labels span:hover {
    background: rgba(255, 107, 53, 0.2);
    transform: translateY(-2px);
}

/* Creativity Display Value Styling */
#creativityDisplay {
    display: inline-block;
    min-width: 35px;
    padding: 2px 10px;
    background: linear-gradient(135deg, #ff6b35 0%, #f44336 100%);
    color: white;
    font-weight: bold;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
    transition: all 0.3s ease;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-inline:hover {
    background-color: rgba(255, 107, 53, 0.05);
}

.checkbox-inline input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 300px;
    background-color: #333;
    color: #fff;
    text-align: left;
    border-radius: 8px;
    padding: 12px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -150px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 13px;
    line-height: 1.4;
    font-weight: normal;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b35 0%, #f44336 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-download {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    padding: 12px 24px;
    font-size: 14px;
}

.btn-download svg {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin-right: 5px;
}

.loading {
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.05) 0%, rgba(244, 67, 54, 0.05) 100%);
    border-radius: 15px;
    margin: 30px 0;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 1.3rem;
    font-weight: 600;
    color: #ff6b35;
    margin-bottom: 10px;
}

.loading-subtext {
    font-size: 0.95rem;
    color: #666;
    opacity: 0.8;
}

/* Image Result Styles */
.image-container {
    margin: 25px 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.image-wrapper {
    position: relative;
    width: 100%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 800px;
    object-fit: contain;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-wrapper:hover .image-overlay {
    opacity: 1;
}

.overlay-btn {
    background: white;
    color: #333;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.overlay-btn:hover {
    background: #ff6b35;
    color: white;
    transform: scale(1.05);
}

.image-info {
    display: flex;
    gap: 25px;
    padding: 20px;
    background: rgba(255, 107, 53, 0.05);
    border-radius: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-label {
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.info-item span:last-child {
    font-size: 15px;
    color: #333;
    font-weight: 500;
}

.prompt-used {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #ff6b35;
    margin: 20px 0;
}

.prompt-used h4 {
    margin: 0 0 10px 0;
    color: #ff6b35;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.prompt-used p {
    margin: 0;
    color: #555;
    line-height: 1.6;
    font-size: 14px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.modal-content img {
    max-width: 100%;
    max-height: calc(95vh - 100px);
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.close:hover {
    color: #ff6b35;
}

.modal-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.modal-btn {
    background: white;
    color: #333;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.modal-btn:hover {
    background: #ff6b35;
    color: white;
    transform: translateY(-2px);
}

.modal-btn svg {
    width: 18px;
    height: 18px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tooltip .tooltiptext {
        width: 250px;
        margin-left: -125px;
        font-size: 12px;
    }

    .image-info {
        flex-direction: column;
        gap: 15px;
    }

    .checkbox-group {
        grid-template-columns: 1fr;
    }

    .modal-content img {
        max-height: calc(95vh - 150px);
    }

    .close {
        top: -50px;
        right: 10px;
        font-size: 35px;
    }
}

/* Error and Success States */
#errorDiv {
    background: rgba(255, 68, 68, 0.1);
    border: 2px solid #ff4444;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    color: #ff4444;
}

#errorDiv::before {
    content: '⚠️';
    display: block;
    font-size: 2rem;
    margin-bottom: 10px;
}