:root {
    --primary-color: #4361ee;
    --primary-light: #4cc9f0;
    --secondary-color: #0d0c0f;
    --accent-color: #4cc9f0;
    --danger-color: #f72585;
    --success-color: #4ad66d;
    --warning-color: #f8961e;
    --text-color: #2b2d42;
    --text-light: #8d99ae;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --border-color: #e9ecef;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

/* Tipografía */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: 0;
}



/* Contenido principal */
.main-content {
    flex: 1;
    padding: 2rem 0;
    min-height: calc(100vh - 180px);
}

.search-hero {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.search-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-hero .subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.search-box {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.search-box:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.search-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.input-group {
    text-align: left;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.input-with-clear {
    position: relative;
    width: 100%;
}

.input-with-clear input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--card-bg);
    color: var(--text-color);
}

.input-with-clear input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.clear-input {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.clear-input:hover {
    color: var(--danger-color);
}

.input-with-clear input:not(:placeholder-shown)+.clear-input {
    opacity: 1;
}

.search-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.search-button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 12, 15, 0.2);
}

/* Resultados */
.results-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

.welcome-message {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    text-align: center;
}

.welcome-content i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.welcome-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.welcome-content p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.quick-searches {
    margin-top: 2rem;
}

.quick-searches h4 {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.quick-search-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
}

.quick-tag {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid rgba(67, 97, 238, 0.2);
}

.quick-tag:hover {
    background: rgba(67, 97, 238, 0.2);
    transform: translateY(-2px);
}

/* Lyrics container */
.lyrics-container {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    transition: var(--transition);
}

.lyrics-container:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.song-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
}

.song-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0;
}

.artist-name {
    font-size: 1.2rem;
    color: var(--text-light);
    margin: 0.3rem 0 0;
    font-weight: 500;
}

.lyrics {
    white-space: pre-line;
    line-height: 1.8;
    font-size: 1.1rem;
}

