#hmix-bottom-player {
    height: 250px;
    position: fixed;
    left: 0;
    right: 0;
    display: block;
    z-index: 99;
    background: #121212;
    border-top: 1px solid #282828;
    padding: 30px 0;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.8);
    transition: height 0.5s ease !important;
    left: 0;
    right: 0;
    z-index: 999;
    transform: translateZ(0);
    will-change: transform;
    /* keeps taps/scroll smooth */
    touch-action: manipulation;
}

/* DEFAULT STATE */
#hmix-bottom-player.minimized {
    height: 120px;
    padding: 10px 20px;
}

#hmix-bottom-player.active {
    display: block;
}

/* Expand mode */
#hmix-bottom-player.expanded {
    height: 70vh;
    bottom: -1px;
    transition: height 0.5s ease !important;
    z-index: 999;
}

.hmix-player-share {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    border: none;
    background: #00000000;
    color: #fff9;
    font-size: 15px;
    cursor: pointer;
    transition: 0.2s ease;
    padding: 0 6px;
}

.hmix-player-share:hover {
    color: #fff;
    opacity: 1;
    transform: scale(1.1);
}

.hmix-player-inner {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 50px;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 24px;
    align-items: center;
}

/* LEFT - Song Info */
.hmix-player-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

#hmix-player-title {
    font-size: 14px !important;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.hmix-player-meta {
    display: flex;
    flex-direction: column;
}

.hmix-player-producer {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
    letter-spacing: 0.5px;
}

#hmix-time {
    font-size: 12px;
    color: #b3b3b3;
}

/* CENTER - Controls & Progress */
.hmix-player-center {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    width: 100%;
}

.hmix-button-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.hmix-control-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 25px;
    height: 25px;
    color: #b3b3b3;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.hmix-play-btn svg {
    width: 28px;
    height: 28px;
    fill: white;
    pointer-events: none;
}

.hmix-player-btn svg {
    width: 32px;
    height: 32px;
    fill: white;
    pointer-events: none;
}

#hmix-shuffle {
    width: 20px;
    filter: invert(0.7);
    transition: filter 0.2s ease, transform 0.2s ease;
}

#hmix-shuffle:hover {
    filter: invert(1);
    transform: scale(1.1);
}

#hmix-shuffle.active {
    filter: brightness(0) saturate(100%) invert(40%) sepia(60%) saturate(600%) hue-rotate(170deg);
}

.hmix-control-btn svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.hmix-control-btn:hover {
    color: #fff;
    transform: scale(1.1);
}

.hmix-control-btn.active {
    color: #1f6faa;
}

.hmix-player-btn {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: #fff2 !important;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    padding: 10px;
}

.hmix-player-btn:hover {
    background: #fff1 !important;
    transform: scale(1.08);
    box-shadow: 0 8px 26px #fff0;
}

.hmix-play-btn:active {
    transform: scale(0.96);
}

/* PROGRESS BAR */
.hmix-progress-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Remove default appearance */
#hmix-progress {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #444;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

/* WebKit (Chrome, Safari, Edge) */
#hmix-progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Firefox */
#hmix-progress::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Track for Firefox */
#hmix-progress::-moz-range-track {
    background: #444;
    height: 6px;
    border-radius: 4px;
}

.hmix-progress-time {
    font-size: 12px;
    color: #b3b3b3;
    min-width: 40px;
    text-align: right;
}

/* RIGHT - Volume */
.hmix-player-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 150px;
}

.hmix-player-right svg {
    width: 18px;
    height: 18px;
    fill: #b3b3b3;
    flex-shrink: 0;
}

#hmix-volume {
    flex: 1;
    max-width: 100px;
    height: 4px;
    background: #404040;
    border-radius: 2px;
    appearance: none;
    cursor: pointer;
    outline: none;
    padding: 0;
    -webkit-appearance: none;
}

#hmix-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

#hmix-volume::-webkit-slider-thumb:hover {
    background: #1f6faa;
}

#hmix-volume::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

#hmix-volume::-moz-range-thumb:hover {
    background: #1db954;
}

#hmix-volume::-moz-range-track {
    background: transparent;
    border: none;
}

@media (max-width: 1024px) {
    #hmix-bottom-player.minimized {
        height: 65px;
        padding: 10px 20px;
    }

    .hmix-player-inner {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    /* Stack title at top */
    .hmix-player-left {
        display: flex;
        align-items: center;
        justify-content: space-between;
        text-align: left;
    }

    #hmix-player-title {
        text-align: center;
    }

    #hmix-time {
        font-size: 11px;
    }

    /* Center controls */
    .hmix-player-center {
        width: 100%;
    }

    .hmix-button-row {
        gap: 25px;
    }

    /* Move volume under progress */
    .hmix-player-right {
        justify-content: center;
        display: none;
    }
}