/* assets/css/estilos.css - Diseño Premium CancioneroWeb */

/* ============================================
   VARIABLES Y CONFIGURACIÓN GLOBAL
   ============================================ */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #ec4899;
    --accent-color: #f59e0b;
    --dark-bg: #0f172a;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================
   RESET Y BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================
   NAVEGACIÓN PREMIUM
   ============================================ */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    transition: transform var(--transition-fast);
}

.logo:hover {
    transform: scale(1.02);
}

.logo i {
    font-size: 2rem;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links > a {
    text-decoration: none;
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.nav-links > a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all var(--transition-normal);
    transform: translateX(-50%);
}

.nav-links > a:hover::before,
.nav-links > a.active::before {
    width: 80%;
}

.nav-links > a:hover,
.nav-links > a.active {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.08);
}

.btn-destacado {
    background: var(--gradient-hero) !important;
    color: white !important;
    box-shadow: var(--shadow-md);
    border: none !important;
}

.btn-destacado:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* Dropdown mejorado */
.w3-dropdown-hover {
    position: relative;
}

.w3-dropdown-hover > button {
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 20px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.w3-dropdown-hover:hover > button {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.w3-dropdown-content {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-xl);
    margin-top: 10px;
    min-width: 200px;
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.w3-dropdown-content a {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 10px;
}

.w3-dropdown-content a:last-child {
    border-bottom: none;
}

.w3-dropdown-content a:hover {
    background: rgba(99, 102, 241, 0.05);
    padding-left: 25px;
    color: var(--primary-color);
}

/* ============================================
   HERO SECTION ESPECTACULAR
   ============================================ */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-hero);
    overflow: hidden;
    padding: 120px 24px 80px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    color: white;
    margin-bottom: 24px;
    line-height: 1.1;
    text-shadow: 0 4px 20px rgba(0,0,0,0.2);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: rgba(255,255,255,0.9);
    margin-bottom: 40px;
    font-weight: 300;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-actions .w3-button {
    padding: 16px 32px;
    font-weight: 600;
    border-radius: var(--radius-xl);
    transition: all var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
}

.hero-actions .w3-button:first-child {
    background: white !important;
    color: var(--primary-color) !important;
    box-shadow: var(--shadow-lg);
}

.hero-actions .w3-button:first-child:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.hero-actions .w3-button:last-child {
    background: rgba(255,255,255,0.15) !important;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.3) !important;
}

.hero-actions .w3-button:last-child:hover {
    background: rgba(255,255,255,0.25) !important;
    border-color: white !important;
}

/* Ondas animadas */
.audio-waves {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    opacity: 0.3;
    pointer-events: none;
}

.wave {
    width: 4px;
    background: white;
    border-radius: 2px;
    animation: wave 1.5s ease-in-out infinite;
    height: 40px;
}

.wave:nth-child(1) { animation-delay: 0s; height: 60px; }
.wave:nth-child(2) { animation-delay: 0.1s; height: 100px; }
.wave:nth-child(3) { animation-delay: 0.2s; height: 140px; }
.wave:nth-child(4) { animation-delay: 0.3s; height: 100px; }
.wave:nth-child(5) { animation-delay: 0.4s; height: 60px; }

@keyframes wave {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1); }
}

/* ============================================
   CONTENIDO PRINCIPAL
   ============================================ */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 24px;
}

.section {
    margin-bottom: 80px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}

.section-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header h2 i {
    font-size: 1.5rem;
}

/* ============================================
   GRID DE CANCIONES - TARJETAS PREMIUM
   ============================================ */
.songs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.song-card {
    background: var(--gradient-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 1px solid var(--border-color);
    position: relative;
}

.song-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.song-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.song-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.song-card:hover .song-image img {
    transform: scale(1.1);
}

.song-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.song-card:hover .song-overlay {
    opacity: 1;
}

.play-btn {
    width: 70px;
    height: 70px;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.5rem;
    transform: scale(0.8);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
}

.play-btn:hover {
    transform: scale(1);
    background: white;
    box-shadow: var(--shadow-glow);
}

.song-genre {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.95) !important;
    color: var(--primary-color) !important;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 6px 12px;
    backdrop-filter: blur(10px);
}

.song-content {
    padding: 24px;
}

.song-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.song-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.song-title a:hover {
    color: var(--primary-color);
}

.song-artist {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.song-artist i {
    color: var(--primary-light);
}

.song-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    padding: 12px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-light);
}

