/**
 * Streaming Audio Player (SAP) Styles
 * Winamp-inspired dark teal aesthetic
 */

/* Reset for player page - high specificity */
body.awcr-sap-page {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    background: linear-gradient(135deg, #0a0a14 0%, #1a1a2e 50%, #0a0a14 100%) !important;
    font-family: 'Share Tech Mono', monospace !important;
}

@media (max-width: 1024px) {
    body.awcr-sap-page {
        align-items: flex-start !important;
    }
}

body.awcr-sap-page .sap-container,
body.awcr-sap-page .sap-container * {
    font-family: 'Share Tech Mono', monospace;
    line-height: 1.4;
}

/* CSS Variables */
.sap-container {
    --sap-frame-dark: #1a1a2e;
    --sap-frame-mid: #252542;
    --sap-frame-light: #3a3a5c;
    --sap-frame-highlight: #4a4a6a;
    --sap-lcd-bg: #0a0a12;
    --sap-lcd-text: #00d4aa;
    --sap-lcd-text-dim: #007a62;
    --sap-lcd-orange: #ff9500;
    --sap-lcd-red: #ff3366;
    --sap-accent-cyan: #00ffcc;
    --sap-accent-gold: #ffd700;
    --sap-button-face: #2a2a4a;
    --sap-button-highlight: #4a4a7a;
    --sap-button-shadow: #151528;
    --sap-discography-bg: #0d0d1a;
    --sap-discography-highlight: #1a3a4a;
    --sap-discography-text: #88ccaa;
    --sap-discography-selected: #00ffcc;
}

.sap-container {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 2px;
    filter: drop-shadow(0 20px 40px rgba(0, 212, 170, 0.15));
    padding: 20px;
    user-select: none;
}

/* Left column: Main Player + EQ stacked */
.sap-main-player {
    grid-column: 1;
    grid-row: 1;
}

.sap-eq-section {
    grid-column: 1;
    grid-row: 2;
}

/* Right column: Discography spans both rows */
.sap-discography-section {
    grid-column: 2;
    grid-row: 1 / 3;
}

.sap-container * {
    box-sizing: border-box;
}

/* Main Player Window */
.sap-main-player {
    width: 400px;
    background: linear-gradient(180deg, var(--sap-frame-light) 0%, var(--sap-frame-dark) 100%);
    border: 2px solid var(--sap-frame-highlight);
    border-radius: 4px;
    padding: 3px;
}

.sap-main-inner {
    background: var(--sap-frame-mid);
    border: 1px solid var(--sap-button-shadow);
    padding: 8px;
    overflow: hidden;
}

/* Title Bar */
.sap-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 4px 8px;
    height: 24px;
    min-height: 24px;
    max-height: 24px;
    background: linear-gradient(90deg, var(--sap-lcd-bg) 0%, #0f1a20 100%);
    border: 1px inset var(--sap-frame-dark);
}

.sap-title-text {
    font-family: 'VT323', monospace;
    font-size: 14px;
    color: var(--sap-lcd-text);
    text-shadow: 0 0 8px var(--sap-lcd-text);
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 350px;
}

.sap-window-controls {
    display: flex;
    gap: 2px;
}

.sap-window-btn {
    width: 14px;
    height: 14px;
    background: var(--sap-button-face);
    border: 1px outset var(--sap-frame-highlight);
    font-size: 9px;
    color: var(--sap-lcd-text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sap-window-btn:hover {
    background: var(--sap-button-highlight);
    color: var(--sap-lcd-text);
}

/* LCD Display Area */
.sap-lcd-display {
    background: var(--sap-lcd-bg);
    border: 2px inset var(--sap-frame-dark);
    padding: 8px;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}

.sap-lcd-top {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.sap-lcd-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: hidden;
    min-width: 0;
    flex: 1;
    padding-left: 8px;
}

/* Album Artwork */
.sap-artwork-container {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    position: relative;
    border: 2px solid var(--sap-lcd-text-dim);
    box-shadow: 0 0 8px var(--sap-lcd-text-dim), inset 0 0 20px rgba(0, 0, 0, 0.5);
    background: var(--sap-lcd-bg);
    overflow: hidden;
}

.sap-artwork-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.sap-artwork-image.loaded {
    opacity: 1;
}

.sap-artwork-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sap-lcd-text-dim);
    transition: opacity 0.3s ease-in-out;
}

.sap-artwork-placeholder svg {
    width: 50%;
    height: 50%;
    opacity: 0.5;
}

.sap-artwork-image.loaded + .sap-artwork-placeholder {
    opacity: 0;
}

/* Artwork column wrapper (artwork + share buttons) */
.sap-artwork-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Share/Copy link buttons */
.sap-share-actions {
    display: flex;
    gap: 4px;
    width: 100px;
}

.sap-action-btn {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--sap-lcd-text-dim);
    color: var(--sap-lcd-text-dim);
    padding: 3px 8px;
    font-family: 'VT323', monospace;
    font-size: 11px;
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1;
    transition: border-color 0.2s, color 0.2s;
}