.lyrics p {
    margin-bottom: 1rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

.download-btn {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.download-btn:hover {
    background: #3cb35b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(74, 214, 109, 0.3);
}

/* Video section */
.video-section {
    margin: 2rem 0;
    width: 100%;
    position: relative;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: #000;
    transition: var(--transition);
}

.video-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

#player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.play-btn {
    background: linear-gradient(135deg, var(--primary-color), #3a0ca3);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.play-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
}

.play-btn:active {
    transform: translateY(1px);
}

.play-btn.playing {
    background: linear-gradient(135deg, var(--danger-color), #b5179e);
}

.play-btn i {
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    70% {
        transform: scale(1.1);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Track lists */
.artist-results,
.song-results,
.artist-tracks,
.suggestions {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    transition: var(--transition);
}

.artist-results:hover,
.song-results:hover,
.artist-tracks:hover,
.suggestions:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.artist-results h2,
.song-results h2,
.suggestions h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.track-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.track-list li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.track-list li:hover {
    color: var(--primary-color);
    padding-left: 0.5rem;
}

.songs-list {
    display: grid;
    gap: 0.5rem;
}

.song-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.song-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

.song-item-info {
    flex: 1;
}

.song-item-title {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.2rem;
    display: flex;
    align-items: center;
}

.song-item-artist {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Loading and error states */
.loading {
    text-align: center;
    padding: 3rem;
}

.loading-spinner {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    animation: spin 2s linear infinite;
}

.loading p {
    font-size: 1.2rem;
    color: var(--text-light);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.error-message {
    text-align: center;
    padding: 2rem;
    background: rgba(247, 37, 133, 0.1);
    border-radius: 12px;
    border-left: 4px solid var(--danger-color);
}

.error-icon {
    font-size: 2.5rem;
    color: var(--danger-color);
    margin-bottom: 1rem;
}

.error-message p {
    font-size: 1.1rem;
    color: var(--danger-color);
    margin-bottom: 1.5rem;
}

.retry-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.retry-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Sugerencias en tiempo real */
.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--card-bg);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.suggestion-item {
    padding: 0.8rem 1rem;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
}

.suggestion-item:hover {
    background: rgba(0, 0, 0, 0.03);
    color: var(--primary-color);
}

.suggestion-item:last-child {
    border-bottom: none;
}

/* Responsive */
@media (max-width: 768px) {
    .search-inputs {
        grid-template-columns: 1fr;
    }

    .song-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .action-buttons {
        width: 100%;
        justify-content: flex-end;
    }

    .search-hero h1 {
        font-size: 2rem;
    }

    .song-title {
        font-size: 1.5rem;
    }

    .artist-name {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .search-hero h1 {
        font-size: 1.8rem;
    }

    .search-box {
        padding: 1.5rem;
    }

    .lyrics-container,
    .artist-results,
    .song-results,
    .suggestions {
        padding: 1.5rem;
    }
}

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

@keyframes slideIn {
    0% {
        transform: translateY(100px);
        opacity: 0;
    }

    20% {
        transform: translateY(0);
        opacity: 1;
    }

    80% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(100px);
        opacity: 0;
    }
}

/* Historial de búsquedas */
.search-history {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.history-header h3 {
    font-size: 1.3rem;
    color: var(--secondary-color);
    margin: 0;
}

.clear-history-btn {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    transition: var(--transition);
}

.clear-history-btn:hover {
    background: rgba(247, 37, 133, 0.1);
}

.history-list,
.favorites-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.history-list li,
.favorites-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.history-list li:hover,
.favorites-list li:hover {
    background: rgba(0, 0, 0, 0.03);
}

.history-item,
.favorite-item {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.history-title,
.favorite-title {
    font-weight: 500;
    color: var(--secondary-color);
}

.history-artist,
.favorite-artist {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.2rem;
}

.favorite-item i {
    color: var(--danger-color);
    margin-right: 0.5rem;
}

.favorites-section h3 {
    font-size: 1.3rem;
    color: var(--secondary-color);
    margin: 1.5rem 0 1rem 0;
}

.no-favorites {
    color: var(--text-light);
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

/* Botón de favoritos */
.favorite-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.favorite-btn:hover {
    background: #e9ecef;
}

.favorite-btn.is-favorite {
    background: #fff0f0;
    border-color: #ffcccc;
    color: #dc3545;
}

/* Estilos para el contenedor de botones de acciones */
.lyrics-footer-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.copy-lyrics-btn,
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    gap: 8px;
}

.copy-lyrics-btn {
    background-color: #f0f2f5;
    color: var(--text-color);
}

.copy-lyrics-btn:hover {
    background-color: #e4e6e9;
}

.share-btn {
    background-color: #1877f2;
    color: white;
}

.share-btn:hover {
    background-color: #166fe5;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    bottom: 100%;
    background: white;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    z-index: 100;
    padding: 8px 0;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
}

.youtube-source-info {
    background-color: var(--bg-color);
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #ff0000;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-light);
}

.youtube-source-info i {
    color: #ff0000;
    font-size: 18px;
}

/* Estilos anteriores... */

/* Nuevos estilos para las mejoras */

/* Búsqueda por voz */
.voice-search-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
    z-index: 3;
}

.voice-search-btn:hover {
    color: var(--secondary-color);
}

.voice-search-btn.active {
    color: var(--danger-color);
    animation: pulse 1.5s infinite;
}

/* Sugerencias en tiempo real */
.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--card-bg);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    border: 1px solid var(--border-color);
    border-top: none;
}

.suggestion-item {
    padding: 0.8rem 1rem;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
}

.suggestion-item:hover {
    background: rgba(var(--primary-color), 0.1);
    color: var(--primary-color);
}

/* Controles de video mejorados */
.video-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
}

.quality-selector, .volume-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quality-selector select {
    width: 120px;
}

.volume-control input {
    width: 100px;
}

/* Letra sincronizada */
.lyrics-container-sync {
    max-height: 500px;
    overflow-y: auto;
    padding: 1rem;
    line-height: 2;
    font-size: 1.1rem;
}

.lyric-line {
    padding: 0.5rem;
    margin: 0.2rem 0;
    border-radius: 4px;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.lyric-line.active {
    opacity: 1;
    font-weight: bold;
    color: var(--primary-color);
    background: rgba(var(--primary-color), 0.1);
    transform: scale(1.02);
}

/* Efectos de karaoke */
@keyframes karaoke {
    0% {
        background-size: 0% 100%;
    }
    100% {
        background-size: 100% 100%;
    }
}

.lyric-line.karaoke {
    background: linear-gradient(to right, var(--primary-color) 0%, var(--primary-color) 0%, #eee 0%, #eee 100%);
    background-size: 0% 100%;
    background-repeat: no-repeat;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: karaoke 3s linear forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .video-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .lyrics-container-sync {
        max-height: 300px;
    }
}

/* Animación de grabación */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}