/* Windows 95 Media Player Styles */
#media-player-window {
    width: 500px;
    height: 400px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.media-player-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--w95-face);
}

/* Remove menu bar styles - no longer needed */

/* Control Panel */
.mp-controls {
    padding: 8px;
    border-top: 2px solid var(--w95-hilite);
    border-left: 2px solid var(--w95-hilite);
    border-right: 2px solid var(--w95-shadow);
    border-bottom: 2px solid var(--w95-shadow);
    margin: 4px;
}

.mp-transport {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
    justify-content: center;
}

.mp-btn {
    width: 32px;
    height: 28px;
    background: var(--w95-face);
    border: 2px solid;
    border-color: var(--w95-hilite) var(--w95-shadow) var(--w95-shadow) var(--w95-hilite);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Webdings', 'Segoe UI Symbol', monospace;
    font-size: 14px;
}

.mp-btn:active:not(:disabled) {
    border-color: var(--w95-shadow) var(--w95-hilite) var(--w95-hilite) var(--w95-shadow);
    padding-left: 1px;
    padding-top: 1px;
}

.mp-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.mp-btn.active {
    background: var(--w95-hover);
    border-color: var(--w95-shadow) var(--w95-hilite) var(--w95-hilite) var(--w95-shadow);
}

/* Play button symbol: ▶ */
#mp-play::before { content: '▶'; }
/* Pause button symbol: ⏸ */
#mp-pause::before { content: '⏸'; }
/* Stop button symbol: ■ */
#mp-stop::before { content: '■'; }
/* Previous button symbol: ⏮ */
#mp-prev::before { content: '⏮'; }
/* Next button symbol: ⏭ */
#mp-next::before { content: '⏭'; }

/* Progress Section */
.mp-progress-section {
    margin: 8px 0;
}

.mp-track-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

#mp-track-title {
    flex: 1;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 2px 4px;
    background: #000;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    border: 1px solid var(--w95-shadow);
}

.mp-time-display {
    display: flex;
    gap: 4px;
    font-size: 11px;
    font-family: 'Courier New', monospace;
}

.mp-seek-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

#mp-seek {
    flex: 1;
    height: 16px;
}

/* Volume Control */
.mp-volume-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.mp-volume-label {
    font-size: 11px;
    min-width: 50px;
}

#mp-volume {
    flex: 1;
    height: 16px;
}

/* Options */
.mp-options {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    justify-content: center;
}

.mp-option-btn {
    padding: 2px 8px;
    font-size: 11px;
    background: var(--w95-face);
    border: 2px solid;
    border-color: var(--w95-hilite) var(--w95-shadow) var(--w95-shadow) var(--w95-hilite);
    cursor: pointer;
}

.mp-option-btn:active,
.mp-option-btn.active {
    border-color: var(--w95-shadow) var(--w95-hilite) var(--w95-hilite) var(--w95-shadow);
    background: var(--w95-hover);
}

/* Visualization */
.mp-visualization-container {
    margin: 4px;
    background: #000;
    border: 2px solid;
    border-color: var(--w95-shadow) var(--w95-hilite) var(--w95-hilite) var(--w95-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    height: 120px;
}

#mp-visualization {
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 20px;
    letter-spacing: 2px;
}

/* Playlist */
.mp-playlist-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin: 4px;
    min-height: 150px;
}

.mp-playlist-header {
    font-size: 11px;
    padding: 2px 4px;
    margin-bottom: 2px;
    background: var(--w95-face);
}

.mp-playlist-container {
    flex: 1;
    border: 2px solid;
    border-color: var(--w95-shadow) var(--w95-hilite) var(--w95-hilite) var(--w95-shadow);
    background: white;
    overflow-y: auto;
    min-height: 120px;
}

#mp-playlist {
    padding: 2px;
}

.mp-playlist-item {
    display: flex;
    align-items: center;
    padding: 2px 4px;
    font-size: 11px;
    cursor: pointer;
    user-select: none;
    position: relative; /* Anchor ::before play icon */
}

.mp-playlist-item:hover {
    background: #e0e0e0;
}

.mp-playlist-item.selected {
    background: var(--w95-blue);
    color: white;
}

.mp-playlist-item.playing {
    font-weight: bold;
}

.mp-playlist-item.playing::before {
    content: "▶ ";
    margin-left: -16px;
    position: absolute;
    left: 4px;
    pointer-events: none; /* Do not block item clicks */
}

.mp-track-number {
    min-width: 24px;
    margin-right: 8px;
    text-align: right;
}

.mp-track-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mp-track-name {
    font-weight: bold;
}

.mp-track-artist {
    font-size: 10px;
    opacity: 0.8;
}

.mp-track-duration {
    min-width: 40px;
    text-align: right;
}

/* Windows 95 Slider Styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    width: 100%;
}

/* Webkit/Chrome track */
input[type="range"]::-webkit-slider-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: #868686;
    border: 1px solid;
    border-color: var(--w95-shadow) var(--w95-hilite) var(--w95-hilite) var(--w95-shadow);
    box-shadow: inset 1px 1px 0 #000;
}

/* Firefox track */
input[type="range"]::-moz-range-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: #868686;
    border: 1px solid;
    border-color: var(--w95-shadow) var(--w95-hilite) var(--w95-hilite) var(--w95-shadow);
    box-shadow: inset 1px 1px 0 #000;
}

/* Webkit/Chrome thumb */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 11px;
    height: 21px;
    background: var(--w95-face);
    border: 2px solid;
    border-color: var(--w95-hilite) var(--w95-shadow) var(--w95-shadow) var(--w95-hilite);
    cursor: pointer;
    margin-top: -9px; /* Centers thumb on track */
}

/* Firefox thumb */
input[type="range"]::-moz-range-thumb {
    width: 11px;
    height: 21px;
    background: var(--w95-face);
    border: 2px solid;
    border-color: var(--w95-hilite) var(--w95-shadow) var(--w95-shadow) var(--w95-hilite);
    cursor: pointer;
    border-radius: 0;
}

input[type="range"]::-webkit-slider-thumb:active {
    border-color: var(--w95-shadow) var(--w95-hilite) var(--w95-hilite) var(--w95-shadow);
}

input[type="range"]::-moz-range-thumb:active {
    border-color: var(--w95-shadow) var(--w95-hilite) var(--w95-hilite) var(--w95-shadow);
}

/* Focus styles */
input[type="range"]:focus {
    outline: none;
}

input[type="range"]:focus::-webkit-slider-thumb {
    outline: 1px dotted #000;
    outline-offset: 1px;
}

input[type="range"]:focus::-moz-range-thumb {
    outline: 1px dotted #000;
    outline-offset: 1px;
}

/* Media Player Icon */
.desktop-icon .media-player-icon {
    display: block;
    margin: 0 auto 4px;
    width: 32px;
    height: 32px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><rect x="4" y="8" width="24" height="16" fill="%23c0c0c0" stroke="%23000" stroke-width="1"/><polygon points="14,12 14,20 20,16" fill="%23000080"/><rect x="6" y="10" width="4" height="2" fill="%23808080"/><rect x="22" y="10" width="4" height="2" fill="%23808080"/></svg>');
    image-rendering: pixelated;
}