.sap-action-btn:hover {
    border-color: var(--sap-lcd-text);
    color: var(--sap-lcd-text);
}

.sap-copy-link-btn {
    flex: 0 0 28px;
    padding: 3px 6px;
}

.sap-copy-link-btn svg {
    display: block;
}

/* Toast notifications */
.sap-toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sap-toast {
    background: rgba(26, 26, 46, 0.98);
    border: 2px solid #555;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 13px;
    color: #fff;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    max-width: 300px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sap-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.sap-toast-success {
    border-color: var(--sap-lcd-text, #00d4aa);
    color: var(--sap-lcd-text, #00d4aa);
}

.sap-toast-error {
    border-color: #ff4444;
    color: #ff4444;
}

.sap-toast .toast-dismiss {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    opacity: 0.5;
    cursor: pointer;
    font-size: 16px;
    padding: 0 0 0 12px;
    line-height: 1;
}

.sap-toast .toast-dismiss:hover {
    opacity: 1;
}

.sap-time-display {
    font-family: 'VT323', monospace;
    font-size: 42px;
    color: var(--sap-lcd-text);
    text-shadow: 0 0 12px var(--sap-lcd-text), 0 0 24px rgba(0, 212, 170, 0.5);
    letter-spacing: 4px;
    line-height: 1;
    padding: 4px 0;
}

.sap-track-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
    min-width: 0;
}

.sap-track-title-wrapper {
    overflow: hidden;
    width: 100%;
}

.sap-track-title {
    font-family: 'VT323', monospace;
    font-size: 16px;
    color: var(--sap-lcd-orange);
    text-shadow: 0 0 8px var(--sap-lcd-orange);
    white-space: nowrap;
    display: inline-block;
}

.sap-track-title.scrolling {
    animation: sap-scroll-text 12.5s ease-in-out infinite;
}

@keyframes sap-scroll-text {
    0%, 10% { transform: translateX(0); }
    45%, 55% { transform: translateX(var(--scroll-distance, -50%)); }
    90%, 100% { transform: translateX(0); }
}

.sap-track-meta {
    font-size: 11px;
    color: var(--sap-lcd-text-dim);
    display: flex;
    gap: 12px;
}

.sap-bitrate {
    color: var(--sap-lcd-text);
}

/* Visualizer */
.sap-visualizer {
    display: flex;
    gap: 2px;
    align-items: flex-end;
    height: 50px;
    padding: 4px;
    background: rgba(0,0,0,0.3);
    border: 1px inset var(--sap-frame-dark);
    border-right: none;
    overflow: hidden;
    flex-shrink: 0;
}

.sap-viz-bar {
    flex: 1;
    min-width: 4px;
    max-width: 8px;
    background: linear-gradient(to top, var(--sap-lcd-text) 0%, var(--sap-lcd-orange) 70%, var(--sap-lcd-red) 100%);
    box-shadow: 0 0 4px var(--sap-lcd-text);
    transition: height 0.05s ease-out;
}

/* Balance Display */
.sap-balance-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 4px;
    border-top: 1px solid var(--sap-frame-dark);
}

.sap-balance-label {
    font-size: 10px;
    color: var(--sap-lcd-text-dim);
    text-align: center;
}

