/* B"H */
/* UI COMPONENTS - HIGH CONTRAST */

/* --- LIST ITEMS --- */
.item {
    padding: 18px;
    border-bottom: 1px solid #222;
    cursor: pointer;
    color: #eee; /* Bright white text */
    font-size: 16px; /* Larger text */
    transition: all 0.15s;
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(255,255,255,0.02);
}
.item:nth-child(even) { background: transparent; }

.item:hover { 
    background: rgba(0, 243, 255, 0.15); 
    color: #fff; 
    padding-left: 22px; 
    border-left: 4px solid var(--c-cyan);
}
.item.active { 
    background: var(--c-cyan); 
    color: #000 !important; 
    font-weight: 900; 
    padding-left: 22px; 
    box-shadow: 0 0 20px var(--c-cyan);
}
.item.active * { color: #000 !important; border-color: #000 !important; }

.item .icon { font-size: 20px; margin-right: 12px; opacity: 0.9; }
.year-item { color: var(--c-yellow); font-weight: bold; }
.folder-item { color: #fff; }

/* MINI BUTTONS IN LISTS */
.mini-btn {
    background: rgba(255,255,255,0.1); 
    border: 1px solid #666; 
    color: #ccc;
    width: 36px; height: 36px; border-radius: 4px; 
    cursor: pointer; font-size: 16px; 
    display: flex; align-items: center; justify-content: center;
    transition: 0.2s;
}
.mini-btn:hover { 
    border-color: var(--c-cyan); 
    color: var(--c-cyan); 
    background: rgba(0,0,0,0.8); 
    transform: scale(1.1); 
    box-shadow: 0 0 10px var(--c-cyan);
}

/* --- BACK BUTTON (Mobile) --- */
.btn-back {
    background: #111; border: 1px solid var(--c-cyan); color: var(--c-cyan);
    width: 40px; height: 40px; font-weight: bold; cursor: pointer;
    font-size: 20px; display: none; /* Desktop hidden */
}
@media(max-width: 768px) { .btn-back { display: block; } }

/* --- FOOTER & PLAYER --- */
footer {
    height: 100px;
    background: #000;
    border-top: 2px solid var(--c-cyan);
    display: flex; align-items: center;
    padding: 0 20px; gap: 20px;
    position: relative; z-index: 100;
    box-shadow: 0 -5px 25px rgba(0,0,0,0.8);
    flex-shrink: 0;
}

.controls { display: flex; gap: 25px; align-items: center; }

.ctrl-btn {
    width: 55px; height: 55px;
    border: 2px solid #555; 
    background: rgba(255,255,255,0.05); /* Visible bg against black */
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    cursor: pointer; color: #fff;
    transition: all 0.2s;
}
.ctrl-btn:hover { border-color: var(--c-cyan); color: var(--c-cyan); transform: scale(1.1); box-shadow: 0 0 15px var(--c-cyan); background: #000; }
.ctrl-btn svg { width: 28px; height: 28px; fill: currentColor; }

#btn-play { 
    width: 70px; height: 70px; 
    border-color: var(--c-cyan); color: var(--c-cyan); 
    background: rgba(0, 243, 255, 0.1);
}
#btn-play:hover { background: var(--c-cyan); color: #000; box-shadow: 0 0 25px var(--c-cyan); }
#btn-slice { border-color: var(--c-magenta); color: var(--c-magenta); }
#btn-slice:hover { background: var(--c-magenta); color: #fff; }

.info { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 12px; min-width: 0; }
.track-title { 
    color: var(--c-yellow); font-size: 18px; font-weight: bold; 
    letter-spacing: 1px; text-shadow: 0 0 5px rgba(255, 204, 0, 0.3);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.progress-container {
    width: 100%; height: 16px;
    background: #222; border: 1px solid #444;
    cursor: pointer; position: relative;
    border-radius: 4px; overflow: hidden;
}
.progress-fill {
    height: 100%; background: var(--c-cyan); width: 0%;
    box-shadow: 0 0 15px var(--c-cyan);
    transition: width 0.1s linear;
}
.progress-fill.loading { background: repeating-linear-gradient(45deg, var(--c-cyan), var(--c-cyan) 10px, #004444 10px, #004444 20px); }

.time-display {
    display: flex; justify-content: space-between; 
    font-size: 14px; color: #aaa; font-weight: bold;
}

/* --- MODALS --- */
#overlay-layer {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(8px);
    z-index: 200; display: flex; justify-content: center; align-items: center;
}
.modal {
    background: #000; border: 2px solid var(--c-cyan);
    width: 550px; max-width: 90%; max-height: 90vh; overflow-y: auto;
    padding: 30px; box-shadow: 0 0 60px rgba(0,243,255,0.25);
    display: flex; flex-direction: column; gap: 20px;
}
.modal h2 { margin: 0; color: var(--c-magenta); border-bottom: 2px solid #333; padding-bottom: 15px; letter-spacing: 2px; font-size: 24px; text-transform: uppercase; }

.cyber-input {
    background: #1a1a1a; border: 1px solid #444; 
    color: #fff; padding: 14px; font-size: 16px; 
    width: 100%; font-family: monospace;
}
.cyber-input:focus { border-color: var(--c-cyan); outline: none; box-shadow: 0 0 15px rgba(0,243,255,0.3); }

.modal-btn {
    background: #000; border: 1px solid var(--c-cyan); color: var(--c-cyan);
    padding: 12px 24px; cursor: pointer; font-weight: bold; font-size: 14px;
    transition: 0.2s; letter-spacing: 1px; text-transform: uppercase;
}
.modal-btn:hover { background: var(--c-cyan); color: #000; box-shadow: 0 0 15px var(--c-cyan); }
.modal-btn.danger { border-color: var(--c-magenta); color: var(--c-magenta); }
.modal-btn.danger:hover { background: var(--c-magenta); color: #fff; box-shadow: 0 0 15px var(--c-magenta); }

.search-res { max-height: 300px; overflow-y: auto; border: 1px solid #333; margin-top: 10px; }
.result-item { padding: 15px; border-bottom: 1px solid #222; cursor: pointer; color: #eee; font-size: 16px; }
.result-item:hover { background: #111; color: var(--c-cyan); padding-left: 20px; }

/* --- INSANE LOADING OVERLAY --- */
#loading-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.95); z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(10px);
}
.loader-core {
    position: relative; width: 200px; height: 200px;
    display: flex; align-items: center; justify-content: center;
    flex-direction: column;
}
.ring {
    position: absolute; border-radius: 50%;
    border: 2px solid transparent;
}
.r1 {
    width: 100%; height: 100%; border-top-color: var(--c-cyan); border-bottom-color: var(--c-cyan);
    animation: spin 2s linear infinite;
    box-shadow: 0 0 20px var(--c-cyan);
}
.r2 {
    width: 70%; height: 70%; border-left-color: var(--c-magenta); border-right-color: var(--c-magenta);
    animation: spin 3s reverse linear infinite;
    box-shadow: 0 0 15px var(--c-magenta);
}
.r3 {
    width: 40%; height: 40%; border: 4px solid var(--c-lime);
    animation: pulse 1s ease-in-out infinite;
    box-shadow: 0 0 10px var(--c-lime);
}
.core-text {
    margin-top: 240px; font-size: 24px; color: #fff; font-weight: 900; letter-spacing: 5px;
    animation: glitch 1s infinite;
}
.core-sub {
    font-size: 12px; color: var(--c-cyan); margin-top: 10px; letter-spacing: 2px;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes pulse { 0% { transform: scale(0.8); opacity: 0.5; } 50% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(0.8); opacity: 0.5; } }
@keyframes glitch { 0% { transform: skew(0deg); } 20% { transform: skew(-10deg); } 40% { transform: skew(10deg); } 60% { transform: skew(-5deg); } 80% { transform: skew(5deg); } 100% { transform: skew(0deg); } }

/* Range Styling */
input[type=range] { -webkit-appearance: none; background: transparent; }
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; height: 16px; width: 16px; border-radius: 50%;
    background: var(--c-cyan); cursor: pointer; margin-top: -6px;
    box-shadow: 0 0 10px var(--c-cyan);
}
input[type=range]::-webkit-slider-runnable-track {
    width: 100%; height: 4px; cursor: pointer; background: #333; border-radius: 2px;
}

/* --- MOBILE FOOTER OVERRIDE --- */
@media (max-width: 768px) {
    footer {
        height: auto !important;
        flex-direction: column;
        padding: 15px;
        gap: 15px;
    }
    .info { width: 100%; order: 1; text-align: center; }
    .controls { width: 100%; order: 2; justify-content: space-evenly; padding-bottom: 5px; }
}