.valacuhi-mp3-player {
    --surface-0: #f6f8fb;
    --surface-1: #ffffff;
    --surface-2: #f3f7fc;
    --line-soft: #d5deea;
    --line-mid: #c4d2e2;
    --text-strong: #1b2736;
    --text-main: #30445a;
    --text-muted: #6d8198;
    --accent: #0f74b8;
    --accent-strong: #0a629c;
    --accent-soft: #d6ecfa;
    --shadow-card: 0 24px 40px -32px rgba(27, 61, 95, 0.45), 0 8px 24px -18px rgba(16, 59, 98, 0.28);
    --shadow-focus: 0 0 0 3px rgba(15, 116, 184, 0.2);
    --motion-fast: 160ms;
    --motion-mid: 240ms;
    --radius-card: 20px;
    --radius-ui: 12px;

    border: 1px solid var(--line-soft);
    border-radius: var(--radius-card);
    padding: 26px;
    max-width: 780px;
    margin: 20px auto;
    color: var(--text-main);
    font-family: "Manrope", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 251, 255, 0.95) 56%, rgba(240, 247, 255, 0.98) 100%);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.valacuhi-mp3-player::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 14% 10%, rgba(170, 219, 246, 0.24), transparent 42%);
}

.valacuhi-mp3-player > * {
    position: relative;
    z-index: 1;
}

.valacuhi-mp3-player h2 {
    margin: 0 0 20px;
    text-align: center;
    color: var(--text-strong);
    letter-spacing: 0.03em;
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    font-weight: 600;
}

.valacuhi-mp3-player .player-body {
    display: flex;
    margin-bottom: 22px;
    gap: 22px;
    align-items: flex-start;
}

.valacuhi-mp3-player .album-art-container {
    width: 190px;
    height: 190px;
    margin-right: 0;
    flex-shrink: 0;
    background: linear-gradient(180deg, #eef4fb 0%, #e8f0f9 100%);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    box-shadow: 0 12px 28px -24px rgba(11, 60, 94, 0.55);
}

.valacuhi-mp3-player .album-art {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
    transition: transform var(--motion-mid) ease, opacity var(--motion-mid) ease;
}

.valacuhi-mp3-player .track-info {
    flex-grow: 1;
    min-width: 0;
}

.valacuhi-mp3-player .track-title {
    color: var(--text-strong);
    font-size: clamp(1.15rem, 2vw, 1.45rem);
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: 8px;
    min-height: 2.6em;
    max-height: 2.6em;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.valacuhi-mp3-player .track-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    min-height: 22px;
    margin-bottom: 14px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.valacuhi-mp3-player .progress-container {
    background: #dbe5ef;
    cursor: pointer;
    margin-bottom: 8px;
    height: 12px;
    position: relative;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid #d2deea;
    transition: box-shadow var(--motion-fast) ease;
}

.valacuhi-mp3-player .progress-container:hover {
    box-shadow: inset 0 0 0 1px #b8c9dc;
}

.valacuhi-mp3-player .progress-buffered {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(90deg, #c4d4e4 0%, #cedbe8 100%);
}

.valacuhi-mp3-player .progress-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: linear-gradient(90deg, var(--accent) 0%, #1a8dd4 100%);
    width: 0;
    transition: width var(--motion-fast) linear;
}

.valacuhi-mp3-player .progress-handle {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--accent);
    pointer-events: none;
    box-shadow: 0 3px 8px rgba(16, 77, 122, 0.25);
}

.valacuhi-mp3-player .time-container {
    display: flex;
    justify-content: flex-end;
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 12px;
    letter-spacing: 0.03em;
    font-weight: 600;
}

.valacuhi-mp3-player .time-combined {
    font-variant-numeric: tabular-nums;
}

.valacuhi-mp3-player .player-controls-inline {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.valacuhi-mp3-player .player-controls-inline button {
    background: linear-gradient(180deg, #ffffff 0%, #f3f8fd 100%);
    border: 1px solid var(--line-mid);
    border-radius: var(--radius-ui);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 7px 11px;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease, border-color var(--motion-fast) ease, color var(--motion-fast) ease;
}

.valacuhi-mp3-player .player-controls-inline button:hover,
.valacuhi-mp3-player .player-controls-inline button.is-active {
    color: var(--accent);
    border-color: #9bc9e9;
    box-shadow: 0 10px 18px -16px rgba(13, 86, 135, 0.6);
    transform: translateY(-1px);
}

.valacuhi-mp3-player .player-controls-inline button:focus-visible,
.valacuhi-mp3-player .download-album:focus-visible,
.valacuhi-mp3-player .track-list li:focus-within {
    outline: none;
    box-shadow: var(--shadow-focus);
}

.valacuhi-mp3-player .player-controls-inline button:active {
    transform: translateY(0);
}

.valacuhi-mp3-player .player-controls-inline .play-pause-btn {
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
    color: #fff;
    border-color: transparent;
    font-weight: 600;
    min-width: 52px;
    padding-inline: 10px;
}

.valacuhi-mp3-player .player-controls-inline .play-pause-btn:hover {
    color: #fff;
    border-color: transparent;
    box-shadow: 0 14px 22px -16px rgba(15, 116, 184, 0.75);
}

.valacuhi-mp3-player .player-controls-inline button:disabled {
    opacity: 0.46;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.valacuhi-mp3-player .control-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.valacuhi-mp3-player .control-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: currentColor;
}

.valacuhi-mp3-player .prev-btn,
.valacuhi-mp3-player .next-btn {
    min-width: 34px;
    width: 34px;
    padding-inline: 0;
}

.valacuhi-mp3-player .mute-btn,
.valacuhi-mp3-player .mix-btn {
    min-width: 42px;
    width: 42px;
    padding-inline: 0;
}

.valacuhi-mp3-player .play-pause-btn .control-icon {
    width: 20px;
    height: 20px;
}

.valacuhi-mp3-player .control-fallback {
    display: none;
}

.valacuhi-mp3-player .album-download-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    margin-left: 2px;
}

.valacuhi-mp3-player .download-album {
    display: inline-block;
    padding: 9px 11px;
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius-ui);
    font-size: 0.84rem;
    font-weight: 600;
    border: 1px solid transparent;
    transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease, opacity var(--motion-fast) ease;
    line-height: 1;
}

.valacuhi-mp3-player .download-album .control-icon {
    width: 18px;
    height: 18px;
    margin-right: 3px;
    vertical-align: middle;
}

.valacuhi-mp3-player .download-album:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 22px -16px rgba(15, 116, 184, 0.75);
    opacity: 0.96;
}

.valacuhi-mp3-player .album-download-count {
    margin-left: 2px;
    font-weight: 600;
}

.valacuhi-mp3-player .track-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(247, 251, 255, 0.78) 100%);
}

