.slidebar {
    /*width: 30%;*/
    padding: 20px;
    background: rgba(20, 20, 45, 0.5);
    margin-top: 30px;

    color: #fff;
}

.slidebar h2 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(110, 72, 170, 0.3);
    color: #fff;
}

textarea {
    width: 100%;
    height: 100px;
    font-size: 1rem;
    padding: 15px;
    background: rgba(15, 15, 35, 0.8);
    border: 1px solid rgba(110, 72, 170, 0.5);
    border-radius: 10px;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    resize: none;
}

button {
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    background: rgba(110, 72, 170, 0.3);
    border: 1px solid rgba(110, 72, 170, 0.5);
    color: #fff;
    border-radius: 5px;
    transition: all 0.3s ease;
}

button:hover {
    background: rgba(110, 72, 170, 0.5);
}

img {

    margin-top: 20px;
    border: 1px solid rgba(110, 72, 170, 0.3);
    border-radius: 18px;
   
}

.error {
    color: #ff6b6b;
    margin-top: 15px;
    font-weight: 500;
    padding: 15px;
    background: rgba(255, 80, 80, 0.15);
    border-radius: 8px;
    border: 1px solid rgba(255, 80, 80, 0.3);
}

.thumbnail {
    width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid rgba(110, 72, 170, 0.3);
    transition: all 0.3s ease;
}

.thumbnail:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(110, 72, 170, 0.2);
}

.status-queued,
.status-pending {
    color: #9d7aff;
}

.status-processing {
    color: #4776E6;
}

.status-completed {
    color: #50ff78;
}

.status-failed {
    color: #ff6b6b;
}

.queue-item {
    transition: all 0.3s ease;
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 8px;
    background: rgba(15, 15, 35, 0.8);
    border: 1px solid rgba(110, 72, 170, 0.3);
    color: #d1d1ff;
}

.queue-item:hover {
    background: rgba(110, 72, 170, 0.1);
}

.image-container {
    
    padding: 20px;
    background: rgba(20, 20, 45, 0.5);
    border-radius: 15px;
    
    transition: opacity 0.5s ease;
}

#current-image {
    max-width: 100%;
    border: 10px solid rgba(110, 72, 170, 0.5);
    transition: transform 0.3s ease;
    border-radius: 8px;
    margin-top: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

#current-image:hover {
    transform: scale(1.02);
}

.queue-item.active {
    border-left: 3px solid #6e48aa;
    background: rgba(110, 72, 170, 0.2);
    color: #fff;
}

.loading-indicator {
    display: inline-block;
    width: 50px;
    height: 50px;
    margin: 20px auto;
    position: relative;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 20px auto;
    border: 4px solid rgba(110, 72, 170, 0.1);
    border-radius: 50%;
    border-top-color: #6e48aa;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.thumbnail.loading {
    position: relative;
    background: linear-gradient(90deg, rgba(15,15,35,0.8) 25%, rgba(110,72,170,0.2) 50%, rgba(15,15,35,0.8) 75%);
    background-size: 200% 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 1.5s ease-in-out infinite;
}

.loading-spinner-advanced {
    width: 50px;
    height: 50px;
    position: relative;
    margin: 0 auto;
}

.loading-spinner-advanced div {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #6e48aa;
    border-radius: 50%;
    animation: loading-spinner 1.2s linear infinite;
}

.loading-spinner-advanced div:nth-child(1) {
    top: 0;
    left: 20px;
    animation-delay: 0s;
}

.loading-spinner-advanced div:nth-child(2) {
    top: 5px;
    left: 5px;
    animation-delay: -0.1s;
}

.loading-spinner-advanced div:nth-child(3) {
    top: 20px;
    left: 0;
    animation-delay: -0.2s;
}

.loading-spinner-advanced div:nth-child(4) {
    top: 35px;
    left: 5px;
    animation-delay: -0.3s;
}

.loading-spinner-advanced div:nth-child(5) {
    top: 40px;
    left: 20px;
    animation-delay: -0.4s;
}

.loading-spinner-advanced div:nth-child(6) {
    top: 35px;
    left: 35px;
    animation-delay: -0.5s;
}

.loading-spinner-advanced div:nth-child(7) {
    top: 20px;
    left: 40px;
    animation-delay: -0.6s;
}

.loading-spinner-advanced div:nth-child(8) {
    top: 5px;
    left: 35px;
    animation-delay: -0.7s;
}

@keyframes loading-spinner {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.3); opacity: 0.5; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.modal-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.modal-content {
    object-fit: contain;
    transform-origin: center center;
    transition: transform 0.2s ease;
    cursor: grab;
    7max-width: 90vw;
    7max-height: 90vh;
    border-radius: 8px;
}

.modal-content:active {
    cursor: grabbing;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    background: rgba(15, 15, 35, 0.8);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(110, 72, 170, 0.5);
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(110, 72, 170, 0.5);
}

.modal-controls {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background: rgba(15, 15, 35, 0.8);
    padding: 10px;
    border-radius: 20px;
    z-index: 1001;
    border: 1px solid rgba(110, 72, 170, 0.5);
}

.modal-controls button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(110, 72, 170, 0.3);
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-controls button:hover {
    background: rgba(110, 72, 170, 0.5);
    transform: scale(1.1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.clickable-image {
    cursor: zoom-in;
    transition: transform 0.2s;
}

.clickable-image:hover {
    transform: scale(1.02);
}








.content-area {
    flex-grow: 1;
    padding: 30px;
    overflow-y: auto;
    width: 100%;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 70px); /* Высота минус шапка */
    background: transparent;
}


/* Адаптивность */
@media (max-width: 1200px) {
    .slidebar {
        
    }
}

@media (max-width: 992px) {
    .slidebar {
        position: static;
        width: 100%;
        margin-top: 20px;
        max-height: none;
    }
    
    
}
/* Адаптация для средних экранов (ноутбуки) */
@media (max-width: 1200px) {
    .content-area {

        padding: 20px;
    }
    
    .generation-window2 {
        height: 50vh;
    }
}

/* Адаптация для планшетов */
@media (max-width: 992px) {
    .content-area {
        margin-left: 0;
        margin-right: 0;
        padding: 15px;
        
    }
    
    .ttsidebar {
        width: 100%;
        position: static;
        height: auto;
        flex-direction: row;
        padding: 10px;
        border-right: none;
        border-bottom: 1px solid rgba(110, 72, 170, 0.3);
    }
    
    .slidebar {
        position: static;
        width: 100%;
        margin-top: 20px;
        max-height: none;
    }
    
    .account-container {
        flex-direction: column;
    }
}







#current-image {

    
    max-width: 100%;
    border: 0px solid rgba(110, 72, 170, 0.5);
    transition: transform 0.3s ease;
    border-radius: 8px;
    margin-top: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    object-fit: contain;
}

.clickable-gen-image {

    max-height: 70vh;
        width: auto;
    height: 70vh;
     object-fit: contain;
    border-radius: 8px;
    border: 10px solid rgba(110, 72, 170, 0.5);
    transition: transform 0.3s ease;
}







.aclickable-image:hover {
    transform: scale(1.02);
}

.image-meta {
    margin-top: 15px;
    padding: 15px;
    background: rgba(15, 15, 35, 0.8);
    border-radius: 10px;
    width: 100%;
}


.generation-result {

}


.gen-content {

}

.image-container {
    
    }






/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .generation-result {
        
    }
    
    .image-container {
        
    }
}