/* ============================================
   NevPlayer CSS — UPR Aguadilla Colors
   Azul: #003DA5 | Amarillo/Oro: #FFB81C
   ============================================ */

:root {
    --np-blue: #003DA5;
    --np-blue-dark: #002B75;
    --np-blue-light: #1A5BC4;
    --np-gold: #FFB81C;
    --np-gold-light: #FFD040;
    --np-gold-dim: #CC9400;
    --np-bg: #0D0D0D;
    --np-surface: #1A1A1A;
    --np-surface-hover: #252525;
    --np-surface-active: #2A2A2A;
    --np-text: #FFFFFF;
    --np-text-dim: #B0B0B0;
    --np-text-muted: #666666;
    --np-border: #333333;
    --np-error: #E53935;
    --np-radius: 6px;
    --np-transition: 0.2s ease;
}

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

body {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: var(--np-bg);
    color: var(--np-text);
    overflow: hidden;
    height: 100vh;
}

#nevplayer {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 900px;
    margin: 0 auto;
    background: var(--np-bg);
}

/* HEADER */
#np-header {
    background: var(--np-blue);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    border-bottom: 3px solid var(--np-gold);
}

.np-logo { display: flex; flex-direction: column; }

.np-title {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--np-gold);
    letter-spacing: 1px;
}

.np-subtitle {
    font-size: 0.72em;
    color: rgba(255,255,255,0.85);
    margin-top: 2px;
}

/* TABS */
#np-tabs {
    display: flex;
    background: var(--np-blue-dark);
    border-bottom: 1px solid var(--np-border);
    overflow-x: auto;
}

.np-tab {
    flex: 1;
    padding: 10px 8px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 0.82em;
    font-weight: 600;
    cursor: pointer;
    transition: var(--np-transition);
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.np-tab:hover { color: var(--np-gold-light); background: rgba(255,255,255,0.05); }
.np-tab.active { color: var(--np-gold); border-bottom-color: var(--np-gold); }

/* CONTENT */
#np-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.np-panel { display: none; padding: 16px; }
.np-panel.active { display: block; }

.np-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--np-border);
}

.np-panel-header h2 {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--np-text);
}

.np-badge {
    font-size: 0.65em;
    padding: 2px 8px;
    border-radius: 3px;
    background: var(--np-blue);
    color: white;
    font-weight: 700;
    text-transform: uppercase;
}

.np-badge-flac { background: var(--np-gold); color: #000; }

/* TRACKLIST */
.np-tracklist { display: flex; flex-direction: column; gap: 2px; }

.np-track-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: var(--np-surface);
    border-radius: var(--np-radius);
    cursor: pointer;
    transition: var(--np-transition);
    gap: 12px;
}

.np-track-item:hover { background: var(--np-surface-hover); }
.np-track-item.playing { background: var(--np-surface-active); border-left: 3px solid var(--np-gold); }

.np-track-item .np-item-cover {
    width: 42px;
    height: 42px;
    border-radius: 4px;
    object-fit: cover;
    background: var(--np-surface-hover);
    flex-shrink: 0;
}

.np-track-item .np-item-info { flex: 1; min-width: 0; }

.np-track-item .np-item-title {
    font-size: 0.88em;
    font-weight: 600;
    color: var(--np-text);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.np-track-item .np-item-artist {
    font-size: 0.75em;
    color: var(--np-text-dim);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.np-track-item .np-item-meta {
    font-size: 0.7em;
    color: var(--np-text-muted);
    flex-shrink: 0;
}

.np-track-item .np-item-download {
    background: none;
    border: none;
    color: var(--np-text-dim);
    font-size: 1.1em;
    cursor: pointer;
    padding: 4px;
    transition: var(--np-transition);
    text-decoration: none;
    flex-shrink: 0;
}

.np-track-item .np-item-download:hover { color: var(--np-gold); }

.np-playing-indicator {
    color: var(--np-gold);
    font-size: 0.9em;
    flex-shrink: 0;
    animation: pulse 1.2s infinite;
}

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* RADIO GENRES */
.np-radio-genres {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.np-genre-btn {
    padding: 5px 14px;
    border: 1px solid var(--np-border);
    background: var(--np-surface);
    color: var(--np-text-dim);
    border-radius: 20px;
    font-size: 0.78em;
    cursor: pointer;
    transition: var(--np-transition);
}

.np-genre-btn:hover { border-color: var(--np-gold-dim); color: var(--np-gold-light); }
.np-genre-btn.active { background: var(--np-blue); border-color: var(--np-blue); color: var(--np-gold); }

/* RADIO ITEM */
.np-radio-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: var(--np-surface);
    border-radius: var(--np-radius);
    cursor: pointer;
    transition: var(--np-transition);
    gap: 12px;
}

.np-radio-item:hover { background: var(--np-surface-hover); }
.np-radio-item.playing { background: var(--np-surface-active); border-left: 3px solid var(--np-gold); }

.np-radio-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--np-text-muted);
    flex-shrink: 0;
}

.np-radio-item.playing .np-radio-dot {
    background: var(--np-gold);
    box-shadow: 0 0 6px var(--np-gold);
    animation: pulse 1.2s infinite;
}

.np-radio-info { flex: 1; }
.np-radio-name { font-size: 0.88em; font-weight: 600; display: block; }
.np-radio-detail { font-size: 0.72em; color: var(--np-text-dim); }
.np-radio-genre-tag { font-size: 0.65em; color: var(--np-text-muted); background: rgba(255,255,255,0.05); padding: 1px 6px; border-radius: 3px; }

