/* Winamp-Style Media Player */

@font-face {
    font-family: 'WinampFont';
    src: local('Arial');
}

#winamp-player,
.winamp-player-instance {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 275px;
    background: linear-gradient(180deg, #3a3a4a 0%, #2a2a3a 50%, #1a1a2a 100%);
    border: 2px solid #1a1a2a;
    border-top-color: #5a5a6a;
    border-left-color: #5a5a6a;
    box-shadow: 
        inset 1px 1px 0 #4a4a5a,
        inset -1px -1px 0 #0a0a1a,
        3px 3px 10px rgba(0,0,0,0.5);
    font-family: 'Segoe UI', Tahoma, sans-serif;
    font-size: 11px;
    z-index: 9999;
    user-select: none;
}

/* Title Bar */
.wa-titlebar {
    background: linear-gradient(180deg, #4a4a6a 0%, #2a2a4a 100%);
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 3px;
    cursor: grab;
    border-bottom: 1px solid #1a1a2a;
}

.wa-titlebar:active {
    cursor: grabbing;
}

.wa-title {
    color: #fff;
    font-size: 9px;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000;
    letter-spacing: 0.5px;
}

.wa-title-buttons {
    display: flex;
    gap: 1px;
}

.wa-title-btn {
    width: 9px;
    height: 9px;
    background: linear-gradient(180deg, #6a6a7a 0%, #3a3a4a 100%);
    border: 1px solid #2a2a3a;
    border-top-color: #7a7a8a;
    border-left-color: #7a7a8a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    color: #000;
    line-height: 1;
}

.wa-title-btn:hover {
    background: linear-gradient(180deg, #8a8a9a 0%, #5a5a6a 100%);
}

.wa-title-btn:active {
    border-color: #2a2a3a;
    border-bottom-color: #7a7a8a;
    border-right-color: #7a7a8a;
}

/* Display Section */
.wa-display {
    background: #000;
    margin: 3px;
    border: 2px solid #1a1a2a;
    border-bottom-color: #3a3a4a;
    border-right-color: #3a3a4a;
}

.wa-display-inner {
    background: linear-gradient(180deg, #000 0%, #001a00 100%);
    padding: 4px;
    min-height: 40px;
    cursor: grab;
}

.wa-display-inner:active {
    cursor: grabbing;
}

/* Visualizer */
.wa-visualizer {
    height: 20px;
    background: #000;
    display: flex;
    align-items: flex-end;
    gap: 1px;
    padding: 2px;
    margin-bottom: 2px;
}

.wa-viz-bar {
    flex: 1;
    background: linear-gradient(180deg, #0f0 0%, #0a0 50%, #080 100%);
    min-height: 2px;
    transition: height 0.1s;
}

/* Track Info */
.wa-track-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wa-track-scroll {
    flex: 1;
    overflow: hidden;
    margin-right: 5px;
}

.wa-track-name {
    color: #0f0;
    font-size: 8px;
    white-space: nowrap;
    animation: scroll-text 10s linear infinite;
    display: inline-block;
    padding-left: 100%;
}

@keyframes scroll-text {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.wa-track-name.no-scroll {
    animation: none;
    padding-left: 0;
}

.wa-time {
    color: #0f0;
    font-family: 'Consolas', monospace;
    font-size: 14px;
    text-shadow: 0 0 5px #0f0;
    letter-spacing: 1px;
}

.wa-kbps {
    color: #0f0;
    font-size: 7px;
    margin-top: 2px;
}

/* Mode indicators */
.wa-modes {
    display: flex;
    gap: 5px;
    margin-top: 3px;
}

.wa-mode {
    color: #555;
    font-size: 7px;
    text-transform: uppercase;
}

.wa-mode.active {
    color: #0f0;
    text-shadow: 0 0 3px #0f0;
}

.wa-mode.wa-clickable {
    cursor: pointer;
    padding: 1px 3px;
    border-radius: 2px;
}

.wa-mode.wa-clickable:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Tabs */
.wa-tabs {
    display: flex;
    margin: 2px 3px;
    gap: 2px;
}

.wa-tab {
    flex: 1;
    background: linear-gradient(180deg, #3a3a4a 0%, #2a2a3a 100%);
    border: 1px solid #1a1a2a;
    border-top-color: #5a5a6a;
    border-left-color: #5a5a6a;
    color: #888;
    font-size: 8px;
    padding: 2px 5px;
    cursor: pointer;
    text-align: center;
}

.wa-tab:hover {
    color: #aaa;
}

.wa-tab.active {
    background: linear-gradient(180deg, #2a2a3a 0%, #1a1a2a 100%);
    border-color: #5a5a6a;
    border-bottom-color: #1a1a2a;
    border-right-color: #1a1a2a;
    color: #0f0;
}

/* Controls */
.wa-controls {
    display: flex;
    justify-content: center;
    gap: 3px;
    padding: 3px;
}

.wa-btn {
    width: 23px;
    height: 18px;
    background: linear-gradient(180deg, #5a5a6a 0%, #3a3a4a 50%, #2a2a3a 100%);
    border: 1px solid #1a1a2a;
    border-top-color: #6a6a7a;
    border-left-color: #6a6a7a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.wa-btn:hover {
    background: linear-gradient(180deg, #6a6a7a 0%, #4a4a5a 50%, #3a3a4a 100%);
}

.wa-btn:active {
    background: linear-gradient(180deg, #2a2a3a 0%, #3a3a4a 50%, #4a4a5a 100%);
    border-color: #6a6a7a;
    border-top-color: #1a1a2a;
    border-left-color: #1a1a2a;
}

.wa-btn svg {
    width: 10px;
    height: 10px;
    fill: #ccc;
}

.wa-btn:hover svg {
    fill: #fff;
}

.wa-btn.active svg {
    fill: #0f0;
}

.wa-btn-play {
    width: 28px;
}

/* Seek Bar */
.wa-seek {
    margin: 2px 5px;
    height: 10px;
    background: #000;
    border: 1px solid #1a1a2a;
    border-bottom-color: #4a4a5a;
    border-right-color: #4a4a5a;
    position: relative;
    cursor: pointer;
}

.wa-seek-fill {
    height: 100%;
    background: linear-gradient(180deg, #7a7a5a 0%, #5a5a3a 100%);
    width: 0%;
    position: relative;
}

.wa-seek-handle {
    position: absolute;
    right: -3px;
    top: -2px;
    width: 6px;
    height: 14px;
    background: linear-gradient(180deg, #aaa 0%, #666 100%);
    border: 1px solid #333;
    border-top-color: #ccc;
    border-left-color: #ccc;
}

/* Volume */
.wa-volume-section {
    display: flex;
    align-items: center;
    padding: 2px 5px;
    gap: 5px;
}

.wa-volume-label {
    color: #888;
    font-size: 7px;
}

.wa-volume {
    flex: 1;
    height: 8px;
    background: #000;
    border: 1px solid #1a1a2a;
    border-bottom-color: #4a4a5a;
    border-right-color: #4a4a5a;
    cursor: pointer;
    position: relative;
}

.wa-volume-fill {
    height: 100%;
    background: linear-gradient(90deg, #0a0 0%, #0f0 50%, #ff0 100%);
    width: 100%;
}

/* Radio Section */
.wa-radio-content {
    display: none;
    max-height: 200px;
    overflow: hidden;
}

.wa-radio-content.active {
    display: block;
}

.wa-files-content {
    display: none;
}

.wa-files-content.active {
    display: block;
}

.wa-search {
    width: calc(100% - 10px);
    margin: 3px 5px;
    padding: 3px 5px;
    background: #000;
    border: 1px solid #1a1a2a;
    border-bottom-color: #4a4a5a;
    border-right-color: #4a4a5a;
    color: #0f0;
    font-size: 9px;
    outline: none;
}

.wa-search::placeholder {
    color: #050;
}

.wa-stations {
    max-height: 120px;
    overflow-y: auto;
    margin: 0 3px 3px;
    background: #000;
    border: 1px solid #1a1a2a;
}

.wa-stations::-webkit-scrollbar {
    width: 10px;
}

.wa-stations::-webkit-scrollbar-track {
    background: #1a1a2a;
}

.wa-stations::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #5a5a6a 0%, #3a3a4a 100%);
    border: 1px solid #2a2a3a;
}

.wa-station {
    padding: 3px 5px;
    color: #0a0;
    font-size: 9px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #111;
}

.wa-station:hover {
    background: #001a00;
    color: #0f0;
}

.wa-station.active {
    background: #002200;
    color: #0f0;
}

.wa-station-genre {
    color: #555;
    font-size: 8px;
}

.wa-station.active .wa-station-genre {
    color: #070;
}

/* Now Playing */
.wa-now-playing {
    background: #001500;
    padding: 3px 5px;
    margin: 3px;
    border: 1px solid #002200;
    display: none;
}

.wa-now-playing.active {
    display: block;
}

.wa-live {
    color: #f00;
    font-size: 7px;
    display: flex;
    align-items: center;
    gap: 3px;
    animation: blink 1s infinite;
}

@keyframes blink {
    50% { opacity: 0.5; }
}

.wa-live svg {
    width: 6px;
    height: 6px;
    fill: #f00;
}

.wa-playing-name {
    color: #0f0;
    font-size: 9px;
    margin-top: 2px;
}

/* Video Container */
.wa-video-container {
    display: none;
    background: #000;
    margin: 3px;
}

.wa-video-container.active {
    display: block;
}

.wa-video-container video {
    width: 100%;
    max-height: 200px;
}

/* Spinning logo */
.wa-spinning-logo {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 5px 0;
    flex: 1;
}

.wa-spinning-logo img {
    width: 25%;
    min-width: 50px;
    max-width: 300px;
    height: auto;
    opacity: 0.8;
}

.wa-site-name {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    margin-top: 5px;
    text-align: center;
    background: linear-gradient(
        180deg,
        #d4c4a0 0%,
        #c9a86c 20%,
        #a07830 40%,
        #806820 60%,
        #c9a86c 80%,
        #d4c4a0 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.6));
    animation: spin-reverse 2.4s linear infinite;
    text-decoration: none;
    cursor: pointer;
    font-family: 'Segoe UI', Arial, sans-serif;
    transform-style: preserve-3d;
    perspective: 500px;
}

.wa-site-name:hover {
    filter: drop-shadow(1px 1px 2px rgba(201,168,108,0.8));
}

@keyframes spin-reverse {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(360deg); }
}

/* Brand */
.wa-brand {
    position: absolute;
    bottom: 2px;
    right: 20px;
    color: #444;
    font-size: 7px;
    pointer-events: none;
}

/* Resize handle */
.wa-resize {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 15px;
    height: 15px;
    cursor: nwse-resize;
    background: linear-gradient(135deg, transparent 50%, #5a5a6a 50%, #3a3a4a 75%, #5a5a6a 75%);
}

.wa-resize:hover {
    background: linear-gradient(135deg, transparent 50%, #7a7a8a 50%, #5a5a6a 75%, #7a7a8a 75%);
}

/* Resize for video mode */
#winamp-player.video-mode {
    width: 400px;
}

/* Resizable constraints */
#winamp-player {
    min-width: 275px;
    max-width: 95vw;
    min-height: 150px;
    max-height: 95vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Make content areas flexible */
.wa-radio-content.active {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.wa-stations {
    flex: 1;
    min-height: 50px;
}

/* Playlist */
.wa-playlist {
    max-height: 120px;
    overflow-y: auto;
    margin: 3px;
    background: #000;
    border: 1px solid #1a1a2a;
}

.wa-playlist::-webkit-scrollbar {
    width: 10px;
}

.wa-playlist::-webkit-scrollbar-track {
    background: #1a1a2a;
}

.wa-playlist::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #5a5a6a 0%, #3a3a4a 100%);
    border: 1px solid #2a2a3a;
}

.wa-playlist-item {
    padding: 3px 5px;
    color: #0a0;
    font-size: 9px;
    cursor: pointer;
    display: flex;
    gap: 5px;
    border-bottom: 1px solid #111;
}

.wa-playlist-item:hover {
    background: #001a00;
    color: #0f0;
}

.wa-playlist-item.active {
    background: #002200;
    color: #0f0;
}

.wa-playlist-num {
    color: #555;
    min-width: 20px;
}

.wa-playlist-item.active .wa-playlist-num {
    color: #070;
}

.wa-playlist-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wa-playlist-empty {
    color: #555;
    font-size: 9px;
    padding: 10px;
    text-align: center;
}

.wa-playlist-resize {
    height: 6px;
    background: linear-gradient(180deg, #3a3a4a 0%, #2a2a3a 100%);
    margin: 0 3px;
    cursor: ns-resize;
    border-radius: 3px;
    position: relative;
}

.wa-playlist-resize::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 2px;
    background: #5a5a6a;
    border-radius: 1px;
}

.wa-playlist-resize:hover {
    background: linear-gradient(180deg, #4a4a5a 0%, #3a3a4a 100%);
}

.wa-playlist-resize:hover::after {
    background: #7a7a8a;
}

/* Hide h5ai preview navigation arrows */
#pv-prev-area,
#pv-next-area {
    display: none !important;
}
