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

:root {
    --win-blue: #0067C0;
    --win-dark: #202020;
    --win-light: #2b2b2b;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow: hidden;
    user-select: none;
}

/* Desktop */
.desktop {
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-image: url('https://images.unsplash.com/photo-1614624532983-4ce03382d63d?w=1920&h=1080&fit=crop');
    background-size: cover;
    background-position: center;
    position: relative;
    transition: filter 0.3s ease;
}

/* Desktop Icons */
.desktop-icons {
    position: absolute;
    top: 20px;
    left: 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    z-index: 1;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    width: 85px;
    position: relative;
}

.desktop-icon:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

.desktop-icon.selected {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.desktop-icon .icon-image {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
    transition: transform 0.2s;
}

.desktop-icon:hover .icon-image {
    transform: scale(1.08);
}

.desktop-icon .icon-image i {
    font-size: 48px;
}

.desktop-icon span {
    color: white;
    font-size: 11.5px;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 8px rgba(0, 0, 0, 0.5);
    word-break: break-word;
    line-height: 1.3;
    font-weight: 400;
}

/* Taskbar */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: rgba(32, 32, 32, 0.95);
    backdrop-filter: blur(30px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    z-index: 1000;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.start-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 4px;
}

.start-btn:hover,
.start-btn.active {
    background-color: rgba(255, 255, 255, 0.1);
}

.taskbar-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid transparent;
    border-radius: 4px;
    margin-left: 8px;
    width: 280px;
    color: white;
    cursor: text;
    transition: all 0.2s;
}

.taskbar-search:hover {
    background: rgba(255, 255, 255, 0.15);
}

.taskbar-search:focus-within {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--win-blue);
}

.taskbar-search i {
    font-size: 14px;
    opacity: 0.7;
}

.taskbar-search input {
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 13px;
    width: 100%;
}

.taskbar-search input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.taskbar-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 8px;
}

.taskbar-apps {
    display: flex;
    align-items: center;
    gap: 4px;
}

.taskbar-app {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 4px;
    position: relative;
    font-size: 20px;
}

.taskbar-app:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.taskbar-app.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--win-blue);
    border-radius: 2px;
}

.system-tray {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 2px;
}

.tray-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 4px;
    position: relative;
    font-size: 14px;
}

.tray-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #c42b1c;
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    font-weight: 600;
}

