/* ===== Receipt BGM Player Skin ===== */

.bgm-receipt {
    --paper: #f2f2f2;
    --paper-deep: #e5e5e5;
    --ink: #1d1d1d;
    --ink-dim: rgba(29, 29, 29, 0.6);
    --stamp: #333333;
    --edge: #d6d6d6;
    --shadow: rgba(0, 0, 0, 0.22);

    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Space Mono', 'IBM Plex Mono', 'Nanum Gothic Coding', 'Courier Prime', monospace;
    user-select: none;
    opacity: 0;
    transform: translateY(40px);
    transition: transform var(--transition-base, 0.35s ease), opacity var(--transition-base, 0.35s ease);
    color: var(--ink);
}

.bgm-receipt.show {
    opacity: 1;
    transform: translateY(0);
}

/* 최소화 */
.bgm-receipt.minimized {
    width: 50px;
    height: 50px;
    padding: 0;
    background: var(--card-bg-color);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bgm-receipt.minimized:hover { transform: scale(1.05); }
.bgm-receipt.minimized .player-content { display: none; }
.bgm-receipt.minimized .minimized-overlay { display: block; }
.bgm-receipt.minimized::before {
    content: '\f8d9';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1.2rem;
    color: var(--accent-color);
}
.minimized-overlay {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    display: none;
}

.receipt-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 210px;
}

.receipt-paper {
    position: relative;
    width: 210px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(0, 0, 0, 0.02)),
        repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.025) 0 1px, transparent 1px 3px),
        var(--paper);
    border: 1px solid var(--edge);
    border-radius: 14px;
    padding: 12px 12px 10px;
    box-shadow: 0 12px 30px var(--shadow);
}

.receipt-top {
    cursor: pointer;
    border-radius: 16px 16px 8px 8px;
}

.receipt-head {
    text-align: center;
}

.receipt-brand {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.2px;
}

.receipt-meta {
    font-size: 9px;
    color: var(--ink-dim);
    margin-top: 2px;
}

.receipt-meta.small {
    font-size: 8px;
    letter-spacing: 0.6px;
}

.receipt-divider {
    height: 1px;
    margin: 8px 0;
    background: repeating-linear-gradient(90deg, var(--ink-dim) 0 4px, transparent 4px 7px);
    opacity: 0.55;
}

.receipt-divider.dotted {
    background: repeating-linear-gradient(90deg, var(--ink-dim) 0 2px, transparent 2px 5px);
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    font-size: 9px;
    line-height: 1.4;
}

.receipt-row + .receipt-row {
    margin-top: 6px;
}

.receipt-row .label {
    color: var(--ink-dim);
    flex: 0 0 auto;
}

.receipt-row .value {
    text-align: right;
    flex: 1;
}

#track-info {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-weight: 600;
    color: var(--ink);
}

.receipt-status::after {
    content: "READY";
    color: var(--ink-dim);
}

.receipt-total {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.receipt-foot {
    margin-top: 6px;
    font-size: 8px;
    color: var(--ink-dim);
    text-align: center;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.receipt-panel {
    position: relative;
    width: 210px;
    background: linear-gradient(180deg, #f7f7f7, #eaeaea);
    border: 1px solid var(--edge);
    border-top: none;
    border-radius: 0 0 14px 14px;
    padding: 10px 12px 8px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.receipt-panel::before {
    content: "";
    position: absolute;
    top: 8px;
    right: 10px;
    width: 54px;
    height: 10px;
    background: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.5) 0 2px, transparent 2px 4px);
    opacity: 0.2;
    pointer-events: none;
}

.receipt-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 8px;
}

.receipt-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px dashed #c9c9c9;
    border-radius: 6px;
    color: var(--ink);
    font-size: 11px;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.receipt-btn:hover {
    background: #ffffff;
    border-color: #b5b5b5;
}

.receipt-btn.play {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--stamp);
    border: 1px solid #262626;
    color: #fff;
    font-size: 13px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

.receipt-btn.play:hover {
    transform: translateY(-1px);
}

.receipt-btn.active {
    background: rgba(0, 0, 0, 0.08);
    border-color: #9e9e9e;
    color: var(--stamp);
}

.receipt-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.receipt-btn.mini {
    width: 24px;
    height: 24px;
    font-size: 9px;
    border-radius: 6px;
}

.receipt-vol {
    width: 100%;
    height: 4px;
    margin-bottom: 8px;
    background: var(--paper-deep);
    border-radius: 999px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.receipt-vol::-webkit-slider-runnable-track {
    height: 4px;
    background: var(--paper-deep);
    border-radius: 999px;
}

.receipt-vol::-webkit-slider-thumb {
    width: 10px;
    height: 10px;
    margin-top: -3px;
    background: var(--stamp);
    border: none;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.25);
    -webkit-appearance: none;
    cursor: pointer;
}

.receipt-vol::-moz-range-track {
    height: 4px;
    background: var(--paper-deep);
    border-radius: 999px;
}

.receipt-vol::-moz-range-progress {
    height: 4px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 999px;
}

.receipt-vol::-moz-range-thumb {
    width: 10px;
    height: 10px;
    background: var(--stamp);
    border: none;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

.receipt-bottom-row {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.playlist-container {
    width: 210px;
    max-height: 180px;
    margin-top: 8px;
    overflow: auto;
}

.playlist-container.receipt-paper {
    padding: 8px 8px 10px;
}

.playlist {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 9px;
    color: var(--ink-dim);
}

.playlist li {
    padding: 6px 6px;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.playlist li:last-child {
    border-bottom: none;
}

.playlist li:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--ink);
}

.playlist li.current {
    background: rgba(0, 0, 0, 0.12);
    color: var(--stamp);
    font-weight: 700;
}

.bgm-receipt.playing .receipt-brand {
    color: var(--stamp);
}

.bgm-receipt.playing .receipt-status::after {
    content: "PLAYING";
    color: var(--stamp);
}

.bgm-receipt.playing .receipt-paper {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 12px 30px var(--shadow);
}

.volume-popup {
    display: none !important;
}

@media (max-width: 768px) {
    .bgm-receipt {
        right: 10px;
        bottom: 10px;
    }
}