/* AUTH FORM */
.np-auth-form {
    padding: 30px;
    text-align: center;
}

.np-auth-form p { color: var(--np-text-dim); margin-bottom: 12px; font-size: 0.9em; }

.np-auth-form input {
    padding: 8px 14px;
    background: var(--np-surface);
    border: 1px solid var(--np-border);
    color: var(--np-text);
    border-radius: var(--np-radius);
    font-size: 0.9em;
    margin-right: 8px;
}

.np-auth-form input:focus { outline: none; border-color: var(--np-gold); }

.np-btn {
    padding: 8px 18px;
    background: var(--np-blue);
    color: white;
    border: none;
    border-radius: var(--np-radius);
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: var(--np-transition);
}

.np-btn:hover { background: var(--np-blue-light); }

.np-btn-scan {
    padding: 5px 14px;
    background: var(--np-gold);
    color: #000;
    border: none;
    border-radius: var(--np-radius);
    cursor: pointer;
    font-size: 0.82em;
    font-weight: 700;
    transition: var(--np-transition);
    margin-left: auto;
}

.np-btn-scan:hover { background: var(--np-gold-light); }
.np-btn-scan.scanning { animation: spin 1s linear infinite; }

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.np-error { color: var(--np-error); font-size: 0.82em; margin-top: 8px; }

/* SETTINGS */
.np-settings-content { display: flex; flex-direction: column; gap: 16px; }

.np-setting-group {
    background: var(--np-surface);
    padding: 14px 16px;
    border-radius: var(--np-radius);
}

.np-setting-group h3 {
    font-size: 0.82em;
    color: var(--np-gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.np-setting-group p { font-size: 0.85em; color: var(--np-text-dim); margin-bottom: 3px; }

.np-flac-status {
    font-size: 0.65em;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 600;
}

.np-flac-yes { background: #1B5E20; color: #A5D6A7; }
.np-flac-no { background: #B71C1C; color: #EF9A9A; }

/* PLAYER BAR */
#np-player-bar {
    background: var(--np-blue-dark);
    border-top: 2px solid var(--np-gold);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.np-now-playing {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 160px;
    max-width: 200px;
}

.np-cover-art {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    background: var(--np-surface);
}

.np-track-info { overflow: hidden; }

.np-track-title {
    font-size: 0.8em;
    font-weight: 600;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.np-track-artist {
    font-size: 0.7em;
    color: var(--np-text-dim);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* CONTROLS */
.np-controls { display: flex; align-items: center; gap: 4px; }

.np-ctrl-btn {
    background: none;
    border: none;
    color: var(--np-text);
    font-size: 1.1em;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: var(--np-transition);
    line-height: 1;
}

.np-ctrl-btn:hover { color: var(--np-gold); background: rgba(255,255,255,0.1); }

/* CHANGED v4.3: Shuffle/Repeat active state */
.np-ctrl-btn.active { color: #4FC3F7; }

.np-play-btn {
    font-size: 1.4em;
    color: var(--np-gold);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--np-gold);
    border-radius: 50%;
}

.np-play-btn:hover { background: var(--np-gold); color: #000; }

/* PROGRESS */
.np-progress-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.np-time { font-size: 0.7em; color: var(--np-text-dim); min-width: 36px; text-align: center; }

.np-progress-bar {
    flex: 1;
    height: 5px;
    background: var(--np-border);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.np-progress-fill {
    height: 100%;
    background: var(--np-blue-light);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.np-progress-handle {
    width: 12px;
    height: 12px;
    background: var(--np-gold);
    border-radius: 50%;
    position: absolute;
    top: -3.5px;
    left: 0%;
    transform: translateX(-50%);
    cursor: grab;
    opacity: 0;
    transition: opacity 0.2s;
}

.np-progress-bar:hover .np-progress-handle { opacity: 1; }

/* VOLUME */
.np-volume-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.np-vol-icon { font-size: 1em; }

.np-volume-slider {
    -webkit-appearance: none;
    width: 80px;
    height: 4px;
    background: var(--np-border);
    border-radius: 2px;
    outline: none;
}

.np-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: var(--np-gold);
    border-radius: 50%;
    cursor: pointer;
}

.np-volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: var(--np-gold);
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

.np-download-btn {
    text-decoration: none;
    font-size: 1.2em;
    color: var(--np-text-dim);
}

.np-download-btn:hover { color: var(--np-gold); }

/* SCROLLBAR */
#np-content::-webkit-scrollbar { width: 6px; }
#np-content::-webkit-scrollbar-track { background: var(--np-bg); }
#np-content::-webkit-scrollbar-thumb { background: var(--np-border); border-radius: 3px; }
#np-content::-webkit-scrollbar-thumb:hover { background: var(--np-text-muted); }

/* PLACEHOLDER COVER */
.np-cover-placeholder {
    width: 42px;
    height: 42px;
    background: var(--np-surface-hover);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--np-text-muted);
    font-size: 1.2em;
    flex-shrink: 0;
}

/* RESPONSIVE */
@media (max-width: 700px) {
    .np-now-playing { min-width: 100px; max-width: 130px; }
    .np-volume-slider { width: 50px; }
    .np-tab { font-size: 0.72em; padding: 8px 4px; }
    #np-player-bar { padding: 6px 10px; gap: 8px; }
}