.sap-balance-meter {
    display: flex;
    justify-content: center;
    gap: 1px;
    cursor: ew-resize;
    user-select: none;
}

.sap-balance-segment {
    width: 8px;
    height: 6px;
    background: var(--sap-lcd-text-dim);
    opacity: 0.3;
}

.sap-balance-segment.active {
    background: var(--sap-lcd-text);
    opacity: 1;
    box-shadow: 0 0 4px var(--sap-lcd-text);
}

.sap-balance-segment.center {
    background: var(--sap-lcd-orange);
    box-shadow: 0 0 4px var(--sap-lcd-orange);
}

/* Cost Display */
.sap-cost-display {
    background: rgba(0, 0, 0, 0.3);
    border: 1px inset var(--sap-frame-dark);
    padding: 4px 8px;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sap-cost-label {
    font-size: 9px;
    color: var(--sap-lcd-text-dim);
}

.sap-cost-value {
    font-family: 'VT323', monospace;
    font-size: 18px;
    color: var(--sap-accent-gold);
    text-shadow: 0 0 8px var(--sap-accent-gold);
}

/* Seek Bar */
.sap-seek-section {
    margin-bottom: 8px;
}

.sap-seek-bar {
    height: 12px;
    background: var(--sap-lcd-bg);
    border: 1px inset var(--sap-frame-dark);
    position: relative;
    cursor: pointer;
}

.sap-seek-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--sap-lcd-text-dim) 0%, var(--sap-lcd-text) 100%);
    box-shadow: 0 0 8px var(--sap-lcd-text);
    pointer-events: none;
}

.sap-seek-handle {
    position: absolute;
    top: 50%;
    left: 0;
    width: 6px;
    height: 16px;
    background: var(--sap-accent-cyan);
    box-shadow: 0 0 6px var(--sap-accent-cyan);
    transform: translateY(-50%);
    pointer-events: none;
    will-change: transform;
}

.sap-seek-bar:hover .sap-seek-handle {
    background: #fff;
    box-shadow: 0 0 10px #fff;
}

/* Controls */
.sap-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
}

.sap-transport-controls {
    display: flex;
    gap: 4px;
}

.sap-transport-btn {
    width: 30px;
    height: 24px;
    background: linear-gradient(180deg, var(--sap-button-highlight) 0%, var(--sap-button-face) 50%, var(--sap-button-shadow) 100%);
    border: 1px outset var(--sap-frame-highlight);
    border-radius: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sap-lcd-text);
    transition: all 0.1s;
    padding: 0;
}

.sap-transport-btn:hover {
    background: linear-gradient(180deg, var(--sap-button-highlight) 0%, var(--sap-frame-light) 50%, var(--sap-button-face) 100%);
    color: var(--sap-accent-cyan);
}

.sap-transport-btn:active {
    border-style: inset;
    background: var(--sap-button-shadow);
}

.sap-transport-btn.sap-play-btn {
    width: 36px;
    background: linear-gradient(180deg, #2a5a4a 0%, #1a3a2a 50%, #0a2a1a 100%);
    color: var(--sap-accent-cyan);
}

.sap-transport-btn.sap-play-btn:hover {
    background: linear-gradient(180deg, #3a7a5a 0%, #2a5a4a 50%, #1a3a2a 100%);
}

.sap-transport-btn.sap-play-btn.playing {
    background: linear-gradient(180deg, #5a2a2a 0%, #3a1a1a 50%, #2a0a0a 100%);
    color: var(--sap-lcd-red);
}

/* Transport Icon Container */
.sap-transport-btn span {
    display: block;
    position: relative;
}

/* Play triangle - CSS border trick */
.icon-play {
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 11px solid currentColor;
    margin-left: 2px;
}

/* Pause bars - when playing */
.sap-play-btn.playing .icon-play {
    width: 12px;
    height: 14px;
    border: none;
    margin-left: 0;
    background: linear-gradient(to right, 
        currentColor 0%, currentColor 30%, 
        transparent 30%, transparent 70%, 
        currentColor 70%, currentColor 100%);
}

/* Stop square */
.icon-stop {
    width: 11px;
    height: 11px;
    background: currentColor;
}

/* Rewind - double left arrows */
.icon-rew {
    width: 16px;
    height: 14px;
    position: relative;
}
.icon-rew::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-right: 8px solid currentColor;
}
.icon-rew::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-right: 8px solid currentColor;
}

/* Fast forward - double right arrows */
.icon-ff {
    width: 16px;
    height: 14px;
    position: relative;
}
.icon-ff::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 8px solid currentColor;
}
.icon-ff::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 8px solid currentColor;
}

