/* Variables CSS */
:root {
    --primary: #4a6fa5;
    --primary-dark: #385d8a;
    --secondary: #6d9dc5;
    --accent: #ff7e5f;
    --dark: #2c3e50;
    --light: #ecf0f1;
    --gray: #95a5a6;
    --success: #2ecc71;
    --warning: #f39c12;
    --danger: #e74c3c;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* Navegación */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.logo i {
    font-size: 2rem;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    transition: var(--transition);
}

.nav-links a.active,
.nav-links a:hover {
    background: var(--primary);
    color: white;
}

.nav-links button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.nav-links button:hover {
    background: #ff6b4a;
    transform: translateY(-2px);
}

/* Header/Hero */
.hero {
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)),
                url('../assets/pattern.png');
    padding: 4rem 2rem;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.feature i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.feature h3 {
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.feature p {
    color: var(--gray);
}

/* Secciones */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.section {
    background: white;
    border-radius: 15px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.section h2 {
    color: var(--primary);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
}

/* Selector de carpetas */
.folder-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.folder-option {
    background: var(--light);
    border: 2px dashed var(--gray);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.folder-option:hover {
    border-color: var(--primary);
    background: #e8f4fc;
    transform: scale(1.02);
}

.folder-icon {
    width: 80px;
    height: 80px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.folder-icon i {
    font-size: 2.5rem;
    color: white;
}

.folder-option h3 {
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.folder-option p {
    color: var(--gray);
    margin-bottom: 1rem;
}

.folder-path {
    background: white;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
    width: 100%;
    margin-top: 1rem;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Estadísticas de archivos */
.file-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat i {
    font-size: 2rem;
    color: var(--primary);
}

.stat span {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--dark);
}

/* Grid de archivos */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.file-item {
    background: var(--light);
    border-radius: 10px;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.file-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.file-thumbnail {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.file-info {
    padding: 1rem;
}

.file-name {
    font-weight: bold;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    display: flex;
    justify-content: space-between;
    color: var(--gray);
    font-size: 0.9rem;
}

/* Botones */
.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-primary, .btn-secondary {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--light);
    transform: translateY(-2px);
}

/* Reproductor */
.player-container {
    background: var(--dark);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 2rem;
}

#mainPlayer {
    width: 100%;
    max-height: 500px;
    display: block;
}

.player-info {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
}

#nowPlaying {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.control-btn {
    background: var(--primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.control-btn:hover {
    background: var(--secondary);
}

.play-btn {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
}

#volumeSlider {
    flex-grow: 1;
    max-width: 200px;
}

/* Playlist */
.playlist {
    background: var(--light);
    border-radius: 10px;
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.playlist-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    transition: var(--transition);
}

.playlist-item:hover {
    background: #e0e0e0;
}

.playlist-item.active {
    background: var(--primary);
    color: white;
}

.playlist-item i {
    margin-right: 10px;
    width: 20px;
}

.playlist-item-name {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Instrucciones */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.step {
    text-align: center;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.step h3 {
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.step p {
    color: var(--gray);
}

.note {
    background: #fff9e6;
    border-left: 4px solid var(--warning);
    padding: 1rem;
    margin-top: 2rem;
    border-radius: 5px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.note i {
    color: var(--warning);
    font-size: 1.5rem;
}

.note p {
    color: var(--dark);
}

/* Footer */
.footer {
    background: var(--dark);
    color: white;
    padding: 3rem 2rem 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--secondary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-section p {
    margin-bottom: 0.5rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.tech-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-small {
    background: var(--danger);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-small:hover {
    background: #c0392b;
}

/* Utilidades */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .section {
        padding: 1.5rem;
    }
    
    .folder-options {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.file-preview, .player-section {
    animation: fadeIn 0.5s ease-out;
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}