/* Windows Vista Aero Glass Theme */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100vh;
    overflow: hidden;
    user-select: none;
    cursor: default;
}

/* Screensaver - Always on top initially */
.screensaver {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: pointer;
}

.screensaver-text {
    font-size: 6vw;
    font-weight: bold;
    color: #22ff88;
    text-shadow: 0 0 20px rgba(34, 255, 136, 0.8);
    animation: bounce 3s infinite alternate;
    text-transform: lowercase;
}

.screensaver-tip {
    position: absolute;
    bottom: 50px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    letter-spacing: 2px;
}

@keyframes bounce {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-20px); }
}

/* Desktop */
.desktop {
    width: 100vw;
    height: 100vh;
    position: relative;
    background: url('/wallpaper.jpg') no-repeat center center;
    background-size: cover;
}

/* Desktop Icons */
.desktop-icons {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 60px;
    display: grid;
    grid-template-columns: repeat(auto-fill, 80px);
    gap: 20px;
    padding: 20px;
}

.desktop-icon {
    width: 80px;
    height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    padding: 8px;
}

.desktop-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.desktop-icon.selected {
    background: rgba(0, 123, 255, 0.3);
    backdrop-filter: blur(10px);
}

.icon-image {
    width: 48px;
    height: 48px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.icon-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    position: relative;
    z-index: 2;
}

.icon-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-radius: 4px;
    z-index: 1;
    opacity: 0.3;
}

.icon-image::after {
    content: '📦';
    font-size: 16px;
    position: absolute;
    top: 2px;
    right: 2px;
    z-index: 3;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
    padding: 1px;
}

.icon-label {
    font-size: 11px;
    color: white;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    line-height: 1.2;
    word-wrap: break-word;
    max-width: 70px;
    font-weight: 500;
}

/* Taskbar */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    padding: 0 10px;
    z-index: 1000;
}

/* Start Button */
.start-button {
    width: 40px;
    height: 30px;
    background: linear-gradient(to bottom, #4a90e2, #357abd);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 10px;
    transition: all 0.2s ease;
}

.start-button:hover {
    background: linear-gradient(to bottom, #5ba0f2, #468bcd);
    transform: scale(1.05);
}

.start-icon {
    color: white;
    font-size: 16px;
}

/* Quick Launch */
.quick-launch {
    display: flex;
    gap: 5px;
    margin-right: 20px;
}

.quick-launch-icon {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.quick-launch-icon:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Taskbar Items */
.taskbar-items {
    flex: 1;
    display: flex;
    gap: 5px;
}

/* System Tray */
.system-tray {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
}

.tray-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
}

.time {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px;
    color: #333;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 3px;
    transition: background 0.2s ease;
}

.time:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Start Menu */
.start-menu {
    position: fixed;
    bottom: 40px;
    left: 10px;
    width: 300px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.9));
    backdrop-filter: blur(20px);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 1001;
    overflow: hidden;
}

.start-menu.show {
    display: block;
}

.start-menu-header {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.start-menu-items {
    padding: 10px 0;
}

.start-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 13px;
    color: #333;
}

.start-menu-item:hover {
    background: rgba(0, 123, 255, 0.1);
}

.menu-icon {
    width: 20px;
    text-align: center;
    font-size: 14px;
}

.start-menu-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 10px 20px;
}

.shutdown-button {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    transition: background 0.2s ease;
    padding: 8px;
    border-radius: 4px;
}

.shutdown-button:hover {
    background: rgba(220, 53, 69, 0.1);
}

/* Context Menu */
.context-menu {
    position: fixed;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.9));
    backdrop-filter: blur(20px);
    border-radius: 6px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    padding: 5px 0;
    display: none;
    z-index: 1002;
    min-width: 150px;
}

.context-menu-item {
    padding: 8px 15px;
    cursor: pointer;
    font-size: 12px;
    color: #333;
    transition: background 0.2s ease;
}

.context-menu-item:hover {
    background: rgba(0, 123, 255, 0.1);
}

.context-menu-separator {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 5px 0;
}

/* Image Viewer Modal */
.viewer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
}

.viewer-window {
    width: 90vw;
    max-width: 1000px;
    height: 90vh;
    max-height: 700px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.viewer-header {
    background: linear-gradient(to bottom, #4a90e2, #357abd);
    color: white;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.viewer-title {
    font-size: 14px;
    font-weight: 600;
}

.viewer-controls {
    display: flex;
    gap: 5px;
}

.viewer-control {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all 0.2s ease;
}

.viewer-control.close {
    background: #dc3545;
}

.viewer-control:hover {
    transform: scale(1.1);
}

.viewer-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #000;
}

#viewerImage {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.viewer-nav {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 10%;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 3em;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

.viewer-nav:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.6);
}

.viewer-nav.left {
    left: 0;
}

.viewer-nav.right {
    right: 0;
}

.viewer-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .screensaver-text {
        font-size: 12vw;
    }
    
    .screensaver-tip {
        font-size: 14px;
        bottom: 30px;
    }
    
    .desktop-icons {
        grid-template-columns: repeat(auto-fill, 60px);
        gap: 10px;
        padding: 15px;
    }
    
    .desktop-icon {
        width: 60px;
        height: 70px;
        padding: 6px;
    }
    
    .icon-image {
        width: 36px;
        height: 36px;
    }
    
    .icon-label {
        font-size: 9px;
        max-width: 50px;
    }
    
    .start-menu {
        width: 280px;
        left: 5px;
        bottom: 45px;
    }
    
    .taskbar {
        height: 35px;
        padding: 0 8px;
    }
    
    .start-button {
        width: 35px;
        height: 25px;
        margin-right: 8px;
    }
    
    .quick-launch {
        margin-right: 15px;
    }
    
    .quick-launch-icon {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
    
    .time {
        font-size: 9px;
        padding: 1px 6px;
    }
    
    .viewer-window {
        width: 95vw;
        height: 95vh;
    }
    
    .viewer-nav {
        width: 15%;
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    .screensaver-text {
        font-size: 14vw;
    }
    
    .desktop-icons {
        grid-template-columns: repeat(auto-fill, 50px);
        gap: 8px;
        padding: 10px;
    }
    
    .desktop-icon {
        width: 50px;
        height: 60px;
        padding: 4px;
    }
    
    .icon-image {
        width: 30px;
        height: 30px;
    }
    
    .icon-label {
        font-size: 8px;
        max-width: 40px;
    }
    
    .start-menu {
        width: 250px;
    }
    
    .taskbar {
        height: 30px;
        padding: 0 5px;
    }
    
    .start-button {
        width: 30px;
        height: 22px;
        margin-right: 5px;
    }
    
    .start-icon {
        font-size: 14px;
    }
    
    .quick-launch-icon {
        width: 18px;
        height: 18px;
        font-size: 9px;
    }
    
    .time {
        font-size: 8px;
        padding: 1px 4px;
    }
    
    .viewer-window {
        width: 98vw;
        height: 98vh;
    }
    
    .viewer-header {
        padding: 8px 12px;
    }
    
    .viewer-title {
        font-size: 12px;
    }
    
    .viewer-nav {
        width: 20%;
        font-size: 1.5em;
    }
}
