
#threepm-radio {
    --metal-light: #f4f5f7;
    --metal-mid: #c4c9d0;
    --metal-dark: #7e8793;
    --ink: #111827;
    --lcd-light: #d4edff;
    --lcd-blue: #1f528d;
    --lcd-dark: #0a1e3c;

    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9000;
    width: 352px;
    overflow: hidden;
    border: 2px solid var(--ink);
    border-radius: 5px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, .98),
        rgba(211, 216, 224, .98) 50%,
        rgba(143, 151, 162, .98)
    );
    box-shadow:
        inset 1px 1px 0 rgba(255, 255, 255, .98),
        inset -1px -1px 0 rgba(18, 26, 38, .7),
        5px 6px 0 rgba(0, 0, 0, .28);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    user-select: none;
    touch-action: none;
}

#threepm-radio .threepm-radio__body {
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
}

#threepm-radio .threepm-radio__eq-state {
    font: 700 9px/1.3 "Courier New", monospace;
    color: #b9dcff;
    text-align: right;
}

#threepm-radio,
#threepm-radio * {
    box-sizing: border-box;
}

#threepm-radio.is-dragging {
    cursor: grabbing;
}

#threepm-radio.is-minimized {
    width: 210px;
}

#threepm-radio.is-minimized .threepm-radio__body {
    display: none;
}

.threepm-radio__header {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 26px;
    padding: 0 5px 0 8px;
    border-bottom: 1px solid var(--ink);
    background: linear-gradient(90deg, #0d1728, #445774 50%, #121927);
    color: #fff;
    cursor: grab;
    touch-action: none;
}

.threepm-radio__brand {
    overflow: hidden;
    flex: 1;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.threepm-radio__drag-mark {
    display: grid;
    grid-template-columns: repeat(3, 2px);
    gap: 2px;
    opacity: .65;
}

.threepm-radio__drag-mark i {
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: #fff;
}

.threepm-radio__toggle {
    position: relative;
    width: 28px;
    height: 24px;
    flex: 0 0 auto;
    padding: 0;
    border: 1px solid #07101d;
    border-radius: 2px;
    background: linear-gradient(180deg, #f4f5f7, #aeb6c0);
    box-shadow:
        inset 1px 1px 0 #fff,
        1px 1px 0 rgba(0, 0, 0, .35);
    color: var(--ink);
    cursor: pointer;
}

.threepm-radio__toggle-icon,
.threepm-radio__toggle-icon::before,
.threepm-radio__toggle-icon::after {
    position: absolute;
    display: block;
    content: "";
}

.threepm-radio__toggle-icon {
    inset: 6px;
    border: 0;
}

#threepm-radio:not(.is-minimized) .threepm-radio__toggle-icon::after {
    right: 0;
    bottom: 4px;
    left: 0;
    height: 2px;
    background: currentColor;
}

#threepm-radio.is-minimized .threepm-radio__toggle-icon::before {
    inset: 0;
    border: 2px solid currentColor;
}

#threepm-radio.is-minimized .threepm-radio__toggle-icon::after {
    top: 3px;
    right: 0;
    left: 0;
    height: 2px;
    background: currentColor;
}

.threepm-radio__body {
    padding: 9px;
    touch-action: auto;
}

.threepm-radio__display {
    overflow: hidden;
    padding: 8px 9px 7px;
    border: 2px solid var(--ink);
    border-radius: 4px;
    background:
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, .035) 0,
            rgba(255, 255, 255, .035) 1px,
            transparent 1px,
            transparent 3px
        ),
        linear-gradient(180deg, var(--lcd-blue), var(--lcd-dark));
    box-shadow:
        inset 1px 1px 0 rgba(212, 237, 255, .35),
        inset -1px -1px 0 rgba(0, 0, 0, .7);
    color: var(--lcd-light);
    font-family: "Courier New", monospace;
}

.threepm-radio__display-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.threepm-radio__current {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.08em;
}

.threepm-radio__status {
    color: #b9dcff;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.2;
    text-align: right;
}

.threepm-radio__equalizer {
    display: block;
    width: 100%;
    height: 38px;
    margin: 5px 0 4px;
    border-top: 1px solid rgba(212, 237, 255, .3);
    border-bottom: 1px solid rgba(212, 237, 255, .3);
}

.threepm-radio__track-window {
    overflow: hidden;
    width: 100%;
    padding-top: 4px;
}

.threepm-radio__track {
    display: inline-block;
    min-width: 100%;
    color: #e0f0ff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.threepm-radio__track.is-scrolling {
    padding-left: 100%;
    animation: threepm-radio-marquee 12s linear infinite;
}

@keyframes threepm-radio-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

.threepm-radio__progress-row {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 9px 1px 8px;
    color: #172130;
    font-family: "Courier New", monospace;
    font-size: 10px;
    font-weight: 700;
}

.threepm-radio__progress,
.threepm-radio__volume-range {
    height: 7px;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--ink);
    border-radius: 6px;
    outline: none;
    background: #7d8591;
    cursor: pointer;
}

.threepm-radio__progress {
    width: 100%;
}

.threepm-radio__volume-range {
    width: 58px;
    height: 6px;
}

