/* --- Reset & helpers --- */
    * {
        box-sizing: border-box
    }

    html,
    body {
        height: 100%
    }

    body {
        margin: 0;
        font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
        color: #e6eef8;
        background: linear-gradient(135deg, #07203a 0%, #0b1f2b 40%, #08304a 100%);
        -webkit-font-smoothing: antialiased
    }

    /* --- Desktop area --- */
    .desktop {
        position: relative;
        height: 100vh;
        overflow: hidden;
        padding: 24px
    }

    /* Frosted background panel for icons and windows */
    .frost {
        position: absolute;
        inset: 0;
        backdrop-filter: blur(8px) saturate(140%);
        -webkit-backdrop-filter: blur(8px) saturate(140%);
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
        pointer-events: none;
        z-index: 0
    }

    /* Icons grid */
    .icons {
        position: relative;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
        gap: 18px;
        width: 320px;
        z-index: 3; /* <- thêm: đảm bảo icon nằm trên .frost */
    }

    .icon {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 8px;
        padding: 6px;
        border-radius: 10px;
        color: #dbeeff;
        cursor: pointer;
        user-select: none
    }

    .icon:hover {
        background: rgba(255, 255, 255, 0.02)
    }

    .icon .glyph {
        width: 56px;
        height: 56px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(180deg, #ffffff22, #00000011);
        box-shadow: inset 0 -3px 8px rgba(0, 0, 0, 0.25);
        font-weight: 700
    }

    .icon span {
        font-size: 13px;
        color: #d6e8ff
    }

    /* Window (app) style */
    .window {
        position: absolute;
        width: 680px;
        max-width: calc(100% - 48px);
        height: 420px;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.06);
        box-shadow: 0 8px 30px rgba(2, 6, 23, 0.6);
        overflow: hidden;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        z-index: 20
    }

    .window .titlebar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 12px;
        gap: 12px;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent)
    }

    .titlebar .title {
        display: flex;
        align-items: center;
        gap: 10px
    }

    .titlebar .title strong {
        font-size: 14px
    }

    .titlebar .controls {
        display: flex;
        gap: 8px
    }

    .ctrl {
        width: 36px;
        height: 28px;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer
    }

    .ctrl:hover {
        background: rgba(255, 255, 255, 0.02)
    }

    .ctrl[data-action="close"]:hover {
        background: linear-gradient(180deg, #ff4444cc, #aa2222cc);
        color: #fff;
    }

    .window .content {
        padding: 18px;
        color: #cfe8ff
    }

    /* Taskbar */
    .taskbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: 56px;
        background: rgba(6, 10, 18, 0.7);
        backdrop-filter: blur(10px);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 50;
        transition: height .2s;
    }

    .taskbar-inner {
        width: 100%;
        max-width: 1200px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 12px;
    }

    .start-btn {
        width: 44px;
        height: 44px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        background: linear-gradient(180deg, #ffffff10, #00000010);
        font-size: 22px;
        transition: background .2s;
    }

    .start-btn:active {
        background: rgba(255, 255, 255, 0.08);
    }

    .task-icons {
        display: flex;
        gap: 12px;
        align-items: center;
    }

    .task-icon {
        width: 40px;
        height: 40px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        background: linear-gradient(180deg, #ffffff08, #00000008);
        font-size: 18px;
        transition: background .2s;
    }

    .task-icon:active {
        background: rgba(255, 255, 255, 0.08);
    }

    /* --- Start menu --- */
    .start-menu {
        position: fixed;
        left: 20px;
        bottom: 76px;
        width: 360px;
        max-width: calc(100% - 40px);
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
        border-radius: 16px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(12px);
        z-index: 60;
        padding: 16px;
        display: none;
        animation: fadeIn .18s ease-out;
        transition: all .2s;
    }

    .start-menu.full {
        left: 0;
        right: 0;
        bottom: 0;
        top: 0;
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        max-width: none;
        box-shadow: none;
        padding: 24px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: linear-gradient(135deg, #07203a 0%, #0b1f2b 40%, #08304a 100%);
    }

    .start-menu .start-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }

    .start-menu.full .start-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .app-tile {
        display: flex;
        gap: 10px;
        align-items: center;
        padding: 10px;
        border-radius: 12px;
        cursor: pointer;
        background: linear-gradient(180deg, #ffffff10, #00000008);
        font-size: 16px;
        transition: background .2s;
    }

    .app-tile:active {
        background: rgba(255, 255, 255, 0.08);
    }

    .app-tile .tile-ico {
        width: 44px;
        height: 44px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(180deg, #ffffff16, #00000012);
        font-size: 20px;
    }

    /* Responsive tweaks */
    @media (max-width:900px) {
        .taskbar-inner {
            max-width: 100vw;
            padding: 0 6px;
        }

        .task-icons {
            gap: 8px;
        }

        .task-icon {
            width: 36px;
            height: 36px;
            font-size: 16px;
        }

        .start-btn {
            width: 38px;
            height: 38px;
            font-size: 18px;
        }

        .start-menu {
            width: 96vw;
            left: 2vw;
        }
    }

    @media (max-width:600px) {
        .taskbar {
            height: 48px;
        }

        .taskbar-inner {
            padding: 0 2px;
        }

        .task-icons {
            gap: 6px;
        }

        .task-icon {
            width: 32px;
            height: 32px;
            font-size: 15px;
        }

        .start-btn {
            width: 32px;
            height: 32px;
            font-size: 16px;
        }

        .start-menu {
            width: 98vw;
            left: 1vw;
            padding: 10px;
        }

        .start-menu .start-grid {
            grid-template-columns: repeat(2, 1fr);
        }
    }

    @media (max-width:420px) {
        .taskbar {
            height: 44px;
        }

        .taskbar-inner {
            padding: 0 1px;
        }

        .task-icons {
            gap: 4px;
        }

        .task-icon {
            width: 28px;
            height: 28px;
            font-size: 14px;
        }

        .start-btn {
            width: 28px;
            height: 28px;
            font-size: 14px;
        }

        .start-menu {
            padding: 0;
            width: 100vw;
            left: 0;
        }

        .start-menu.full {
            padding: 0;
        }
    }

    /* subtle animations */
    .fade-in {
        animation: fadeIn .18s ease-out
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(12px)
        }

        to {
            opacity: 1;
            transform: none
        }
    }

    /* small utility */
    .hidden {
        display: none
    }