/* Previous - bar + left arrow */
.icon-prev {
    width: 14px;
    height: 14px;
    position: relative;
}
.icon-prev::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 14px;
    background: currentColor;
}
.icon-prev::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 0;
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-right: 10px solid currentColor;
}

/* Next - right arrow + bar */
.icon-next {
    width: 14px;
    height: 14px;
    position: relative;
}
.icon-next::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 10px solid currentColor;
}
.icon-next::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 3px;
    height: 14px;
    background: currentColor;
}
/* Volume Slider */
.sap-slider-section {
    display: flex;
    flex: 1;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

.sap-slider-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.sap-slider-label {
    font-size: 9px;
    color: var(--sap-lcd-text-dim);
}

.sap-slider-track {
    width: 80px;
    height: 10px;
    background: var(--sap-lcd-bg);
    border: 1px inset var(--sap-frame-dark);
    position: relative;
    cursor: pointer;
}

.sap-volume-group .sap-slider-track {
    width: 80px;
}

.sap-slider-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--sap-lcd-text-dim), var(--sap-lcd-text));
    pointer-events: none;
}


/* Toggle Buttons */
.sap-toggle-btn {
    width: 28px;
    height: 22px;
    background: linear-gradient(180deg, var(--sap-button-highlight) 0%, var(--sap-button-face) 50%, var(--sap-button-shadow) 100%);
    border: 1px outset var(--sap-frame-highlight);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: var(--sap-lcd-text-dim);
}

.sap-toggle-btn:hover {
    color: var(--sap-lcd-text);
}

.sap-toggle-btn.active {
    background: var(--sap-button-shadow);
    border-style: inset;
    color: var(--sap-accent-cyan);
    text-shadow: 0 0 6px var(--sap-accent-cyan);
}

/* EQ Section */
.sap-eq-section {
    background: linear-gradient(180deg, var(--sap-frame-light) 0%, var(--sap-frame-dark) 100%);
    border: 2px solid var(--sap-frame-highlight);
    border-radius: 4px;
    padding: 3px;
    width: 400px;
}

.sap-eq-inner {
    background: var(--sap-frame-mid);
    border: 1px solid var(--sap-button-shadow);
    padding: 8px;
}

