/* ===== HYDEX Music Player (Winamp-inspired) ===== */

.player-window {
    position: absolute;
    width: 420px;
    background: var(--hx-terminal-bg);
    border: 1px solid var(--hx-terminal-border);
    border-radius: 8px;
    box-shadow:
        0 8px 40px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(151, 240, 29, 0.08);
    display: flex;
    flex-direction: column;
    pointer-events: auto;
    font-family: var(--hx-font);
    overflow: hidden;
    transition: opacity 0.15s, transform 0.15s;
    z-index: 300;
}

.player-window.opening {
    opacity: 0;
    transform: scale(0.95);
}

.player-window.minimized {
    display: none;
}

/* ===== Player Titlebar ===== */
.player-titlebar {
    display: flex;
    align-items: center;
    height: 32px;
    padding: 0 10px;
    background: rgba(30, 35, 40, 0.95);
    border-bottom: 1px solid rgba(151, 240, 29, 0.1);
    cursor: grab;
    user-select: none;
    flex-shrink: 0;
}

.player-titlebar:active {
    cursor: grabbing;
}

.player-title {
    flex: 1;
    font-size: 13px;
    color: rgba(151, 240, 29, 0.6);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-winbtns {
    display: flex;
    gap: 2px;
    margin-left: auto;
    flex-shrink: 0;
}

.player-winbtn {
    width: 26px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid rgba(151, 240, 29, 0.25);
    background: rgba(151, 240, 29, 0.06);
    color: var(--hx-green);
    font-size: 14px;
    font-family: var(--hx-font);
    line-height: 1;
    padding: 0;
    transition: background 0.1s;
}

.player-winbtn:hover {
    background: rgba(151, 240, 29, 0.15);
}

.player-winbtn-close:hover {
    background: rgba(255, 95, 87, 0.3);
    border-color: rgba(255, 95, 87, 0.5);
    color: #ff5f57;
}

/* ===== Player Body ===== */
.player-body {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ===== Marquee ===== */
.player-marquee-wrap {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(151, 240, 29, 0.15);
    border-radius: 3px;
    overflow: hidden;
    height: 28px;
    display: flex;
    align-items: center;
    padding: 0 8px;
}

.player-marquee {
    white-space: nowrap;
    font-size: 14px;
    color: var(--hx-green);
    text-shadow: 0 0 6px rgba(151, 240, 29, 0.4);
    animation: playerMarquee 25s linear infinite;
    display: inline-block;
}

@keyframes playerMarquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* ===== Equalizer ===== */
.player-eq {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 60px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(151, 240, 29, 0.15);
    border-radius: 3px;
    padding: 6px 8px;
}

.player-eq-bar {
    flex: 1;
    background: var(--hx-green);
    border-radius: 1px;
    min-height: 3px;
    transition: height 0.1s;
    image-rendering: pixelated;
    box-shadow: 0 0 4px rgba(151, 240, 29, 0.3);
}

/* ===== Time Display ===== */
.player-time {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: rgba(151, 240, 29, 0.5);
}

.player-time-current {
    color: var(--hx-green);
    font-size: 14px;
    text-shadow: 0 0 4px rgba(151, 240, 29, 0.3);
}

/* ===== Progress Bar ===== */
.player-progress-wrap {
    height: 8px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(151, 240, 29, 0.15);
    border-radius: 2px;
    cursor: pointer;
    overflow: hidden;
}

.player-progress-fill {
    height: 100%;
    background: var(--hx-green);
    width: 0%;
    transition: width 0.3s;
    box-shadow: 0 0 6px rgba(151, 240, 29, 0.3);
}

/* ===== Controls ===== */
.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.player-btn {
    width: 36px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(151, 240, 29, 0.25);
    background: rgba(151, 240, 29, 0.06);
    color: var(--hx-green);
    font-size: 16px;
    font-family: var(--hx-font);
    cursor: pointer;
    padding: 0;
    transition: background 0.1s;
    border-radius: 2px;
}

.player-btn:hover {
    background: rgba(151, 240, 29, 0.15);
}

.player-btn.active {
    background: rgba(151, 240, 29, 0.2);
    border-color: rgba(151, 240, 29, 0.5);
    box-shadow: 0 0 8px rgba(151, 240, 29, 0.2);
}

.player-btn-play {
    width: 44px;
    height: 34px;
    font-size: 18px;
}

/* ===== Volume ===== */
.player-volume {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(151, 240, 29, 0.5);
}

.player-volume-label {
    font-size: 16px;
    color: var(--hx-green);
}

.player-volume-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(151, 240, 29, 0.15);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.player-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: var(--hx-green);
    border-radius: 2px;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(151, 240, 29, 0.3);
}

.player-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--hx-green);
    border: none;
    border-radius: 2px;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(151, 240, 29, 0.3);
}

.player-volume-val {
    min-width: 30px;
    text-align: right;
    color: var(--hx-green);
    font-size: 12px;
}

/* ===== Playlist ===== */
.player-playlist {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(151, 240, 29, 0.15);
    border-radius: 3px;
    padding: 4px 0;
    max-height: 80px;
    overflow-y: auto;
}

.player-track {
    padding: 4px 10px;
    font-size: 12px;
    color: rgba(151, 240, 29, 0.5);
    cursor: pointer;
    transition: background 0.1s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-track:hover {
    background: rgba(151, 240, 29, 0.06);
}

.player-track.active {
    color: var(--hx-green);
    text-shadow: 0 0 4px rgba(151, 240, 29, 0.3);
    background: rgba(151, 240, 29, 0.08);
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
    .player-window {
        position: fixed !important;
        width: 100% !important;
        height: auto !important;
        top: auto !important;
        bottom: 36px !important;
        left: 0 !important;
        border-radius: 0;
        border: none;
        max-height: 50vh;
        z-index: 10500 !important;
    }
}
