/* =================================================================== */
/* --- 17. РЕЖИМ ГЕНЕРАЦИИ ТЕКСТОВ ПЕСЕН (LYRICS GENERATOR)        --- */
/* =================================================================== */

/* Обертка для центрирования */
#lyrics-generator-view {
    display: flex;
    justify-content: flex-start; /* Прижимаем к верху, чтобы скролл работал правильно */
    align-items: center;
    overflow-y: auto;
    padding: 40px 20px !important;
}

/* Главная стеклянная карточка формы */
#lyrics-prompt-screen, 
#lyrics-edit-screen {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.6), rgba(8, 12, 20, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
    z-index: 1;
}

/* Верхнее свечение внутри карточки */
#lyrics-prompt-screen::before,
#lyrics-edit-screen::before {
    content: '';
    position: absolute;
    top: 0; left: 50%; 
    transform: translateX(-50%);
    width: 80%; height: 200px;
    background: radial-gradient(ellipse at top, rgba(250, 191, 60, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Заголовок и описание */
#lyrics-generator-title {
    font-family: 'Bowler', sans-serif;
    font-size: 1.8rem;
    color: #fff;
    letter-spacing: 1px;
    margin-bottom: 10px !important;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
}

#lyrics-prompt-description {
    font-size: 0.9rem;
    color: #94a3b8 !important;
    line-height: 1.5;
    margin-bottom: 24px !important;
    position: relative;
    z-index: 1;
}

/* Текстовые поля (Textarea) */
#lyrics-generator-view textarea.form-control {
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border-radius: 16px;
    padding: 20px;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.3);
}

#lyrics-generator-view textarea.form-control::placeholder {
    color: #64748b;
}

#lyrics-generator-view textarea.form-control:focus {
    border-color: rgba(250, 191, 60, 0.5) !important;
    background: rgba(0, 0, 0, 0.6) !important;
    box-shadow: 0 0 0 4px rgba(250, 191, 60, 0.1), inset 0 2px 10px rgba(0,0,0,0.5) !important;
    outline: none;
}

/* Кастомный скроллбар внутри текстового поля */
#lyrics-generator-view textarea.form-control::-webkit-scrollbar { width: 6px; }
#lyrics-generator-view textarea.form-control::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

/* Кнопка генерации */
#generate-lyrics-btn, 
#send-to-suno-btn {
    border-radius: 16px;
    font-size: 1rem;
    padding: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 25px rgba(250, 191, 60, 0.25);
    position: relative;
    z-index: 1;
    margin-top: 10px;
}

#generate-lyrics-btn:hover, 
#send-to-suno-btn:hover {
    box-shadow: 0 10px 30px rgba(250, 191, 60, 0.4);
    transform: translateY(-2px);
}

/* Секция Истории */
.lyrics-history-section {
    position: relative;
    z-index: 1;
    margin-top: 40px !important;
    padding-top: 30px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.lyrics-history-section h5 {
    font-family: 'Bowler', sans-serif;
    color: #fff;
    letter-spacing: 1px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.2rem;
}

#lyrics-history-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    max-height: 250px;
    padding-right: 8px;
}

/* Карточка в истории */
.lyrics-history-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: var(--transition);
    text-align: left;
}

.lyrics-history-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(250, 191, 60, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.history-idea-text {
    font-size: 0.85rem;
    color: #cbd5e1;
    line-height: 1.5;
    font-style: italic;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.use-lyrics-btn {
    background: rgba(250, 191, 60, 0.1);
    color: #fabf3c;
    border: 1px solid rgba(250, 191, 60, 0.3);
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.2s;
    width: 100%;
}

.use-lyrics-btn:hover {
    background: #fabf3c;
    color: #000;
}

/* Экран редактирования сгенерированного текста */
.lyrics-actions-row {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

#back-to-idea-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px 24px;
    font-weight: 700;
    transition: 0.2s;
}

#back-to-idea-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

#send-to-suno-btn {
    flex-grow: 1;
    background: linear-gradient(135deg, #fabf3c, #f59e0b);
    color: #000;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    #lyrics-prompt-screen, #lyrics-edit-screen {
        padding: 24px;
    }
    .lyrics-actions-row {
        flex-direction: column;
    }
    #back-to-idea-btn {
        width: 100%;
    }
}