.datetime {
    padding: 4px 12px;
    text-align: right;
    color: white;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.datetime:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.time {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
}

.date {
    font-size: 11px;
    line-height: 1.2;
}

/* Search Results Panel */
.search-results-panel {
    position: fixed;
    bottom: 56px;
    left: 8px;
    width: 600px;
    max-width: calc(100vw - 16px);
    max-height: 500px;
    background: rgba(32, 32, 32, 0.98);
    backdrop-filter: blur(40px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    z-index: 999;
    color: white;
    animation: slideUp 0.2s ease;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.search-result-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

/* Start Menu */
.start-menu {
    position: fixed;
    bottom: 56px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    max-width: calc(100vw - 16px);
    max-height: 680px;
    background: rgba(32, 32, 32, 0.98);
    backdrop-filter: blur(40px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    z-index: 9999;
    animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.start-header {
    padding: 30px 30px 20px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    transition: all 0.2s;
}

.search-box:focus-within {
    border-color: var(--win-blue);
    background: rgba(255, 255, 255, 0.1);
}

.search-box i {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.search-box input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 14px;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.start-body {
    padding: 0 30px 20px;
    max-height: 500px;
    overflow-y: auto;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    color: white;
    font-size: 13px;
    font-weight: 600;
}

.section-header button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 12px;
    transition: color 0.2s;
}

.section-header button:hover {
    color: white;
}

.start-apps {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 30px;
}

.start-app-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 12px 8px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.start-app-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.start-app-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: white;
    font-size: 24px;
}

.start-app-item span {
    font-size: 11px;
    color: white;
    text-align: center;
}

.recommended-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recommended-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    color: white;
}

.recommended-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.recommended-item i {
    font-size: 20px;
}

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

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.user-profile:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.power-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.power-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* All Apps */
.all-apps-list {
    color: white;
}

.app-category {
    margin-bottom: 24px;
}

.app-category h4 {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
    padding-left: 8px;
}

.app-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.app-list-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.app-list-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 18px;
}

/* Notification Center */
.notification-center {
    position: fixed;
    bottom: 56px;
    right: 8px;
    width: 380px;
    max-width: calc(100vw - 16px);
    max-height: 680px;
    background: rgba(32, 32, 32, 0.98);
    backdrop-filter: blur(40px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    z-index: 9999;
    animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    color: white;
}

.notification-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.notifications-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 12px;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.notification-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.notification-item i {
    font-size: 20px;
    margin-top: 2px;
}

.quick-settings {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.quick-setting-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 11px;
}

.quick-setting-btn:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

.quick-setting-btn.active {
    background-color: var(--win-blue);
    border-color: var(--win-blue);
}

.quick-setting-btn i {
    font-size: 16px;
}

.slider-control {
    margin-top: 16px;
}

.slider-control input[type="range"] {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

.slider-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Context Menu */
.context-menu {
    position: fixed;
    min-width: 280px;
    max-width: calc(100vw - 16px);
    background: rgba(32, 32, 32, 0.98);
    backdrop-filter: blur(40px);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    padding: 6px;
    z-index: 10000;
    color: white;
    font-size: 13px;
}

.context-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.15s;
    position: relative;
}

.context-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.context-item:hover > .context-submenu {
    display: block;
}

.context-item i {
    width: 16px;
    font-size: 14px;
}

.context-item .submenu-icon {
    margin-left: auto;
    font-size: 12px;
}

.context-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 6px 0;
}

.context-submenu {
    position: absolute;
    left: 100%;
    top: 0;
    margin-left: 4px;
    min-width: 200px;
    background: rgba(32, 32, 32, 0.98);
    backdrop-filter: blur(40px);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    padding: 6px;
    display: none;
    z-index: 10001;
}

/* Windows */
.window {
    position: absolute;
    background: var(--win-dark);
    border-radius: 12px;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 100;
    animation: windowOpen 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    min-width: 400px;
    min-height: 300px;
}

@keyframes windowOpen {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes windowClose {
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

.window.maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: calc(100% - 48px) !important;
    border-radius: 0;
}

.window.minimized {
    display: none;
}

.window.active {
    z-index: 9000;
}

.window-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: 40px;
    background: rgba(255, 255, 255, 0.03);
    cursor: move;
    user-select: none;
}

.window-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 13px;
}

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

.window-control {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    transition: background-color 0.15s;
    font-size: 12px;
}

.window-control:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.window-control.close:hover {
    background-color: #c42b1c;
}

.window-body {
    flex: 1;
    overflow: auto;
    color: white;
}

/* Power Menu */
.power-menu {
    position: fixed;
    bottom: 64px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(32, 32, 32, 0.98);
    backdrop-filter: blur(40px);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    padding: 6px;
    z-index: 10000;
    animation: slideUp 0.2s ease;
}

.power-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: white;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.power-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: fadeIn 0.2s ease;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--win-dark);
    padding: 40px;
    border-radius: 16px;
    max-width: 420px;
    width: 90%;
    color: white;
    z-index: 1;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 9998;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 70px;
    right: 20px;
    background: rgba(32, 32, 32, 0.98);
    backdrop-filter: blur(40px);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    z-index: 10002;
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
    }
    to {
        transform: translateX(0);
    }
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loading-icon {
    animation: pulse 2s ease-in-out infinite;
    margin-bottom: 32px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.loading-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Admin Indicator */
.admin-indicator {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0, 103, 192, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    z-index: 10000;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
textarea {
    user-select: text;
}

.form-checkbox {
    accent-color: var(--win-blue);
}

/* ==================== MOBILE RESPONSIVE ==================== */

@media (max-width: 768px) {
    .desktop-icons {
        top: 10px;
        left: 10px;
        right: 10px;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .desktop-icon {
        width: 100%;
        padding: 8px 4px;
    }

    .desktop-icon .icon-image {
        width: 40px;
        height: 40px;
    }

    .desktop-icon .icon-image i {
        font-size: 36px;
    }

    .desktop-icon span {
        font-size: 10px;
    }

    .taskbar {
        height: 56px;
        padding: 0 4px;
    }

    .taskbar-search {
        width: 120px;
    }

    .taskbar-apps {
        gap: 2px;
        overflow-x: auto;
    }

    .taskbar-app {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .tray-icon {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .datetime {
        padding: 2px 6px;
    }

    .time {
        font-size: 10px;
    }

    .date {
        font-size: 9px;
    }

    .start-menu {
        width: calc(100vw - 8px);
        max-height: calc(100vh - 64px);
        bottom: 60px;
    }

    .start-header {
        padding: 20px 16px 16px;
    }

    .start-body {
        padding: 0 16px 16px;
    }

    .start-apps {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .start-app-item {
        padding: 8px 4px;
    }

    .start-app-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .start-app-item span {
        font-size: 10px;
    }

    .notification-center {
        width: calc(100vw - 8px);
        right: 4px;
        bottom: 60px;
    }

    .context-menu {
        min-width: 240px;
    }

    .context-submenu {
        position: fixed;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%);
        margin-left: 0;
    }

    .window {
        min-width: calc(100vw - 8px) !important;
        top: 4px !important;
        left: 4px !important;
        width: calc(100vw - 8px) !important;
        height: calc(100vh - 68px) !important;
        border-radius: 12px;
    }

    .window.maximized {
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: calc(100vh - 56px) !important;
        border-radius: 0;
    }

    .modal-content {
        width: calc(100% - 32px);
        padding: 24px;
    }

    .toast {
        bottom: 64px;
        right: 8px;
        left: 8px;
    }

    .admin-indicator {
        top: 4px;
        right: 4px;
        font-size: 10px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .desktop-icons {
        grid-template-columns: repeat(3, 1fr);
    }

    .start-apps {
        grid-template-columns: repeat(3, 1fr);
    }
}