/**
 * Estilos para el frontend de Plane Rhymes con GSAP
 */
.plane-rhymes-suggestions {
    position: absolute;
    background: #1c1c1c;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    max-width: 100%;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    transform-origin: top center;
    backdrop-filter: blur(5px);
}

.plane-rhymes-suggestions-section {
    padding: 10px;
}

.plane-rhymes-suggestions-section h3 {
    font-size: 14px;
    color: #aaa;
    margin: 0 0 8px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.plane-rhymes-suggestions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.plane-rhymes-suggestion-item {
    background: #272727;
    color: #e0e0e0;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.plane-rhymes-suggestion-item:hover,
.plane-rhymes-suggestion-item.active {
    background: #bd93f9;
    color: #141414;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.plane-rhymes-suggestion-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.plane-rhymes-suggestion-item:active::after {
    animation: ripple 0.4s ease-out;
}

.plane-rhymes-dictionary-word {
    border-bottom: 2px dotted #bd93f9;
    padding-bottom: 1px;
    transition: all 0.3s ease;
}

.plane-rhymes-dictionary-word:hover {
    background-color: rgba(189, 147, 249, 0.1);
    color: #bd93f9;
}

/* Posicionamiento y animación */
@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.6;
    }
    20% {
        transform: scale(20, 20);
        opacity: 0.4;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

.plane-rhymes-suggestions.show {
    display: block;
}

/* Scrollbar personalizado */
.plane-rhymes-suggestions::-webkit-scrollbar {
    width: 6px;
}

.plane-rhymes-suggestions::-webkit-scrollbar-track {
    background: #1c1c1c;
}

.plane-rhymes-suggestions::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

.plane-rhymes-suggestions::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Estilos para resaltar palabras del diccionario en el análisis */
.plane-editor-lyrics-display .plane-rhymes-dictionary-word {
    border-bottom: 2px dotted #bd93f9;
    position: relative;
}

.plane-editor-lyrics-display .plane-rhymes-dictionary-word:hover::after {
    content: "En diccionario";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    white-space: nowrap;
    z-index: 10;
}

/* Estilos para palabras que riman según Plane pero no están en el diccionario */
.plane-editor-lyrics-display .plane-rhymes-auto-detected {
    border-bottom: 2px dotted #50fa7b;
    position: relative;
}

.plane-editor-lyrics-display .plane-rhymes-auto-detected:hover::after {
    content: "Rima autodetectada";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    white-space: nowrap;
    z-index: 10;
}

/* Estilos para palabras que pertenecen al mismo grupo de rima */
.plane-editor-lyrics-display .rhyme-group {
    position: relative;
}

/* Diccionario de Rimas */
.plane-rhymes-dictionary {
    background-color: #1c1c1c;
    color: #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.plane-rhymes-dictionary:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.plane-rhymes-dictionary-header {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.plane-rhymes-dictionary-header h2 {
    margin: 0;
    font-size: 1.8rem;
    color: #e0e0e0;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.plane-rhymes-search-container {
    display: flex;
    gap: 10px;
    position: relative;
}

.plane-rhymes-search-container input {
    flex-grow: 1;
    padding: 12px 15px;
    background-color: #272727;
    border: 1px solid #bd93f9;
    border-radius: 8px;
    color: #e0e0e0;
    outline: none;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 rgba(189, 147, 249, 0.1);
}

.plane-rhymes-search-container input:focus {
    border-color: #c9a9fa;
    box-shadow: 0 0 15px rgba(189, 147, 249, 0.3);
}

.plane-rhymes-search-container button {
    background-color: #bd93f9;
    color: #141414;
    border: none;
    border-radius: 8px;
    padding: 0 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.plane-rhymes-search-container button:hover {
    background-color: #c9a9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.plane-rhymes-search-container button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.plane-rhymes-dictionary-content {
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}

#plane-rhymes-results {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.plane-rhymes-dictionary-section {
    margin-bottom: 25px;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
}

.plane-rhymes-dictionary-section h3 {
    color: #bd93f9;
    font-size: 1.2rem;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
}

.plane-rhymes-dictionary-section h3::before {
    content: '';
    width: 8px;
    height: 8px;
    background-color: #bd93f9;
    border-radius: 50%;
    margin-right: 10px;
    box-shadow: 0 0 8px #bd93f9;
}

.plane-rhymes-dictionary-subsection {
    background-color: rgba(39, 39, 39, 0.5);
    border-radius: 6px;
    margin-bottom: 15px;
    padding: 15px;
    transition: all 0.3s ease;
}

.plane-rhymes-dictionary-subsection:hover {
    background-color: rgba(39, 39, 39, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.plane-rhymes-dictionary-subsection h4 {
    margin: 0 0 12px 0;
    font-size: 1.05rem;
    color: #e0e0e0;
    font-weight: 500;
}

.plane-rhymes-dictionary-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.plane-rhymes-dictionary-item {
    background-color: #272727;
    color: #e0e0e0;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.plane-rhymes-dictionary-item:hover {
    background-color: #bd93f9;
    color: #141414;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.plane-rhymes-dictionary-item:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.plane-rhymes-dictionary-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.plane-rhymes-dictionary-item:active::after {
    animation: ripple 0.4s ease-out;
}

.plane-rhymes-dictionary-section-tags,
.plane-rhymes-tags-section {
    margin-top: 15px;
}

.plane-rhymes-tag-label {
    color: #a0a0a0;
    font-size: 0.85rem;
    margin-right: 12px;
    display: inline-block;
}

.plane-rhymes-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.plane-rhymes-tag {
    background-color: rgba(189, 147, 249, 0.2);
    color: #e0e0e0;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.plane-rhymes-tag:hover {
    background-color: #bd93f9;
    color: #141414;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.plane-rhymes-tag.active {
    background-color: #bd93f9;
    color: #141414;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.plane-rhymes-tag::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.plane-rhymes-tag:active::after {
    animation: ripple 0.4s ease-out;
}

#plane-rhymes-initial-message,
#plane-rhymes-no-results,
#plane-rhymes-loading {
    text-align: center;
    padding: 40px;
    color: #a0a0a0;
    font-size: 1.1rem;
}

.plane-rhymes-spinner {
    display: inline-block;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 3px solid rgba(189, 147, 249, 0.3);
    border-top-color: #bd93f9;
    animation: spin 1s linear infinite;
    margin-right: 15px;
}

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

/* Tag Cloud para secciones de resultados */
.plane-rhymes-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    padding: 15px;
    background-color: rgba(39, 39, 39, 0.5);
    border-radius: 6px;
    min-height: 45px;
    position: relative;
    overflow: hidden;
}

.plane-rhymes-related-tags {
    margin-top: 25px;
    padding: 20px;
    background-color: rgba(39, 39, 39, 0.5);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.plane-rhymes-related-tags h4 {
    font-size: 1.1rem;
    color: #e0e0e0;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
}

.plane-rhymes-related-tags h4::before {
    content: '✨';
    margin-right: 10px;
    font-size: 1.2rem;
}

/* Estilos adicionales para el filtrado por etiquetas */
.plane-rhymes-dictionary-filters {
    margin-bottom: 20px;
    padding: 15px;
    background-color: rgba(39, 39, 39, 0.7);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.plane-rhymes-dictionary-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.plane-rhymes-dictionary-filter-header h4 {
    margin: 0;
    font-size: 1rem;
    color: #e0e0e0;
}

.plane-rhymes-dictionary-filter-toggle {
    font-size: 0.9rem;
    color: #bd93f9;
    cursor: pointer;
    transition: all 0.3s ease;
}

.plane-rhymes-dictionary-filter-toggle:hover {
    color: #c9a9fa;
    text-decoration: underline;
}

.plane-rhymes-selected-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.plane-rhymes-selected-filter {
    display: flex;
    align-items: center;
    background-color: #bd93f9;
    color: #141414;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.plane-rhymes-selected-filter:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.plane-rhymes-filter-remove {
    margin-left: 8px;
    font-weight: bold;
    cursor: pointer;
}

/* Modal de filtros */
.plane-rhymes-filter-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.plane-rhymes-filter-modal.active {
    display: flex;
}

.plane-rhymes-filter-content {
    background-color: #1c1c1c;
    border-radius: 8px;
    padding: 25px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.plane-rhymes-filter-title {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.plane-rhymes-filter-title h3 {
    margin: 0;
    color: #e0e0e0;
    font-size: 1.3rem;
}

.plane-rhymes-filter-close {
    font-size: 1.6rem;
    cursor: pointer;
    color: #a0a0a0;
    transition: all 0.3s ease;
}

.plane-rhymes-filter-close:hover {
    color: #e0e0e0;
    transform: scale(1.1);
}

.plane-rhymes-filter-section {
    margin-bottom: 20px;
}

.plane-rhymes-filter-section h4 {
    margin: 0 0 12px;
    font-size: 1rem;
    color: #bd93f9;
}

.plane-rhymes-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.plane-rhymes-filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 25px;
}

.plane-rhymes-filter-apply {
    background-color: #bd93f9;
    color: #141414;
    border: none;
    border-radius: 6px;
    padding: 8px 20px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.plane-rhymes-filter-apply:hover {
    background-color: #c9a9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.plane-rhymes-filter-reset {
    background-color: transparent;
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 8px 20px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.plane-rhymes-filter-reset:hover {
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .plane-rhymes-suggestions {
        max-height: 250px;
    }
    
    .plane-rhymes-suggestions-list {
        flex-direction: column;
    }
    
    .plane-rhymes-suggestion-item {
        width: 100%;
    }
    
    .plane-rhymes-dictionary-header {
        flex-direction: column;
        padding: 15px;
    }
    
    .plane-rhymes-dictionary-header h2 {
        font-size: 1.4rem;
    }
    
    .plane-rhymes-filter-content {
        width: 95%;
        max-height: 90vh;
        padding: 15px;
    }
    
    .plane-rhymes-dictionary-content {
        padding: 15px;
    }
}