/* public/css/canciones.css – Versión corregida respetando estilos del index */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Satisfy', sans-serif;
    background: #000000;
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Fondo global */
.background-image {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #0a0a1e 0%, #1a0a2e 50%, #0a0a1e 100%);
    z-index: -2;
}

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 30, 0.78);
    z-index: -1;
}

/* Selector de idioma + botón inicio */
.language-selector {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 999;
    display: flex;
    gap: 8px;
    align-items: center;
}

.lang-btn {
    padding: 8px 14px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.25s;
    font-size: 0.9rem;
}

.lang-btn.active,
.lang-btn:hover {
    background: #ffb366;
    border-color: #ffb366;
}

.back-home {
    padding: 8px 14px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.25s;
}

.back-home:hover {
    background: #ffb366;
    border-color: #ffb366;
}

/* Contenido principal */
.container {
    position: relative;
    z-index: 10;
    padding: 100px 20px 140px;
    max-width: 1200px;
    margin: 0 auto;
}

.content {
    text-align: center;
}

.title {
    font-family: sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #7a70fa;
    text-shadow: 0 0 25px rgba(255,105,180,0.7);
    margin-bottom: 30px;
    letter-spacing: 1px;
}

/* Búsqueda */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.search-input {
    width: 100%;
    padding: 14px 50px 14px 20px;
    border-radius: 50px;
    border: 1px solid #1208a3;
    background: rgba(25,25,45,0.75);
    backdrop-filter: blur(8px);
    color: white;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s;
}

.search-input::placeholder {
    color: rgba(255,255,255,0.5);
}

.search-input:focus {
    border-color: #7a70fa;
    box-shadow: 0 0 20px rgba(122, 112, 250, 0.5);
    background: rgba(25,25,45,0.85);
}

.search-clear {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.search-clear:hover {
    color: #ffb366;
}

/* Filtros */
.filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 10px 22px;
    border-radius: 30px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.25s;
}

.filter-btn:hover {
    background: rgba(255, 179, 102, 0.3);
    border-color: #ffb366;
}

.filter-btn.active {
    background: #ffb366;
    border-color: #ffb366;
    box-shadow: 0 0 20px rgba(255, 179, 102, 0.5);
}

/* Contador de canciones */
.songs-counter {
    text-align: center;
    color: #7a70fa;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-family: sans-serif;
}

/* Tabla de canciones */
.table-container {
    background: rgba(25,25,45,0.75);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1);
    overflow-x: auto;
    margin-bottom: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    border-bottom: 2px solid #7a70fa;
}

thead th {
    padding: 15px;
    text-align: center;
    color: #7a70fa;
    font-family: sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    text-shadow: 0 0 10px rgba(122, 112, 250, 0.5);
}

tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s;
}

tbody tr:hover {
    background: rgba(122, 112, 250, 0.1);
}

tbody td {
    padding: 15px;
    color: white;
    font-family: sans-serif;
    font-size: 1rem;
}

/* Badge de género */
.genre-badge {
    display: inline-block;
    padding: 5px 14px;
    background: transparent;
    border: none;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #ffb366;
    font-weight: 600;
}

/* Botones de agregar */
.btn-add {
    padding: 10px 24px;
    border-radius: 30px;
    border: 2px solid #1208a3;
    background: linear-gradient(45deg, #1208a3, #7a70fa);
    color: white;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(18, 8, 163, 0.3);
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(122, 112, 250, 0.5);
    background: linear-gradient(45deg, #7a70fa, #1208a3);
}

.btn-add.added {
    background: linear-gradient(45deg, #4caf50, #45a049);
    border-color: #4caf50;
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-add.added:hover {
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.5);
    background: linear-gradient(45deg, #45a049, #4caf50);
}

/* Mensajes especiales */
.loading,
.no-results {
    text-align: center;
    padding: 30px;
    color: rgba(255,255,255,0.6);
    font-style: italic;
    font-size: 1.1rem;
}

/* Resumen del carrito */
.cart-summary {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(25,25,45,0.95);
    border-top: 2px solid #7a70fa;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 900;
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 20px rgba(122, 112, 250, 0.3);
}

.cart-info {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    font-family: sans-serif;
}

.cart-count {
    color: #ffb366;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 179, 102, 0.5);
    font-family: sans-serif;
}

.checkout-btn {
    padding: 14px 40px;
    font-size: 1.3rem;
    background: linear-gradient(45deg, #1208a3, #7a70fa);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 8px 25px rgba(122, 112, 250, 0.5);
}

.checkout-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(122, 112, 250, 0.7);
    background: linear-gradient(45deg, #7a70fa, #1208a3);
}

.checkout-btn:disabled {
    background: rgba(122, 112, 250, 0.3);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.cart-total {
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .title {
        font-size: 3rem;
    }

    .container {
        padding: 80px 15px 160px;
    }

    .table-container {
        padding: 15px;
    }

    thead th,
    tbody td {
        padding: 10px 8px;
        font-size: 0.9rem;
    }

    .cart-summary {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .filters {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .language-selector {
        top: 10px;
        right: 10px;
        gap: 6px;
    }

    .lang-btn,
    .back-home {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .btn-add {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .genre-badge {
        padding: 4px 10px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2.2rem;
    }

    .search-input {
        font-size: 1rem;
        padding: 12px 45px 12px 15px;
    }

    /* Ocultar columna de género en móviles muy pequeños */
    thead th:nth-child(3),
    tbody td:nth-child(3) {
        display: none;
    }

    .btn-add {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .cart-info {
        font-size: 1rem;
    }

    .cart-count {
        font-size: 1.3rem;
    }

    .checkout-btn {
        padding: 12px 30px;
        font-size: 1.1rem;
    }
}
