* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    user-select: none;
}

.desktop {
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

/* 窗口样式 */
.window {
    position: absolute;
    min-width: 300px;
    min-height: 200px;
    width: 500px;
    height: 400px;
    background: rgba(240, 245, 250, 0.95);
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(3px);
    border: 1px solid rgba(200, 220, 240, 0.3);
    transition: box-shadow 0.15s ease;
    z-index: 1;
    will-change: transform;
    overflow: hidden;
}

.window:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.window.active {
    z-index: 1000;
}

.window.maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: calc(100vh - 50px) !important;
    border-radius: 0;
}

.window.minimized {
    transform: scale(0.1) !important;
    opacity: 0 !important;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* 窗口标题栏 */
.window-header {
    height: 40px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    cursor: move;
    color: white;
    font-weight: 500;
}

.window.maximized .window-header {
    border-radius: 0;
}

.window-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.window-title i {
    font-size: 16px;
}

.window-controls {
    display: flex;
    gap: 8px;
}

.control-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.minimize-btn:hover {
    background: #ffc107;
    color: #333;
}

.maximize-btn:hover {
    background: #28a745;
    color: white;
}

.close-btn:hover {
    background: #dc3545;
    color: white;
}

/* 窗口内容 */
.window-content {
    height: calc(100% - 40px);
    padding: 20px;
    overflow-y: auto;
}

.content-area h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
}

.content-area p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.content-area ul {
    color: #666;
    margin-left: 20px;
    margin-bottom: 20px;
}

.content-area li {
    margin-bottom: 8px;
}

/* 演示按钮 */
.demo-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.demo-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.demo-btn.primary {
    background: #007bff;
    color: white;
}

.demo-btn.primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.demo-btn.secondary {
    background: #6c757d;
    color: white;
}

.demo-btn.secondary:hover {
    background: #545b62;
    transform: translateY(-2px);
}

.demo-btn.success {
    background: #28a745;
    color: white;
}

.demo-btn.success:hover {
    background: #1e7e34;
    transform: translateY(-2px);
}

/* 设置项样式 */
.setting-item {
    margin-bottom: 15px;
}

.setting-item label {
    display: block;
    color: #333;
    margin-bottom: 5px;
    font-weight: 500;
}

.setting-select {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    background: #f8f9fa;
    color: #333;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.setting-select:focus {
    outline: none;
    border-color: #007bff;
}

.setting-item input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

/* 调整大小控制点 */
.resize-handle {
    position: absolute;
    background: transparent;
}

.resize-n, .resize-s {
    height: 5px;
    left: 5px;
    right: 5px;
    cursor: ns-resize;
}

.resize-n { top: 0; }
.resize-s { bottom: 0; }

.resize-e, .resize-w {
    width: 5px;
    top: 5px;
    bottom: 5px;
    cursor: ew-resize;
}

.resize-e { right: 0; }
.resize-w { left: 0; }

.resize-ne, .resize-nw, .resize-se, .resize-sw {
    width: 10px;
    height: 10px;
}

.resize-ne {
    top: 0;
    right: 0;
    cursor: ne-resize;
}

.resize-nw {
    top: 0;
    left: 0;
    cursor: nw-resize;
}

.resize-se {
    bottom: 0;
    right: 0;
    cursor: se-resize;
}

.resize-sw {
    bottom: 0;
    left: 0;
    cursor: sw-resize;
}

/* 任务栏 */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    z-index: 2000;
}

.taskbar-left {
    display: flex;
    align-items: center;
}

.start-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.start-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.4);
}

.taskbar-center {
    display: flex;
    gap: 10px;
    flex: 1;
    justify-content: center;
    align-items: center;
}

.taskbar-windows {
    display: flex;
    gap: 8px;
    align-items: center;
}

.taskbar-item {
    background: rgba(200, 220, 240, 0.2);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    font-size: 13px;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.taskbar-item:hover {
    background: rgba(200, 220, 240, 0.3);
}

.taskbar-item.active {
    background: rgba(79, 172, 254, 0.3);
    border: 1px solid rgba(79, 172, 254, 0.5);
}

.taskbar-item.minimized {
    opacity: 0.7;
}

.taskbar-right {
    display: flex;
    align-items: center;
}

.system-tray {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

/* 滚动条样式 */
.window-content::-webkit-scrollbar {
    width: 8px;
}

.window-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.window-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.window-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* 开始菜单 */
.start-menu {
    position: fixed;
    bottom: 60px;
    left: 15px;
    width: 350px;
    height: 500px;
    background: rgba(240, 245, 250, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(200, 220, 240, 0.3);
    transform: scale(0.8) translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3000;
    overflow: hidden;
}

.start-menu.show {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: all;
}

.start-menu-header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    padding: 20px;
    color: white;
    text-align: center;
}

.start-menu-header h2 {
    font-size: 18px;
    margin-bottom: 5px;
}

.start-menu-header p {
    font-size: 12px;
    opacity: 0.8;
}

.start-menu-content {
    padding: 20px;
    height: calc(100% - 80px);
    overflow-y: auto;
}

.menu-section {
    margin-bottom: 25px;
}

.menu-section h3 {
    color: #333;
    font-size: 14px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.menu-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.menu-item {
    background: rgba(230, 240, 250, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.menu-item:hover {
    background: rgba(79, 172, 254, 0.1);
    border-color: rgba(79, 172, 254, 0.3);
    transform: translateY(-2px);
}

.menu-item i {
    font-size: 24px;
    color: #4facfe;
    margin-bottom: 8px;
    display: block;
}

.menu-item span {
    font-size: 12px;
    color: #333;
    font-weight: 500;
}

/* 主题系统 */
.theme-selector {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.theme-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}

.theme-option.active {
    border-color: white;
    transform: scale(1.1);
}

.theme-option.blue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.theme-option.green {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
}

.theme-option.purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.theme-option.orange {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* 主题变量 */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --header-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --accent-color: #4facfe;
}

[data-theme="green"] {
    --primary-gradient: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    --header-gradient: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    --accent-color: #56ab2f;
}

[data-theme="purple"] {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --header-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-color: #667eea;
}

[data-theme="orange"] {
    --primary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --header-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-color: #f093fb;
}

/* 应用主题 */
.desktop {
    background: var(--primary-gradient);
}

.window-header,
.start-menu-header {
    background: var(--header-gradient);
}

.start-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.outer-circle {
    width: 16px;
    height: 16px;
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.inner-circle {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .demo-buttons {
        flex-direction: column;
    }
    
    .start-menu {
        width: 300px;
        height: 400px;
    }
    
    .menu-items {
        grid-template-columns: 1fr;
    }
}
