* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    height: 100vh;
    overflow: hidden;
    background-color: #111;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    touch-action: manipulation;
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    backdrop-filter: blur(4px) brightness(0.9);
    -webkit-backdrop-filter: blur(4px) brightness(0.9);
    z-index: -1;
    pointer-events: none;
}

body.no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

#snow-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    filter: blur(0.8px) brightness(1.2) drop-shadow(0 0 1px white);
    opacity: 0.9;
    mix-blend-mode: screen;
}

.enter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.enter-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.enter-text {
    color: white;
    font-size: 2rem;
    letter-spacing: 2px;
}

.desktop {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, 80px);
    gap: 20px;
    height: calc(100vh - 40px);
    align-content: start;
}

.icon {
    color: white;
    text-align: center;
    cursor: pointer;
    width: 80px;
    height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 10px;
    transition: background 0.2s;
    touch-action: manipulation;
}

.icon > * {
    pointer-events: none;
}

.icon:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.icon i {
    font-size: 32px;
    margin-bottom: 8px;
}

.icon span {
    font-size: 14px;
    word-break: break-word;
    text-align: center;
    width: 100%;
}

.window {
    position: fixed;
    background: rgba(32, 32, 32, 0.3);
    border-radius: 8px;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: none;
    z-index: 10;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.4, 1);
    transform-origin: center;
    touch-action: none;
}

.window.active {
    transform: scale(1);
    opacity: 1;
}

#music-window {
    width: 300px;
    right: 20px;
    bottom: 60px;
    left: auto;
    top: auto;
    transform: none;
}

#clock-window {
    width: 200px;
    right: 20px;
    top: 20px;
    left: auto;
    bottom: auto;
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    transform: none;
}

#about-window {
    width: 300px;
}

.title-bar {
    padding: 10px 15px;
    background: rgba(30, 30, 30, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    -webkit-user-select: none;
    user-select: none;
    touch-action: none;
}

#music-window .title-bar,
#clock-window .title-bar,
#about-window .title-bar {
    cursor: default;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    min-width: 24px;
    min-height: 24px;
}

.content {
    padding: 20px;
}

.player {
    position: relative;
    text-align: center;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    overflow: hidden;
}

.player h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.song-title {
    font-size: 1rem;
    font-weight: 500;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    margin: 10px 0;
    position: relative;
    z-index: 1;
}

.song-artist {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 5px;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

.waveform {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    padding: 0 10px;
    z-index: 0;
}

.waveform-bar {
    width: 4px;
    min-width: 2px;
    background: #0078d7;
    border-radius: 2px;
    height: 2px;
    transition: height 0.05s ease-out, background-color 0.2s ease;
}

.volume-controls {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px auto;
    width: 100%;
    max-width: 260px;
    background: rgba(32, 32, 32, 0.4);
    padding: 8px 12px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    z-index: 1;
}

.volume-slider-container {
    position: relative;
    flex-grow: 1;
    height: 20px;
}

.volume-btn {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    width: 24px;
}

.volume-slider {
    width: 100%;
    -webkit-appearance: none;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    background: #0078d7;
}

.volume-display {
    position: absolute;
    bottom: 30px;
    left: 0;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    min-width: 30px;
    text-align: center;
    white-space: nowrap;
}

.progress-container {
    width: 100%;
    max-width: 260px;
    margin: 10px 0;
    background: rgba(32, 32, 32, 0.3);
    padding: 8px;
    border-radius: 10px;
    backdrop-filter: blur(4px);
    z-index: 1;
}

.progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
    width: 100%;
}

.progress {
    height: 100%;
    width: 0%;
    background: #0078d7;
    border-radius: 2px;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-top: 5px;
    color: rgba(255,255,255,0.7);
    width: 100%;
}

.controls-container {
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 1;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    width: 100%;
    max-width: 260px;
    padding: 0 10px;
}

.controls button {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    margin: 0 2px;
    background: rgba(32, 32, 32, 0.6);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.controls button:hover {
    background: rgba(32, 32, 32, 0.8);
}

.controls .active {
    color: #0078d7;
}

.clock-display {
    text-align: center;
    padding: 20px;
}

.big-time {
    font-size: 2.5rem;
    font-weight: 300;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 178, 255, 0.7);
    margin-bottom: 5px;
}

.big-date {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.taskbar {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 48px;
    background: rgba(32, 32, 32, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    padding: 0 10px;
    justify-content: flex-start;
    z-index: 100;
    gap: 0;
}

.start-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    position: relative;
}

.start-btn::after {
    content: "|";
    color: rgba(255, 255, 255, 0.3);
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    height: 24px;
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 100;
}

.start-btn.active {
    color: #0078d7;
}

.taskbar-windows {
    display: flex;
    gap: 5px;
    margin-left: 10px;
    align-items: center;
}

.taskbar-window {
    height: 40px;
    padding: 0 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 5px;
}

.taskbar-window:hover {
    background: rgba(255, 255, 255, 0.1);
}

.taskbar-window i {
    font-size: 16px;
}

.taskbar-icons {
    display: flex;
    gap: 8px;
    margin-left: auto;
    align-items: center;
}

.volume-icon {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.clock {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 0 15px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 80px;
}

.clock:hover {
    background: rgba(255, 255, 255, 0.1);
}

#time {
    font-size: 14px;
    line-height: 1.2;
}

#date {
    font-size: 12px;
    opacity: 0.8;
    line-height: 1.2;
}

.start-menu {
    position: fixed;
    bottom: 48px;
    left: 0;
    width: 200px;
    background: rgba(32, 32, 32, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 0 8px 0 0;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.3);
    padding: 10px 0;
    display: none;
    z-index: 99;
    transform: translateY(10px) scale(0.95);
    opacity: 0;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.4, 1);
}

.start-menu.visible {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.menu-item {
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: white;
    transition: all 0.2s;
    min-height: 44px;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.menu-item i {
    width: 20px;
    text-align: center;
}

#shutdown-btn {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 5px;
    padding-top: 12px;
}

#shutdown-btn:hover {
    color: #ff4444;
}

@media (max-width: 768px) {
    .window {
        width: 90vw !important;
        max-width: 400px;
    }
    
    #music-window {
        width: 85vw !important;
        right: 5vw !important;
        bottom: 70px !important;
    }
    
    #clock-window {
        width: 70vw !important;
        right: 5vw !important;
    }
    
    #about-window {
        width: 85vw !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
    }
    
    .icon {
        min-width: 70px;
        min-height: 80px;
    }
    
    .controls button {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    
    .title-bar {
        padding: 12px 15px;
    }
    
    .start-menu {
        width: 180px;
    }
    
    .desktop {
        padding: 15px;
        gap: 15px;
    }
    
    .taskbar-window span {
        display: none;
    }
    
    .taskbar-window {
        padding: 0 10px;
        width: 40px;
        justify-content: center;
    }
}

@media (hover: none) {
    .icon:hover {
        background: transparent;
    }
    
    .controls button:hover {
        background: rgba(32, 32, 32, 0.6);
    }
    
    .clock:hover {
        background: transparent;
    }
    
    .menu-item:hover {
        background: transparent;
    }
    
    .taskbar-window:hover {
        background: transparent;
    }
}