.sap-eq-title {
    font-size: 10px;
    color: var(--sap-lcd-text);
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sap-eq-controls {
    display: flex;
    gap: 4px;
}

.sap-eq-toggle {
    font-size: 9px;
    padding: 2px 6px;
    background: var(--sap-button-face);
    border: 1px outset var(--sap-frame-highlight);
    color: var(--sap-lcd-text-dim);
    cursor: pointer;
}

.sap-eq-toggle:hover {
    color: var(--sap-lcd-text);
}

.sap-eq-toggle.active {
    background: var(--sap-lcd-text-dim);
    border-style: inset;
    color: var(--sap-lcd-bg);
}

.sap-eq-sliders {
    display: flex;
    gap: 6px;
    justify-content: center;
    background: var(--sap-lcd-bg);
    border: 1px inset var(--sap-frame-dark);
    padding: 8px 4px;
}

.sap-eq-band {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.sap-eq-slider-track {
    width: 16px;
    height: 60px;
    background: linear-gradient(to top, var(--sap-lcd-text-dim) 0%, var(--sap-lcd-text) 40%, var(--sap-lcd-orange) 70%, var(--sap-lcd-red) 100%);
    position: relative;
    border: 1px inset var(--sap-frame-dark);
    cursor: pointer;
}

.sap-eq-slider-handle {
    position: absolute;
    left: -3px;
    right: -3px;
    height: 8px;
    background: var(--sap-frame-highlight);
    border: 1px outset var(--sap-frame-light);
    top: 50%;
    transform: translateY(-50%);
    cursor: grab;
}

.sap-eq-slider-handle:active {
    cursor: grabbing;
}

.sap-eq-freq {
    font-size: 8px;
    color: var(--sap-lcd-text-dim);
}

.sap-eq-db {
    font-size: 8px;
    color: var(--sap-lcd-orange);
    min-width: 28px;
    text-align: center;
}

/* Discography Section */
.sap-discography-section {
    background: linear-gradient(180deg, var(--sap-frame-light) 0%, var(--sap-frame-dark) 100%);
    border: 2px solid var(--sap-frame-highlight);
    border-radius: 4px;
    padding: 3px;
    width: 400px;
    min-width: 320px;
    max-height: 480px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sap-discography-inner {
    background: var(--sap-frame-mid);
    border: 1px solid var(--sap-button-shadow);
    padding: 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sap-discography-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.sap-discography-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sap-discography-title {
    font-size: 11px;
    color: var(--sap-lcd-text);
    text-shadow: 0 0 6px var(--sap-lcd-text);
}

.sap-discography-stats {
    font-size: 10px;
    color: var(--sap-lcd-text-dim);
}

.sap-discography-controls {
    display: flex;
    gap: 4px;
}

.sap-discography-btn {
    font-size: 9px;
    padding: 2px 8px;
    background: var(--sap-button-face);
    border: 1px outset var(--sap-frame-highlight);
    color: var(--sap-lcd-text-dim);
    cursor: pointer;
}

.sap-discography-btn:hover {
    color: var(--sap-lcd-text);
    background: var(--sap-button-highlight);
}

.sap-discography-container {
    background: var(--sap-discography-bg);
    border: 2px inset var(--sap-frame-dark);
    flex: 1;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
}

.sap-discography-container::-webkit-scrollbar {
    width: 14px;
}

.sap-discography-container::-webkit-scrollbar-track {
    background: var(--sap-lcd-bg);
    border-left: 1px solid var(--sap-frame-dark);
}

.sap-discography-container::-webkit-scrollbar-thumb {
    background: var(--sap-button-face);
    border: 1px outset var(--sap-frame-highlight);
}

.sap-loading {
    padding: 20px;
    text-align: center;
    color: var(--sap-lcd-text-dim);
}

.sap-album-group {
    margin-bottom: 2px;
}

.sap-album-header {
    background: linear-gradient(90deg, var(--sap-frame-dark) 0%, transparent 100%);
    padding: 4px 8px;
    font-size: 11px;
    color: var(--sap-lcd-orange);
    text-shadow: 0 0 6px var(--sap-lcd-orange);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid var(--sap-lcd-orange);
}

.sap-album-header:hover {
    background: linear-gradient(90deg, var(--sap-frame-mid) 0%, transparent 100%);
}

.sap-album-header .sap-album-toggle {
    transition: transform 0.2s;
    display: inline-block;
}

.sap-album-header.collapsed .sap-album-toggle {
    transform: rotate(-90deg);
}

.sap-album-year {
    font-size: 9px;
    color: var(--sap-lcd-text-dim);
    margin-left: 6px;
}
.sap-album-buy-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sap-track-year {
    font-size: 9px;
    color: var(--sap-lcd-text);
    opacity: 0.65;
    margin-left: 6px;
}

.sap-album-tracks {
    overflow: hidden;
    max-height: 2000px;
    transition: max-height 0.3s ease-out;
}

.sap-album-tracks.collapsed {
    max-height: 0 !important;
}

.sap-track-item {
    display: grid;
    grid-template-columns: 24px 1fr 40px auto;
    gap: 8px;
    padding: 4px 8px 4px 20px;
    font-size: 11px;
    color: var(--sap-discography-text);
    cursor: pointer;
    align-items: center;
}

.sap-track-item:hover {
    background: var(--sap-discography-highlight);
    color: var(--sap-discography-selected);
}

.sap-track-item.playing {
    background: linear-gradient(90deg, rgba(0, 255, 204, 0.15) 0%, transparent 100%);
    color: var(--sap-discography-selected);
    border-left: 2px solid var(--sap-accent-cyan);
    cursor: default;
}

.sap-track-item.playing .sap-buy-btn,
.sap-track-item.playing .sap-lyrics-btn {
    cursor: pointer;
}

.sap-track-item.album-only {
    cursor: default;
}

.sap-track-item.album-only .sap-buy-btn,
.sap-track-item.album-only .sap-lyrics-btn {
    cursor: pointer;
}

.sap-track-item.playing .sap-track-number {
    color: var(--sap-accent-cyan);
}

.sap-track-number {
    color: var(--sap-lcd-text-dim);
    text-align: right;
}

.sap-track-item.single-track .sap-track-number {
    text-align: center;
}

.sap-track-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sap-track-duration {
    color: var(--sap-lcd-text-dim);
    text-align: right;
}

.sap-track-buy {
    display: flex;
    gap: 4px;
}

.sap-buy-btn {
    font-size: 8px;
    padding: 2px 4px;
    background: var(--sap-button-face);
    border: 1px outset var(--sap-frame-highlight);
    color: var(--sap-accent-gold);
    cursor: pointer;
    white-space: nowrap;
}

.sap-buy-btn:hover {
    background: var(--sap-accent-gold);
    color: var(--sap-lcd-bg);
}

.sap-buy-btn.sap-album-buy {
    color: var(--sap-lcd-orange);
}

.sap-buy-btn.sap-album-buy:hover {
    background: var(--sap-lcd-orange);
    color: var(--sap-lcd-bg);
}

.sap-buy-btn.in-cart {
    background: var(--sap-frame-dark);
    border-color: var(--sap-lcd-text);
    color: var(--sap-lcd-text);
    cursor: default;
    opacity: 0.8;
}

.sap-buy-btn.in-cart:hover {
    background: var(--sap-frame-dark);
    color: var(--sap-lcd-text);
}

.sap-album-only {
    font-size: 8px;
    padding: 2px 6px;
    background: var(--sap-frame-dark);
    border: 1px solid var(--sap-lcd-text-dim);
    color: var(--sap-lcd-text-dim);
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Coming Soon styling */
.sap-track-item.coming-soon {
    cursor: default;
    opacity: 0.6;
}

.sap-track-item.coming-soon .sap-track-name {
    font-style: italic;
}

.sap-coming-soon {
    font-size: 8px;
    padding: 2px 6px;
    background: linear-gradient(135deg, #4a3a6a, #2a2a4a);
    border: 1px solid #7a5a9a;
    color: #c9a9e9;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sap-album-coming-soon {
    font-size: 9px;
    padding: 2px 8px;
    margin-left: 8px;
    background: linear-gradient(135deg, #4a3a6a, #2a2a4a);
    border: 1px solid #7a5a9a;
    color: #c9a9e9;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

.sap-dollar-icon {
    width: 10px;
    height: 10px;
    margin-right: 2px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

.sap-merch-btn {
    font-size: 10px;
    padding: 4px 12px;
    background: linear-gradient(180deg, #5a3a7a 0%, #3a2a5a 100%);
    border: 1px outset #7a5a9a;
    color: #ffaaff;
    cursor: pointer;
    text-shadow: 0 0 6px #ffaaff;
}

.sap-merch-btn:hover {
    background: linear-gradient(180deg, #7a5a9a 0%, #5a3a7a 100%);
}

/* Credits Display */
.sap-credits-bar {
    background: var(--sap-lcd-bg);
    border: 1px inset var(--sap-frame-dark);
    padding: 6px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.sap-credits-info {
    display: flex;
    gap: 20px;
    font-size: 10px;
}

.sap-credits-info > span {
    display: flex;
    flex-direction: column;
}

.sap-credits-label {
    color: var(--sap-lcd-text-dim);
}

.sap-credits-value {
    color: var(--sap-accent-gold);
    text-shadow: 0 0 6px var(--sap-accent-gold);
}

.sap-guest-notice {
    color: var(--sap-lcd-text-dim);
}

.sap-guest-notice a {
    color: var(--sap-accent-cyan);
    text-decoration: none;
}

.sap-guest-notice a:hover {
    text-decoration: underline;
}

.sap-add-credits-btn {
    font-size: 10px;
    padding: 4px 12px;
    background: linear-gradient(180deg, #4a7a3a 0%, #2a5a2a 100%);
    border: 1px outset #5a9a4a;
    color: var(--sap-accent-cyan);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.sap-add-credits-btn:hover {
    background: linear-gradient(180deg, #5a9a4a 0%, #4a7a3a 100%);
}

/* Playing indicator - pulsing play icon */
.sap-track-number .sap-playing-indicator {
    display: block;
    width: 0;
    height: 0;
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
    border-left: 5px solid var(--sap-accent-cyan);
    margin-left: auto;
    animation: sap-playing-pulse 2.5s ease-in-out infinite;
}

@keyframes sap-playing-pulse {
    0%, 100% { 
        opacity: 1;
        filter: drop-shadow(0 0 2px var(--sap-accent-cyan));
    }
    50% { 
        opacity: 0.4;
        filter: drop-shadow(0 0 4px var(--sap-accent-cyan));
    }
}

/* Modal */
.sap-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.sap-modal-content {
    background: var(--sap-frame-mid);
    border: 2px solid var(--sap-frame-highlight);
    border-radius: 4px;
    padding: 20px;
    max-width: 400px;
    text-align: center;
}

.sap-modal-content h3 {
    color: var(--sap-lcd-orange);
    margin-bottom: 10px;
    font-family: 'VT323', monospace;
    font-size: 24px;
}

.sap-modal-content p {
    color: var(--sap-discography-text);
    margin-bottom: 10px;
    font-size: 12px;
}

.sap-modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.sap-modal-btn {
    padding: 8px 16px;
    font-size: 11px;
    cursor: pointer;
    border: 1px outset var(--sap-frame-highlight);
    font-family: inherit;
}

.sap-modal-continue {
    background: linear-gradient(180deg, #4a7a3a 0%, #2a5a2a 100%);
    color: var(--sap-accent-cyan);
}

.sap-modal-stop {
    background: var(--sap-button-face);
    color: var(--sap-lcd-text-dim);
}

.sap-modal-buy {
    background: linear-gradient(180deg, #7a5a2a 0%, #5a3a1a 100%);
    color: var(--sap-accent-gold);
}

/* Lyrics Button - matches buy button style */
.sap-lyrics-btn {
    font-size: 8px;
    padding: 2px 4px;
    background: var(--sap-button-face);
    border: 1px outset var(--sap-frame-highlight);
    color: var(--sap-accent);
    cursor: pointer;
    white-space: nowrap;
}

.sap-lyrics-btn:hover {
    background: var(--sap-accent-cyan);
    color: var(--sap-lcd-bg);
}

/* Lyrics Modal */
.sap-lyrics-modal {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 20, 25, 0.95);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.sap-lyrics-content {
    width: 100%;
    max-width: 500px;
    max-height: 90%;
    background: linear-gradient(180deg, var(--sap-dark) 0%, #061a1d 100%);
    border: 2px solid var(--sap-accent);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.sap-lyrics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0, 212, 170, 0.3);
    flex-shrink: 0;
}

.sap-lyrics-header h3 {
    color: var(--sap-accent);
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sap-lyrics-close {
    background: none;
    border: none;
    color: var(--sap-accent);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.sap-lyrics-close:hover {
    opacity: 1;
}

body.awcr-sap-page .sap-container .sap-lyrics-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    color: var(--sap-discography-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-wrap;
}

.sap-lyrics-body::-webkit-scrollbar {
    width: 6px;
}

.sap-lyrics-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.sap-lyrics-body::-webkit-scrollbar-thumb {
    background: var(--sap-accent);
    border-radius: 3px;
}

.sap-lyrics-loading {
    color: var(--sap-accent);
    text-align: center;
    padding: 40px;
}

.sap-lyrics-empty {
    color: var(--sap-text-dim);
    font-style: italic;
}

/* Message Modal */
.sap-message-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 10, 15, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sap-message-content {
    background: linear-gradient(180deg, var(--sap-frame-light) 0%, var(--sap-frame-dark) 100%);
    border: 2px solid var(--sap-lcd-text);
    border-radius: 8px;
    padding: 24px 32px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 212, 170, 0.3);
}

.sap-message-text {
    color: var(--sap-lcd-text);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.sap-message-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.sap-message-btn {
    padding: 8px 20px;
    border: 1px outset var(--sap-frame-highlight);
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    text-transform: uppercase;
    transition: all 0.15s;
}

.sap-message-btn-primary {
    background: linear-gradient(180deg, #2a5a4a 0%, #1a3a2a 100%);
    color: var(--sap-accent-cyan);
}

.sap-message-btn-primary:hover {
    background: linear-gradient(180deg, #3a7a5a 0%, #2a5a4a 100%);
}

.sap-message-btn-secondary {
    background: var(--sap-button-face);
    color: var(--sap-lcd-text-dim);
}

.sap-message-btn-secondary:hover {
    background: var(--sap-button-highlight);
    color: var(--sap-lcd-text);
}

/* Preview Mode Badge */
.sap-preview-badge {
    font-family: 'VT323', monospace;
    font-size: 11px;
    color: var(--sap-lcd-orange);
    text-shadow: 0 0 6px var(--sap-lcd-orange);
    background: rgba(255, 149, 0, 0.15);
    border: 1px solid var(--sap-lcd-orange);
    padding: 1px 6px;
    letter-spacing: 1px;
    animation: sap-preview-pulse 2s ease-in-out infinite;
}

@keyframes sap-preview-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Preview Mode Modal */
.sap-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.sap-preview-modal-content {
    background: var(--sap-frame-mid, #252542);
    border: 2px solid var(--sap-frame-highlight, #4a4a6a);
    border-radius: 4px;
    padding: 20px;
    max-width: 400px;
    text-align: center;
}

.sap-preview-modal-body h3 {
    color: var(--sap-lcd-orange, #ff9500);
    margin-bottom: 10px;
    font-family: 'VT323', monospace;
    font-size: 24px;
}

.sap-preview-modal-body p {
    color: var(--sap-discography-text, #88ccaa);
    margin-bottom: 10px;
    font-size: 12px;
}

/* Responsive - stack to single column */
@media (max-width: 860px) {
    .sap-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .sap-main-player {
        grid-column: 1;
        grid-row: 1;
        width: 100%;
        max-width: 500px;
    }

    .sap-eq-section {
        display: none;
    }

    .sap-discography-section {
        grid-column: 1;
        grid-row: 2;
        width: 100%;
        max-width: 500px;
    }

    .sap-discography-container {
        min-height: 280px;
        flex: none;
    }
}

@media (max-width: 540px) {
    .sap-main-player,
    .sap-discography-section {
        max-width: 100%;
        min-width: 300px;
    }

    .sap-credits-info {
        flex-direction: column;
        gap: 4px;
    }

    .sap-track-item {
        grid-template-columns: 20px 1fr 30px auto;
    }

    /* Compact buttons on mobile */
    .sap-track-buy {
        gap: 2px;
    }

    .sap-track-buy .sap-buy-btn,
    .sap-track-buy .sap-lyrics-btn {
        font-size: 7px;
        padding: 2px 3px;
    }

    /* Adjust lyrics modal for mobile */
    .sap-lyrics-content {
        max-width: 95%;
        max-height: 85%;
    }

    .sap-lyrics-body {
        font-size: 14px;
        padding: 15px;
    }

    .sap-preview-disclaimer {
        font-size: 10px;
        padding: 8px 12px;
    }
}

/* Preview Disclaimer */
.sap-preview-disclaimer {
    border-bottom: 1px solid var(--sap-lcd-orange);
    color: var(--sap-discography-text);
    font-size: 11px;
    padding: 6px 10px 8px;
    margin-bottom: 6px;
    text-align: center;
    line-height: 1.4;
    flex-shrink: 0;
}

.sap-preview-disclaimer strong {
    color: var(--sap-lcd-orange);
}

.sap-disclaimer-icon {
    color: var(--sap-lcd-orange);
    margin-right: 3px;
}