/* Windows 11 Desktop Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* macOS-style Menu Bar */
.menu-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 24px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    z-index: 2000;
    color: white;
    font-size: 12px;
    -webkit-font-smoothing: antialiased;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-bar-left {
    display: flex;
    align-items: center;
}

.menu-bar-title {
    font-weight: 500;
    letter-spacing: 0.5px;
}

.menu-bar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wifi-icon {
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 20px;
}

.wifi-icon img {
    height: 16px;
    width: 16px;
    display: block;
}

.wifi-icon:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.time-display {
    min-width: 80px;
    text-align: right;
    font-family: monospace;
    font-size: 12px;
}

/* WiFi Popup */
.wifi-popup {
    position: fixed;
    top: 30px;
    right: 10px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 15px;
    z-index: 2001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.wifi-popup.hidden {
    display: none;
}

.wifi-popup-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.wifi-popup-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.wifi-popup-icon img {
    height: 24px;
    width: 24px;
    display: block;
}

.wifi-popup-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

body {
    overflow: hidden;
}

/* Desktop Background */
.desktop {
    width: 100vw;
    height: 100vh;
    background-color: #667eea; /* Fallback color */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    padding-top: 24px; /* Account for menu bar height */
}

/* Start Menu */
.start-menu {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 500px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 20px;
    transition: all 0.3s ease;
}

.start-menu.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(20px);
}

.start-header h2 {
    color: #333;
    font-weight: 500;
    margin-bottom: 20px;
    font-size: 20px;
}

.start-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    flex: 1;
}

.app-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.app-tile:hover {
    background: rgba(0, 0, 0, 0.1);
}

.app-tile img {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
}

.app-tile span {
    color: #333;
    font-size: 14px;
    text-align: center;
}

.start-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.user-profile {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.user-profile img {
    width: 30px;
    height: 30px;
    margin-right: 10px;
}

.user-profile span {
    color: #333;
    font-weight: 500;
}

.power-button {
    width: 30px;
    height: 30px;
    cursor: pointer;
}

.power-button img {
    width: 100%;
    height: 100%;
}

/* Centered Dock */
.dock {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
}

.dock-background {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(30px);
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    z-index: -1;
}

.dock-icons {
    display: flex;
    align-items: center;
    border-radius: 15px;
}

.dock-item {
    width: 50px;
    height: 50px;
    margin: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s ease;
    position: relative;
}

.dock-item:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.dock-item img {
    width: 28px;
    height: 28px;
}

.start-button {
    background: rgba(255, 255, 255, 0.3);
}

.start-button:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* App Windows */
.window {
    position: absolute;
    width: 800px;
    height: 800px; /* Increased from 500px to 800px (taller by 300px) */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: none;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.window.maximized {
    border-radius: 0;
    border: none;
}

/* Window resize handles */
.window-resize-handle {
    position: absolute;
    z-index: 10;
}

/* North (top) handle */
.resize-n {
    top: 0;
    left: 5px;
    right: 5px;
    height: 5px;
    cursor: ns-resize;
}

/* South (bottom) handle */
.resize-s {
    bottom: 0;
    left: 5px;
    right: 5px;
    height: 5px;
    cursor: ns-resize;
}

/* East (right) handle */
.resize-e {
    right: 0;
    top: 5px;
    bottom: 5px;
    width: 5px;
    cursor: ew-resize;
}

/* West (left) handle */
.resize-w {
    left: 0;
    top: 5px;
    bottom: 5px;
    width: 5px;
    cursor: ew-resize;
}

/* Southeast corner handle */
.resize-se {
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    cursor: nwse-resize;
}

/* Southwest corner handle */
.resize-sw {
    bottom: 0;
    left: 0;
    width: 10px;
    height: 10px;
    cursor: nesw-resize;
}

/* Northeast corner handle */
.resize-ne {
    top: 0;
    right: 0;
    width: 10px;
    height: 10px;
    cursor: nesw-resize;
}

/* Northwest corner handle */
.resize-nw {
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    cursor: nwse-resize;
}

.window-header {
    height: 40px;
    background: rgba(240, 240, 240, 0.95);
    display: flex;
    align-items: center;
    padding: 0 15px;
    cursor: move;
    -webkit-app-region: drag;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.window-title {
    flex: 1;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 10px;
}

.window-controls {
    display: flex;
    -webkit-app-region: no-drag;
}

.window-btn {
    width: 24px;
    height: 24px;
    margin-left: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.window-btn:hover {
    transform: scale(1.1);
}

.close-btn {
    background: #ff5f57;
}

.minimize-btn {
    background: #febc2e;
}

.maximize-btn {
    background: #28c840;
}

.window-content {
    flex: 1;
    height: calc(100% - 40px);
    overflow: hidden;
}

.window-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Dock Items */
.dock-item.app-icon {
    background: rgba(255, 255, 255, 0.2);
}

.dock-item.app-icon:hover {
    background: rgba(255, 255, 255, 0.4);
}

.dock-item.app-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}
