/* --- SPLASH SCREEN --- */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s;
}

#splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.splash-content {
    text-align: center;
    color: var(--accent-primary);
}

.splash-content i {
    font-size: 5rem;
    margin-bottom: 20px;
    text-shadow: 0 0 30px var(--accent-primary);
}

.splash-content h1 {
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 5px;
    margin-bottom: 10px;
}

.splash-content p {
    color: var(--text-dim);
    margin-bottom: 40px;
    letter-spacing: 2px;
}

#start-app-btn {
    background: transparent;
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 15px 40px;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.2);
}

#start-app-btn:hover {
    background: var(--accent-primary);
    color: #000;
    box-shadow: 0 0 30px var(--accent-primary);
}

:root {
    --bg-dark: #050505;
    --panel-bg: #111112;
    --accent-primary: #00f2ff;
    --accent-secondary: #7000ff;
    --text-main: #a0a0a5;
    --text-dim: #666;
    --glass: rgba(0, 242, 255, 0.03);
    --neon-glow: 0 0 15px rgba(0, 242, 255, 0.4);
    --inner-shadow: inset 4px 4px 8px rgba(0,0,0,0.7), inset -2px -2px 4px rgba(255,255,255,0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
    -webkit-tap-highlight-color: transparent;
    /* COMPATIBILIDAD FIREFOX */
    scrollbar-width: thin !important;
    scrollbar-color: var(--accent-primary) transparent !important;
}

/* --- SCROLLBARS ULTRA-SLIM (CHROME, EDGE, SAFARI) --- */
::-webkit-scrollbar {
    width: 3px !important; /* Aún más delgado (hilo) */
    height: 3px !important;
}

::-webkit-scrollbar-track {
    background: transparent !important;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary)) !important;
    border-radius: 10px !important;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary) !important;
}

body {
    background: var(--bg-dark);
    color: var(--text-main);
    height: 100vh;
    height: -webkit-fill-available;
    overflow: hidden;
}

.app-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    grid-template-rows: 1fr;
    height: 100vh;
}

/* --- SIDEBAR --- */
.sidebar {
    background: var(--panel-bg);
    border-right: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 25px 30px;
    font-family: 'Orbitron', sans-serif;
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.1rem;
    font-weight: 700;
}

#folder-menu {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 0;
    min-height: 200px;
}

#folder-list {
    list-style: none;
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 2px;
}

.folder-item {
    padding: 14px 25px;
    margin: 4px 10px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: 0.2s;
    color: var(--text-main);
}

.folder-item i { color: #f39c12; }

.folder-item:hover, .folder-item.active {
    background: var(--glass);
    color: var(--accent-primary);
    box-shadow: var(--inner-shadow);
}

.folder-item.active {
    border-left: 4px solid var(--accent-primary);
    background: rgba(0, 242, 255, 0.05);
}

/* --- MAIN CONTENT --- */
.content {
    background: radial-gradient(circle at top right, #1a1a1c, #050505);
    padding: 25px 25px 150px 25px;
    overflow-y: auto;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.content-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    color: var(--accent-primary);
    text-shadow: 0 0 20px rgba(0,242,255,0.2);
}

.search-box input {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(0, 242, 255, 0.1);
    padding: 12px 20px 12px 45px;
    border-radius: 30px;
    color: var(--accent-primary);
    width: 280px;
    box-shadow: var(--inner-shadow);
    outline: none;
}

/* --- SONG LIST --- */
.song-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.song-table th {
    text-align: left;
    padding: 10px 15px;
    color: var(--text-dim);
    font-size: 0.8rem;
    text-transform: uppercase;
}

.song-row {
    background: rgba(255,255,255,0.01);
    transition: 0.3s;
    color: var(--text-main);
}

.song-row td {
    padding: 15px;
}

.song-row td:first-child { border-radius: 10px 0 0 10px; }
.song-row td:last-child { border-radius: 0 10px 10px 0; }

.song-row:hover {
    background: rgba(0, 242, 255, 0.05);
    color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.song-row.playing {
    color: var(--accent-primary);
    background: rgba(0, 242, 255, 0.1);
    font-weight: bold;
}

/* --- PLAYER CONSOLE --- */
.player-console {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1200px;
    height: 110px;
    background: rgba(15, 15, 17, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    padding: 0 30px;
    gap: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8), 0 0 20px rgba(0, 242, 255, 0.1);
    z-index: 1000;
}

.player-info {
    width: 250px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.display-panel {
    background: #000;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #333;
    box-shadow: var(--inner-shadow);
    min-width: 200px;
}

.track-info marquee {
    color: var(--accent-primary);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    text-shadow: var(--neon-glow);
}

#visualizer {
    width: 100%;
    height: 35px;
    margin-top: 5px;
}

.player-controls {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.main-buttons {
    display: flex;
    align-items: center;
    gap: 30px;
}

.control-btn {
    background: linear-gradient(145deg, #1e1e21, #0a0a0c);
    border: none;
    color: var(--text-main);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 5px 5px 10px rgba(0,0,0,0.5), -2px -2px 5px rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.control-btn:hover {
    color: var(--accent-primary);
}

.play-pause-wrap {
    width: 65px;
    height: 65px;
    padding: 4px;
    background: linear-gradient(var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.2);
}

.play-pause-btn {
    width: 100%;
    height: 100%;
    background: #111;
    border-radius: 50%;
    border: none;
    color: var(--accent-primary);
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-row {
    width: 100%;
    max-width: 600px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.progress-bar {
    flex-grow: 1;
    height: 6px;
    background: #000;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    box-shadow: var(--inner-shadow);
}

.progress-fill {
    position: absolute;
    height: 100%;
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    border-radius: 10px;
    width: 0%;
    box-shadow: var(--neon-glow);
}

.volume-console {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 15%;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 900px) {
    .app-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 180px;
        width: 280px;
    }

    .sidebar.open {
        transform: translateX(280px);
        box-shadow: 20px 0 40px rgba(0,0,0,0.8);
    }

    .player-console {
        width: 98%;
        bottom: 10px;
        height: 160px;
        flex-direction: column;
        padding: 15px;
        gap: 10px;
    }

    .player-info {
        width: 100%;
    }

    .display-panel {
        width: 100%;
    }

    .volume-console {
        display: none;
    }

    .search-box input {
        width: 100%;
    }
    
    .content { padding-bottom: 200px; }
}