.valacuhi-mp3-player .track-list li {
    padding: 10px 12px;
    border-bottom: 1px solid #e3ebf3;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 9px;
    transition: background-color var(--motion-fast) ease, transform var(--motion-fast) ease;
}

.valacuhi-mp3-player .track-list li:last-child {
    border-bottom: none;
}

.valacuhi-mp3-player .track-list li:hover {
    background-color: #f2f8fd;
}

.valacuhi-mp3-player .track-list li.active {
    background: linear-gradient(90deg, rgba(15, 116, 184, 0.09) 0%, rgba(15, 116, 184, 0.02) 60%);
}

.valacuhi-mp3-player .track-list li.active .track-name {
    color: var(--text-strong);
    font-weight: 600;
}

.valacuhi-mp3-player .track-thumb-wrap {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid #d3dfeb;
    background: #e7f0f9;
}

.valacuhi-mp3-player .track-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.valacuhi-mp3-player .track-number {
    margin-right: 5px;
    color: #7f93a7;
    font-variant-numeric: tabular-nums;
    min-width: 24px;
}

.valacuhi-mp3-player .track-name {
    flex-grow: 1;
    font-size: 1.04rem;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.valacuhi-mp3-player .track-actions {
    display: flex;
    align-items: center;
}

.valacuhi-mp3-player .download-track {
    margin-left: 10px;
    color: var(--accent);
    text-decoration: none;
    border-radius: 8px;
    padding: 2px;
    transition: color var(--motion-fast) ease, transform var(--motion-fast) ease;
}

.valacuhi-mp3-player .download-track:hover {
    color: var(--accent-strong);
    transform: translateY(-1px);
}

.valacuhi-mp3-player .download-track .dashicons {
    font-size: 20px;
}

.valacuhi-mp3-player .download-count {
    margin-left: 5px;
    font-size: 0.76rem;
    color: #7f92a6;
}

@media (max-width: 840px) {
    .valacuhi-mp3-player {
        padding: 20px;
        border-radius: 18px;
    }

    .valacuhi-mp3-player .player-body {
        gap: 16px;
    }

    .valacuhi-mp3-player .album-art-container {
        width: 160px;
        height: 160px;
    }
}

@media (max-width: 720px) {
    .valacuhi-mp3-player {
        padding: 16px;
        margin: 14px auto;
    }

    .valacuhi-mp3-player .player-body {
        flex-direction: column;
    }

    .valacuhi-mp3-player .album-art-container {
        width: 100%;
        max-width: 340px;
        height: 210px;
        margin: 0 auto 10px;
    }

    .valacuhi-mp3-player .player-controls-inline {
        flex-wrap: wrap;
        gap: 7px;
    }

    .valacuhi-mp3-player .album-download-inline {
        margin-left: 0;
    }

    .valacuhi-mp3-player .player-controls-inline .play-pause-btn {
        flex-grow: 1;
        text-align: center;
    }

    .valacuhi-mp3-player .download-album {
        flex-grow: 1;
        text-align: center;
    }

    .valacuhi-mp3-player .track-name {
        font-size: 0.99rem;
    }
}