.threepm-radio__progress::-webkit-slider-thumb,
.threepm-radio__volume-range::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--ink);
    border-radius: 50%;
    background: #edf0f4;
    box-shadow: inset 1px 1px 0 #fff;
}

.threepm-radio__progress::-webkit-slider-thumb {
    width: 13px;
    height: 13px;
}

.threepm-radio__volume-range::-webkit-slider-thumb {
    width: 11px;
    height: 11px;
}

.threepm-radio__progress::-moz-range-thumb,
.threepm-radio__volume-range::-moz-range-thumb {
    border: 1px solid var(--ink);
    border-radius: 50%;
    background: #edf0f4;
    box-shadow: inset 1px 1px 0 #fff;
}

.threepm-radio__progress::-moz-range-thumb {
    width: 13px;
    height: 13px;
}

.threepm-radio__volume-range::-moz-range-thumb {
    width: 11px;
    height: 11px;
}

.threepm-radio__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.threepm-radio__button {
    position: relative;
    width: 39px;
    height: 31px;
    padding: 0;
    border: 1px solid var(--ink);
    border-radius: 50%;
    background: radial-gradient(
        circle at 35% 28%,
        #fff,
        #cdd2d9 57%,
        #7c8591 100%
    );
    box-shadow:
        inset 1px 1px 0 rgba(255, 255, 255, .96),
        inset -1px -1px 0 rgba(50, 58, 70, .75),
        1px 2px 0 rgba(0, 0, 0, .35);
    color: #0f1724;
    cursor: pointer;
}

.threepm-radio__button:active,
.threepm-radio__toggle:active {
    transform: translateY(1px);
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, .5);
}

.threepm-radio__button--play {
    width: 50px;
    height: 38px;
    background: radial-gradient(
        circle at 35% 28%,
        #7ba6d5,
        #245789 57%,
        #0a1e3c 100%
    );
    color: #fff;
}

.threepm-radio__icon {
    position: absolute;
    inset: 0;
    display: block;
}

.threepm-radio__icon--play::before {
    position: absolute;
    top: 50%;
    left: 53%;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 9px solid currentColor;
    content: "";
    transform: translate(-50%, -50%);
}

#threepm-radio.is-playing .threepm-radio__icon--play::before {
    left: 44%;
    width: 4px;
    height: 12px;
    border: 0;
    background: currentColor;
    box-shadow: 7px 0 0 currentColor;
}

.threepm-radio__icon--prev::before,
.threepm-radio__icon--prev::after,
.threepm-radio__icon--next::before,
.threepm-radio__icon--next::after {
    position: absolute;
    top: 50%;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    content: "";
    transform: translateY(-50%);
}

.threepm-radio__icon--prev::before,
.threepm-radio__icon--prev::after {
    border-right: 7px solid currentColor;
}

.threepm-radio__icon--prev::before { left: 11px; }
.threepm-radio__icon--prev::after { left: 18px; }

.threepm-radio__icon--next::before,
.threepm-radio__icon--next::after {
    border-left: 7px solid currentColor;
}

.threepm-radio__icon--next::before { right: 11px; }
.threepm-radio__icon--next::after { right: 18px; }

.threepm-radio__shuffle-svg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: square;
    stroke-linejoin: miter;
    transform: translate(-50%, -50%);
}

#threepm-radio.is-shuffle .threepm-radio__button--shuffle {
    background: linear-gradient(180deg, var(--lcd-blue), var(--lcd-dark));
    color: var(--lcd-light);
}

.threepm-radio__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    color: #222a36;
    font-family: "Courier New", monospace;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .04em;
    white-space: nowrap;
}

.threepm-radio__led {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 4px;
    border: 1px solid #1d2938;
    border-radius: 50%;
    background: #394656;
    vertical-align: -1px;
}

#threepm-radio.is-playing .threepm-radio__led {
    background: #70a7de;
    box-shadow: 0 0 6px #70a7de;
}

.threepm-radio__volume {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.threepm-radio__listen-full {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 27px;
    margin-top: 9px;
    border: 1px solid var(--ink);
    border-radius: 2px;
    background: var(--ink);
    color: #fff;
    font-family: "Courier New", monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
    text-decoration: none;
}

.threepm-radio__listen-full:hover {
    background: #245789;
}

.threepm-radio__button:focus-visible,
.threepm-radio__toggle:focus-visible,
.threepm-radio__progress:focus-visible,
.threepm-radio__volume-range:focus-visible,
.threepm-radio__listen-full:focus-visible {
    outline: 2px solid #126eea;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .threepm-radio__track.is-scrolling {
        padding-left: 0;
        animation: none;
    }
}

@media screen and (max-width: 480px) {
    #threepm-radio {
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
        width: calc(100vw - 24px);
        max-width: 352px;
    }

    #threepm-radio.is-minimized {
        width: 205px;
    }

    .threepm-radio__header {
        height: 44px;
    }

    .threepm-radio__toggle {
        width: 40px;
        height: 38px;
    }

    .threepm-radio__button {
        width: 42px;
        height: 36px;
    }

    .threepm-radio__button--play {
        width: 52px;
        height: 43px;
    }

    .threepm-radio__volume-range {
        width: 52px;
    }
}
