* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: #000000;
    background-attachment: fixed;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Y2K Winamp-Style Music Player */
#music-player {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    background: transparent;
    padding: 3px;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

#music-player > * {
    pointer-events: auto;
}

.winamp-player {
    display: flex;
    flex-direction: row;
    gap: 2px;
    max-width: 1000px;
    width: 100%;
    align-items: flex-start;
    justify-content: center;
}

.player-window {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px) saturate(150%);
    -webkit-backdrop-filter: blur(15px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    overflow: hidden;
    flex: 0 0 auto;
    min-width: 320px;
    align-self: stretch;
}

.playlist-window {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px) saturate(150%);
    -webkit-backdrop-filter: blur(15px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    overflow: hidden;
    flex: 1 1 auto;
    min-width: 300px;
    max-width: 400px;
}

.window-titlebar {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    user-select: none;
}

.window-title {
    font-size: 8px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.3px;
    font-family: 'MS Sans Serif', 'Segoe UI', sans-serif;
}

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

.win-btn {
    width: 14px;
    height: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.9);
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    transition: all 0.2s ease;
}

.win-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.win-btn:active {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.win-btn.close:hover {
    background: rgba(255, 68, 68, 0.8);
    color: #fff;
    border-color: rgba(255, 68, 68, 0.6);
}

.player-main {
    padding: 3px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.lcd-display {
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 2px;
    margin-bottom: 2px;
    position: relative;
    min-height: 22px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.lcd-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 255, 0, 0.1) 2px, rgba(0, 255, 0, 0.1) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0, 255, 0, 0.1) 2px, rgba(0, 255, 0, 0.1) 4px);
    opacity: 0.3;
    pointer-events: none;
}

.lcd-content {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Courier New', monospace;
    font-size: 8px;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.lcd-line {
    margin: 0.5px 0;
    display: flex;
    align-items: center;
    gap: 2px;
}

.lcd-label {
    color: rgba(255, 255, 255, 0.7);
    font-weight: bold;
}

/* Y2K Progress Visualizer */
.progress-visualizer {
    margin-bottom: 2px;
    padding: 2px;
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
}

.progress-visualizer:hover {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.15),
        0 0 20px rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.25);
}

.progress-bars {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1px;
    height: 15px;
    margin-bottom: 1px;
    padding: 1px;
}

.progress-bar-segment {
    flex: 1;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    min-height: 2px;
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
    transition: height 0.1s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar-segment::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.5) 50%, transparent 100%);
    animation: scan-bar 2s linear infinite;
    border-radius: 4px;
}