.song-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.song-meta i {
    color: var(--primary-color);
}

.song-content .w3-button {
    border-radius: var(--radius-md);
    font-weight: 600;
    padding: 12px;
    transition: all var(--transition-fast);
}

.song-content .w3-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ============================================
   LISTA DE CANCIONES (ÚLTIMAS)
   ============================================ */
.songs-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.song-list-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    border: 1px solid transparent;
}

.song-list-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
    transform: translateX(8px);
}

.song-list-info {
    flex: 1;
}

.song-list-info h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.song-list-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.song-list-actions .w3-button {
    border-radius: var(--radius-md);
    padding: 10px 24px;
    font-weight: 600;
}

/* ============================================
   SIDEBAR WIDGETS
   ============================================ */
.sidebar-widget {
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

.widget-header {
    padding: 20px 24px;
    color: white;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.widget-header.w3-theme {
    background: var(--gradient-hero);
}

.widget-header.w3-pink {
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
}

.widget-header h3 {
    font-size: 1.125rem;
    margin: 0;
}

.widget-content {
    padding: 8px;
    background: white;
}

/* Top 5 */
.top-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-fast);
}

.top-item:last-child {
    border-bottom: none;
}

.top-item:hover {
    background: rgba(99, 102, 241, 0.03);
    border-radius: var(--radius-md);
}

.top-number {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 800;
    font-size: 0.875rem;
    background: var(--border-color);
    color: var(--text-secondary);
    flex-shrink: 0;
}

.top-number.top-1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4a 100%);
    color: #92400e;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.top-number.top-2 {
    background: linear-gradient(135deg, #c0c0c0 0%, #e5e7eb 100%);
    color: #4b5563;
    box-shadow: 0 4px 12px rgba(192, 192, 192, 0.4);
}

.top-number.top-3 {
    background: linear-gradient(135deg, #cd7f32 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(205, 127, 50, 0.4);
}

.top-info {
    flex: 1;
    min-width: 0;
}

.top-info a {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
    transition: color var(--transition-fast);
}

.top-info a:hover {
    color: var(--primary-color);
}

.top-info small {
    color: var(--text-light);
    font-size: 0.8rem;
}

/* Dedicatorias */
.dedication-item {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.dedication-item:last-child {
    border-bottom: none;
}

.dedication-item:hover {
    background: rgba(236, 72, 153, 0.03);
    border-radius: var(--radius-md);
}

.dedication-meta {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.875rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dedication-meta::before {
    content: '♥';
    font-size: 0.75rem;
}

.dedication-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
    line-height: 1.5;
    margin-bottom: 8px;
}

.dedication-item small {
    display: block;
    color: var(--text-light);
    font-size: 0.8rem;
}

/* ============================================
   FOOTER PREMIUM
   ============================================ */
.main-footer {
    background: var(--dark-bg) !important;
    color: white;
    padding: 60px 24px 0;
    margin-top: 80px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
}

.footer-section h4 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-section h4 i {
    color: var(--primary-light);
}

.footer-section p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: var(--text-light);
    text-decoration: none;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section ul li a:hover {
    color: var(--primary-light);
    padding-left: 8px;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.social-links a {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all var(--transition-normal);
    font-size: 1.1rem;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 24px;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ============================================
   UTILIDADES Y COMPONENTES ADICIONALES
   ============================================ */
.w3-theme {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.w3-text-theme {
    color: var(--primary-color) !important;
}

.w3-border-theme {
    border-color: var(--primary-color) !important;
}

/* Botones mejorados */
.w3-button {
    transition: all var(--transition-fast);
    border-radius: var(--radius-md);
}

.w3-button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Paneles de alerta mejorados */
.w3-panel {
    border-radius: var(--radius-lg);
    margin: 20px 0;
}

.w3-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.w3-red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

.w3-yellow {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

/* Formularios elegantes */
.w3-input, .w3-select {
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    padding: 14px 16px;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.w3-input:focus, .w3-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
}

/* Responsive */
@media (max-width: 992px) {
    .nav-links {
        display: none;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .songs-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

@media (max-width: 600px) {
    .hero-actions {
        flex-direction: column;
        width: 100%;
        padding: 0 20px;
    }
    
    .hero-actions .w3-button {
        width: 100%;
    }
    
    .song-list-item {
        flex-direction: column;
        text-align: center;
    }
    
    .section-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* Animaciones de entrada */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.6s ease;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--border-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}