@keyframes scan-bar {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

.progress-time {
    text-align: center;
    font-size: 7px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 0.3px;
}

.track-line {
    font-size: 8px;
    overflow: hidden;
    white-space: nowrap;
    margin-top: 2px;
}

.track-scroll {
    display: inline-block;
    animation: scroll-text 15s linear infinite;
}

@keyframes scroll-text {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.volume-bars {
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 1px;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.controls-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
    padding: 2px;
    overflow: hidden;
}

.control-group {
    display: flex;
    gap: 2px;
    align-items: center;
    flex-shrink: 0;
}

.left-controls {
    flex-direction: row;
}

.small-btn {
    width: 18px;
    height: 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.9);
    font-size: 8px;
    cursor: pointer;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.small-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.small-btn:active {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(0);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.knob-container {
    display: flex;
    gap: 8px;
}

.knob {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #8ba5d0, #4a6fa5);
    border: 2px solid #2a4f7a;
    box-shadow: 
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.5);
    position: relative;
    cursor: pointer;
}

.knob-label {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 8px;
    color: #fff;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    font-family: 'MS Sans Serif', sans-serif;
}

.knob-dial {
    width: 4px;
    height: 12px;
    background: #fff;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

.position-knob {
    width: 60px;
    height: 60px;
}

.playback-controls {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.playback-btn {
    width: 20px;
    height: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.9);
    font-size: 10px;
    cursor: pointer;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.playback-btn.large {
    width: 24px;
    height: 24px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.2);
}

.playback-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.playback-btn.large:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px) scale(1.05);
}

.playback-btn:active {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(0);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.play-btn.playing {
    background: rgba(255, 107, 157, 0.6);
    border-color: rgba(255, 107, 157, 0.8);
    box-shadow: 
        0 4px 12px rgba(255, 107, 157, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.playlist-window {
    height: auto;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-self: stretch;
}

/* Make playlist match player height */
.player-window {
    display: flex;
    flex-direction: column;
}

.player-window .player-main {
    flex: 1;
}

/* Responsive: stack on smaller screens */
@media (max-width: 1000px) {
    .winamp-player {
        flex-direction: column;
        max-width: 380px;
    }
    
    .eq-window {
        max-width: 380px;
        min-width: auto;
    }
    
    .playlist-window {
        max-width: 380px;
        min-width: auto;
    }
}

.playlist-window.hidden {
    display: none;
}

.player-window.minimized .player-main {
    display: none;
}

.playlist-window.minimized .playlist-content {
    display: none;
}

.playlist-content {
    flex: 1;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2px;
    max-height: 90px;
}

.playlist-content::-webkit-scrollbar {
    width: 12px;
}

.playlist-content::-webkit-scrollbar-track {
    background: #0a1a2a;
    border: 1px inset #1a2a3a;
}

.playlist-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #4a6fa5 0%, #2a4f7a 100%);
    border: 1px solid #1a3f6a;
}

.playlist-list {
    display: flex;
    flex-direction: column;
}

.playlist-item {
    padding: 1px 3px;
    font-size: 8px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    font-family: 'Courier New', monospace;
    border-left: 2px solid transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    gap: 4px;
}

.playlist-item .play-count {
    font-weight: bold;
    color: rgba(255, 255, 255, 0.95);
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: rgba(255, 255, 255, 0.4);
}

.playlist-item.active {
    background: rgba(255, 107, 157, 0.3);
    border-left-color: rgba(255, 107, 157, 0.8);
    color: rgba(255, 255, 255, 1);
    font-weight: bold;
}

.playlist-controls {
    display: flex;
    gap: 2px;
    padding: 2px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    align-items: center;
    flex-shrink: 0;
    overflow: hidden;
}

.playlist-btn {
    width: 18px;
    height: 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.9);
    font-size: 9px;
    cursor: pointer;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.playlist-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.playlist-info {
    margin-left: auto;
    font-size: 9px;
    color: #fff;
    font-family: 'Courier New', monospace;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

/* Multi-Band Equalizer */
.eq-window {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px) saturate(150%);
    -webkit-backdrop-filter: blur(15px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    min-width: 280px;
    max-width: 320px;
    align-self: stretch;
}

.eq-content {
    padding: 4px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.eq-bands {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    gap: 1px;
    margin-bottom: 3px;
    height: 90px;
    padding: 3px 2px;
    overflow: hidden;
}

.eq-band {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    flex: 1;
    min-width: 0;
    height: 100%;
}

.eq-freq-label {
    font-size: 6px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
    font-family: 'MS Sans Serif', sans-serif;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 1px;
    white-space: nowrap;
}

.eq-slider-container {
    position: relative;
    width: 18px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    flex-shrink: 0;
}

.eq-slider {
    -webkit-appearance: slider-vertical;
    writing-mode: bt-lr;
    width: 18px;
    height: 80px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    transform: rotate(180deg);
    direction: rtl;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    margin: 0;
    padding: 0;
}

.eq-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transform: rotate(180deg);
}

.eq-slider::-webkit-slider-thumb:hover {
    background: linear-gradient(180deg, #9bb5e0 0%, #7b9fd7 100%);
}

.eq-slider::-webkit-slider-thumb:active {
    background: linear-gradient(180deg, #6b8fa0 0%, #5b7fa7 100%);
}

.eq-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transform: rotate(180deg);
}

.eq-slider::-moz-range-thumb:hover {
    background: linear-gradient(180deg, #9bb5e0 0%, #7b9fd7 100%);
}

.eq-slider::-moz-range-thumb:active {
    background: linear-gradient(180deg, #6b8fa0 0%, #5b7fa7 100%);
}

.eq-value-label {
    font-size: 6px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
    font-family: 'Courier New', monospace;
    min-width: 20px;
    text-align: center;
    line-height: 1;
    margin-top: 1px;
    white-space: nowrap;
}

.eq-controls {
    display: flex;
    gap: 4px;
    justify-content: center;
    padding: 3px 2px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.eq-preset-btn {
    padding: 2px 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.9);
    font-size: 8px;
    cursor: pointer;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    font-family: 'MS Sans Serif', sans-serif;
    font-weight: bold;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1.2;
}

.eq-preset-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.eq-preset-btn:active {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(0);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

#gallery-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-auto-rows: auto;
    grid-gap: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    margin-top: 120px;
}

/* For tablets and smaller desktops, show 4 columns */
@media (max-width: 1400px) {
    #gallery-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1200px) {
    #gallery-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    #gallery-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    #gallery-container {
        grid-template-columns: 1fr;
    }
}

.gallery-item {
    margin: 0;
    padding: 0;
    cursor: pointer;
    transition: opacity 0.3s ease;
    display: block;
    width: 100%;
    grid-column: span 1;
}

/* Horizontal images span 2 columns */
.gallery-item.horizontal {
    grid-column: span 2;
}

/* On smaller screens, horizontal images still span 2 columns if there are 2+ columns */
@media (max-width: 768px) {
    .gallery-item.horizontal {
        grid-column: span 2;
    }
}

/* On mobile, horizontal images take full width */
@media (max-width: 480px) {
    .gallery-item.horizontal {
        grid-column: span 1;
    }
}

.gallery-item:hover {
    opacity: 0.9;
}

.gallery-item.loading {
    opacity: 0.5;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    padding: 0;
}

#loading-indicator {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#loading-indicator.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

