*{
    box-sizing:border-box;
}

html,
body{
    width:100%;
    height:100%;
}

body{
    margin:0;
    font-family:'Montserrat', sans-serif;
    color:#fff;
    overflow:hidden;
    background:#0f1116;
    cursor:url('../assets/cursor.png') 12 12, auto;
    opacity:0;
    animation:fadeInMain .45s ease forwards;
}

@keyframes fadeInMain{
    from{ opacity:0; }
    to{ opacity:1; }
}

img{
    max-width:100%;
    display:block;
}

button,
input,
textarea,
select{
    font-family:'Montserrat', sans-serif;
}

.hidden{
    display:none !important;
}

/* ================= SCREEN ================= */
#desktopScreen{
    position:fixed;
    inset:0;
    min-height:100vh;
    overflow:hidden;
}

#desktopScreen.screen-hidden{
    display:none !important;
}

#desktopScreen.screen-visible{
    display:block !important;
}

#desktopScreen > .bg{
    position:fixed;
    inset:0;
    background:url('../assets/bg.jpg') center/cover no-repeat;
    filter:blur(14px) brightness(.6);
    transform:scale(1.04);
    z-index:-2;
    will-change:transform, filter;
}

/* ================= TOPBAR ================= */
.topbar{
    position:fixed;
    inset:0;
    z-index:120;
    pointer-events:none;
}

.topbar .avatar{
    position:fixed;
    left:50%;
    bottom:22px;
    transform:translateX(calc(-50% - 230px));
    width:64px;
    height:64px;
    border-radius:18px;
    background:center/cover no-repeat;
    border:1px solid rgba(255,255,255,.18);
    box-shadow:0 18px 40px rgba(0,0,0,.25);
    backdrop-filter:blur(14px);
    pointer-events:auto;
    cursor:pointer;
    transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    z-index:130;
}

.topbar .avatar:hover{
    transform:translateX(calc(-50% - 230px)) translateY(-2px) scale(1.02);
    box-shadow:0 22px 44px rgba(0,0,0,.32);
    border-color:rgba(255,255,255,.3);
}

.time-box{
    position:fixed;
    top:22px;
    left:22px;
    min-width:260px;
    padding:16px 18px;
    text-align:left;
    border-radius:22px;
    background:rgba(15,18,26,.18);
    border:1px solid rgba(255,255,255,.12);
    backdrop-filter:blur(18px);
    box-shadow:0 18px 40px rgba(0,0,0,.22);
    pointer-events:auto;
}

.topbar #time{
    font-size:68px;
    font-weight:600;
    line-height:1;
    letter-spacing:.5px;
    text-shadow:0 8px 26px rgba(0,0,0,.45);
}

.topbar #date,
.topbar #lunar{
    margin-top:4px;
    font-size:14px;
    opacity:.92;
    text-shadow:0 2px 10px rgba(0,0,0,.45);
}

.sysinfo{
    margin-top:8px;
    font-size:12px;
    opacity:.82;
}

/* ================= CONTEXT MENU ================= */
.menu{
    position:fixed;
    display:none;
    min-width:180px;
    padding:8px;
    border-radius:18px;
    background:rgba(16,18,24,.78);
    border:1px solid rgba(255,255,255,.1);
    backdrop-filter:blur(18px);
    box-shadow:0 18px 50px rgba(0,0,0,.38);
    z-index:12000;
}

.menu div{
    padding:11px 14px;
    border-radius:12px;
    cursor:pointer;
    transition:background .15s ease, transform .15s ease;
    font-size:14px;
}

.menu div:hover{
    background:rgba(255,255,255,.09);
    transform:translateX(2px);
}

/* ================= DOCK ================= */
.dock{
    position:fixed;
    left:50%;
    bottom:22px;
    transform:translateX(-50%);
    display:flex;
    align-items:flex-end;
    gap:14px;
    padding:12px 16px;
    border-radius:28px;
    background:rgba(18,20,28,.24);
    border:1px solid rgba(255,255,255,.12);
    backdrop-filter:blur(18px);
    box-shadow:0 18px 42px rgba(0,0,0,.28);
    z-index:110;
}

.dock-item{
    position:relative;
    width:62px;
    height:62px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:transparent;
    border:none;
    box-shadow:none;
    border-radius:0;
    cursor:pointer;
    transition:opacity .14s ease;
    will-change:transform;
}

.dock-item:hover{
    background:transparent;
    border:none;
    box-shadow:none;
}

.dock-item img{
    width:32px;
    height:32px;
    object-fit:contain;
    pointer-events:none;
}

.dock-user{
    position:relative;
    overflow:visible;
}

.dock-user-avatar{
    position:relative;
    width:52px;
    height:52px;
    border-radius:16px;
    background-size:cover;
    background-position:center;
    background-repeat:no-repeat;
    border:1.5px solid rgba(255,255,255,.88);
    box-shadow:
        0 0 0 2px rgba(255,255,255,.10),
        0 0 18px rgba(255,255,255,.22),
        0 10px 24px rgba(0,0,0,.28);
    transition:
        box-shadow .18s ease,
        border-color .18s ease,
        filter .18s ease;
    pointer-events:none;
}

.dock-user:hover .dock-user-avatar{
    border-color:rgba(255,255,255,1);
    box-shadow:
        0 0 0 2px rgba(255,255,255,.16),
        0 0 24px rgba(255,255,255,.30),
        0 12px 28px rgba(0,0,0,.32);
    filter:brightness(1.03);
}

/* giữ chấm trắng báo app đang mở */
.dock-item.running::after{
    content:"";
    position:absolute;
    left:50%;
    bottom:-8px;
    width:8px;
    height:8px;
    border-radius:999px;
    background:#fff;
    transform:translateX(-50%);
    opacity:.92;
}

/* bỏ khung active */
.dock-item.active{
    background:transparent;
    border:none;
    box-shadow:none;
}

/* tắt animation launch cũ để khỏi giật */
.dock-item.launch{
    animation:none;
}

/* ================= START MENU ================= */
.start-menu-pro{
    position:fixed;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transform:translateY(10px) scale(.985);
    transition:opacity .18s ease, transform .18s ease, visibility .18s ease;
    z-index:9000;
}

.start-menu-pro.show{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
    transform:translateY(0) scale(1);
}

.start-menu-shell{
    border-radius:24px;
    background:rgba(16,18,24,.82);
    border:1px solid rgba(255,255,255,.08);
    backdrop-filter:blur(22px);
    box-shadow:0 24px 70px rgba(0,0,0,.34);
    overflow:hidden;
}

.start-menu-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:14px 16px 12px;
    border-bottom:1px solid rgba(255,255,255,.06);
}

.start-menu-profile{
    display:flex;
    align-items:center;
    gap:10px;
    background:none;
    border:none;
    color:#fff;
    padding:0;
    cursor:pointer;
    text-align:left;
}

.start-profile-avatar{
    width:42px;
    height:42px;
    border-radius:13px;
    background:center/cover no-repeat;
    border:1px solid rgba(255,255,255,.14);
}

.start-profile-name{
    font-size:16px;
    font-weight:800;
    line-height:1.2;
}

.start-profile-sub{
    margin-top:2px;
    font-size:11px;
    opacity:.7;
}

.start-close-btn{
    width:34px;
    height:34px;
    border:none;
    border-radius:11px;
    background:rgba(255,255,255,.07);
    color:#fff;
    font-size:20px;
    cursor:pointer;
}

.single-start-body{
    display:flex;
    flex-direction:column;
    gap:14px;
    padding:14px 16px 16px;
}

.start-block-title{
    margin-bottom:8px;
    font-size:11px;
    font-weight:800;
    letter-spacing:.08em;
    text-transform:uppercase;
    opacity:.72;
}

.compact-app-list{
    display:grid;
    gap:8px;
}

.start-app-item{
    display:flex;
    align-items:center;
    gap:12px;
    width:100%;
    border:none;
    padding:11px 12px;
    border-radius:16px;
    color:#fff;
    text-align:left;
    cursor:pointer;
    background:rgba(255,255,255,.05);
    border:1px solid rgba(255,255,255,.06);
    transition:transform .15s ease, background .15s ease, border-color .15s ease;
}

.start-app-item:hover{
    transform:translateY(-1px);
    background:rgba(255,255,255,.08);
    border-color:rgba(255,255,255,.1);
}

.start-app-icon{
    flex:0 0 38px;
    width:38px;
    height:38px;
    border-radius:12px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:rgba(255,255,255,.07);
}

.start-app-icon img{
    width:20px;
    height:20px;
}

.start-app-text strong{
    display:block;
    font-size:14px;
    font-weight:800;
    line-height:1.2;
}

.start-app-text small{
    display:block;
    margin-top:3px;
    opacity:.7;
    font-size:11px;
    line-height:1.35;
}

.single-start-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
    padding-top:2px;
}

.power-btn{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    padding:11px 12px;
    border:none;
    border-radius:14px;
    color:#fff;
    font-weight:800;
    font-size:14px;
    cursor:pointer;
    transition:transform .15s ease, filter .15s ease;
}

.power-btn:hover{
    transform:translateY(-1px);
    filter:brightness(1.05);
}

.power-logout{
    background:linear-gradient(135deg, rgba(73,134,255,.92), rgba(55,99,218,.92));
}

.power-shutdown{
    background:linear-gradient(135deg, rgba(255,105,110,.92), rgba(205,54,75,.92));
}

/* ================= WINDOW ================= */
.window{
    position:fixed;
    left:50%;
    top:60px;
    width:min(1200px, 88vw);
    height:min(760px, 78vh);
    transform:translateX(-50%);
    border-radius:28px;
    background:rgba(16,18,24,.56);
    border:1px solid rgba(255,255,255,.12);
    backdrop-filter:blur(24px);
    box-shadow:0 28px 80px rgba(0,0,0,.36);
    overflow:hidden;
    z-index:7000;
}

.compact-window{
    width:min(980px, 82vw);
    height:min(660px, 72vh);
}

.window.dragging,
.window.resizing{
    transition:none !important;
    user-select:none;
}

.window-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:16px;
    padding:16px 18px;
    background:rgba(255,255,255,.04);
    border-bottom:1px solid rgba(255,255,255,.08);
    cursor:move;
}

.window-header-left,
.window-header-right{
    display:flex;
    align-items:center;
    gap:12px;
    min-width:0;
}

.window-header .title{
    font-size:16px;
    font-weight:700;
    white-space:nowrap;
}

.path-badge{
    max-width:320px;
    padding:8px 12px;
    border-radius:999px;
    background:rgba(255,255,255,.08);
    font-size:12px;
    opacity:.84;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.window-toolbar{
    display:flex;
    align-items:center;
    gap:8px;
}

.window-buttons{
    display:flex;
    align-items:center;
    gap:8px;
    cursor:default;
}

.window-buttons span{
    width:14px;
    height:14px;
    border-radius:999px;
    display:block;
    cursor:pointer;
    transition:transform .14s ease, filter .14s ease;
}

.window-buttons span:hover{
    transform:scale(1.12);
    filter:brightness(1.08);
}

.window-buttons .min{
    background:#f6bf4f;
}

.window-buttons .max{
    background:#33c85a;
}

.window-buttons .close{
    background:#ff5f57;
}

.window-body{
    display:grid;
    grid-template-columns:1fr 340px;
    gap:0;
    height:calc(100% - 68px);
}

.single-column-body{
    display:block;
    height:calc(100% - 68px);
}

.window-resizer{
    position:absolute;
    right:0;
    bottom:0;
    width:18px;
    height:18px;
    cursor:nwse-resize;
    z-index:10;
}

.window-resizer::before{
    content:"";
    position:absolute;
    right:4px;
    bottom:4px;
    width:10px;
    height:10px;
    border-right:2px solid rgba(255,255,255,.45);
    border-bottom:2px solid rgba(255,255,255,.45);
    opacity:.7;
}

.btn-soft,
.btn-primary,
.btn-danger{
    border:none;
    cursor:pointer;
    border-radius:14px;
    font-weight:700;
    transition:transform .16s ease, filter .16s ease, background .16s ease;
}

.btn-soft{
    padding:10px 14px;
    color:#fff;
    background:rgba(255,255,255,.08);
    border:1px solid rgba(255,255,255,.08);
}

.btn-soft:hover,
.btn-primary:hover,
.btn-danger:hover{
    transform:translateY(-1px);
    filter:brightness(1.04);
}

.btn-primary{
    padding:10px 16px;
    color:#fff;
    background:linear-gradient(135deg, rgba(77,130,255,.96), rgba(49,95,220,.96));
    box-shadow:0 12px 24px rgba(37,99,235,.22);
}

.btn-danger{
    padding:10px 16px;
    color:#fff;
    background:linear-gradient(135deg, rgba(255,111,117,.96), rgba(220,63,88,.96));
    box-shadow:0 12px 24px rgba(190,24,64,.22);
}

/* ================= GALLERY ================= */
.gallery-grid{
    padding:18px;
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(110px, 110px));
    gap:22px 18px;
    align-content:start;
    overflow:auto;
    background:transparent;
}

.gallery-grid .item{
    width:110px;
    padding:0;
    border-radius:0;
    background:transparent;
    border:none;
    cursor:pointer;
    transition:transform .16s ease, opacity .16s ease;
}

.gallery-grid .item:hover{
    transform:translateY(-2px);
    background:transparent;
    border:none;
}

.gallery-grid .item.active{
    background:transparent;
    border:none;
    outline:none;
}

.gallery-grid .item img{
    width:92px;
    height:72px;
    object-fit:cover;
    border-radius:6px;
    margin:0 auto;
    display:block;
}

.gallery-grid .item span{
    display:block;
    margin-top:8px;
    font-size:13px;
    line-height:1.35;
    text-align:center;
    word-break:break-word;
}

.folder-icon{
    width:92px;
    height:72px;
    margin:0 auto;
    border-radius:0;
    display:flex;
    align-items:center;
    justify-content:center;
    background:transparent;
}

.folder-icon img{
    width:78px !important;
    height:58px !important;
}

.gallery-empty{
    padding:30px;
    font-size:14px;
    opacity:.75;
}

.detail-panel{
    padding:20px;
    overflow:auto;
    border-left:1px solid rgba(255,255,255,.08);
    background:rgba(255,255,255,.04);
}

.detail-placeholder{
    font-size:14px;
    opacity:.72;
    line-height:1.6;
}

.detail-panel h3{
    margin:0 0 8px;
    font-size:20px;
    line-height:1.3;
}

.detail-meta{
    margin-bottom:14px;
    font-size:13px;
    opacity:.74;
}

.detail-preview{
    width:100%;
    border-radius:20px;
    overflow:hidden;
    background:rgba(255,255,255,.05);
    border:1px solid rgba(255,255,255,.08);
}

.detail-preview img{
    width:100%;
    object-fit:cover;
}

.detail-folder{
    width:100%;
    min-height:180px;
    border-radius:20px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:rgba(255,255,255,.05);
    border:1px solid rgba(255,255,255,.08);
}

.detail-folder img{
    width:76px;
    height:76px;
}

.detail-actions{
    margin-top:16px;
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}

/* ================= FILES ================= */
.files-list{
    height:100%;
    overflow:auto;
    padding:16px;
}

.files-list .file-row{
    display:flex;
    align-items:center;
    gap:12px;
    padding:12px 14px;
    border-radius:16px;
    background:rgba(255,255,255,.05);
    border:1px solid rgba(255,255,255,.07);
}

.files-list .file-row + .file-row{
    margin-top:10px;
}

/* ================= IMAGE VIEWER ================= */
.image-viewer{
    position:fixed;
    inset:0;
    z-index:15000;
}

.image-viewer-backdrop{
    position:absolute;
    inset:0;
    background:rgba(0,0,0,.74);
    backdrop-filter:blur(8px);
}

.image-viewer-content{
    position:relative;
    z-index:1;
    width:min(1100px, calc(100vw - 40px));
    height:min(85vh, 820px);
    margin:40px auto;
    border-radius:28px;
    overflow:hidden;
    background:rgba(14,15,20,.86);
    border:1px solid rgba(255,255,255,.1);
    box-shadow:0 28px 80px rgba(0,0,0,.45);
}

.image-viewer-content img{
    width:100%;
    height:calc(100% - 60px);
    object-fit:contain;
    background:#0b0d12;
}

.viewer-close{
    position:absolute;
    top:16px;
    right:16px;
    width:42px;
    height:42px;
    border:none;
    border-radius:14px;
    background:rgba(255,255,255,.08);
    color:#fff;
    font-size:24px;
    cursor:pointer;
    z-index:2;
}

.viewer-caption{
    height:60px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:0 20px;
    font-size:14px;
    opacity:.9;
}

/* ================= MODAL ================= */
.modal-layer{
    position:fixed;
    inset:0;
    z-index:14000;
}

.modal-layer.hidden,
.image-viewer.hidden{
    display:none !important;
}

.modal-backdrop{
    position:absolute;
    inset:0;
    background:rgba(0,0,0,.58);
    backdrop-filter:blur(8px);
}

.modal-card{
    position:relative;
    z-index:1;
    width:min(760px, calc(100vw - 36px));
    margin:5vh auto 0;
    border-radius:28px;
    background:rgba(17,19,26,.84);
    border:1px solid rgba(255,255,255,.1);
    box-shadow:0 30px 90px rgba(0,0,0,.42);
    overflow:hidden;
}

.profile-modal-card{
    max-width:760px;
}

.power-modal-card{
    max-width:460px;
    padding:24px;
    text-align:center;
}

.modal-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:12px;
    padding:22px 22px 16px;
    border-bottom:1px solid rgba(255,255,255,.08);
}

.modal-title{
    font-size:22px;
    font-weight:800;
}

.modal-subtitle{
    margin-top:4px;
    font-size:13px;
    opacity:.72;
    line-height:1.5;
}

.modal-close{
    width:42px;
    height:42px;
    border:none;
    border-radius:14px;
    background:rgba(255,255,255,.08);
    color:#fff;
    font-size:24px;
    cursor:pointer;
}

.profile-form{
    padding:20px 22px 22px;
}

.profile-preview-row{
    display:flex;
    align-items:center;
    gap:14px;
    margin-bottom:18px;
    padding:14px;
    border-radius:18px;
    background:rgba(255,255,255,.05);
    border:1px solid rgba(255,255,255,.08);
}

.profile-preview-avatar{
    width:74px;
    height:74px;
    border-radius:22px;
    background:center/cover no-repeat;
    border:1px solid rgba(255,255,255,.14);
}

.profile-preview-meta strong{
    display:block;
    font-size:18px;
    font-weight:800;
}

.profile-preview-meta small{
    display:block;
    margin-top:4px;
    opacity:.7;
}

.form-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:14px;
}

.form-field{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.form-field span{
    font-size:13px;
    font-weight:700;
    opacity:.88;
}

.form-field input,
.form-field textarea,
.settings-select{
    width:100%;
    padding:13px 14px;
    color:#fff;
    border:none;
    border-radius:16px;
    background:rgba(255,255,255,.08);
    border:1px solid rgba(255,255,255,.08);
    outline:none;
}

.form-field input:focus,
.form-field textarea:focus,
.settings-select:focus{
    border-color:rgba(108,148,255,.8);
    box-shadow:0 0 0 3px rgba(77,130,255,.16);
}

.form-field-full{
    grid-column:1 / -1;
}

.form-status{
    min-height:22px;
    margin-top:14px;
    font-size:13px;
    opacity:.9;
}

.form-status.error{
    color:#ff9ca0;
}

.form-status.success{
    color:#9bf0be;
}

.modal-actions{
    margin-top:18px;
    display:flex;
    justify-content:flex-end;
    flex-wrap:wrap;
    gap:10px;
}

.center-actions{
    justify-content:center;
}

/* ================= POWER ================= */
.power-icon{
    width:70px;
    height:70px;
    margin:0 auto 14px;
    border-radius:22px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:rgba(255,255,255,.08);
    font-size:32px;
}

body.modal-open{
    overflow:hidden;
}

/* ================= BOOKMARKS ================= */
.bookmarks-grid-panel{
    padding:18px;
    overflow:auto;
}

.bookmarks-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(120px, 120px));
    gap:18px 20px;
    align-content:start;
}

.bookmark-item{
    padding:8px 6px;
    border-radius:0;
    background:transparent;
    border:none;
    cursor:pointer;
    text-align:center;
    transition:transform .16s ease, opacity .16s ease;
}

.bookmark-item:hover{
    transform:translateY(-2px);
    background:transparent;
    border:none;
}

.bookmark-icon{
    width:56px;
    height:56px;
    margin:0 auto 10px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:16px;
    background:transparent;
}

.bookmark-icon img{
    width:48px;
    height:48px;
    object-fit:contain;
}

.bookmark-add .bookmark-icon{
    font-size:30px;
    font-weight:700;
}

.bookmark-label{
    font-size:13px;
    line-height:1.45;
    text-align:center;
    word-break:break-word;
}

.bookmarks-detail{
    padding:20px;
    overflow:auto;
    border-left:1px solid rgba(255,255,255,.08);
    background:rgba(255,255,255,.04);
}

.bookmark-detail-icon{
    width:72px;
    height:72px;
    border-radius:20px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:rgba(255,255,255,.07);
    margin-bottom:14px;
}

.bookmark-detail-icon img{
    width:38px;
    height:38px;
}

.bookmark-detail-url{
    margin-top:12px;
    padding:12px;
    border-radius:16px;
    background:rgba(255,255,255,.05);
    font-size:13px;
    line-height:1.6;
    word-break:break-all;
}

.bookmark-detail-actions{
    margin-top:14px;
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

/* ================= NOTES ================= */
.notes-pro-sidebar{
    width:320px;
    height:100%;
    display:flex;
    flex-direction:column;
    border-right:1px solid rgba(255,255,255,.08);
    background:rgba(255,255,255,.04);
}

.notes-pro-topbar{
    padding:16px;
    border-bottom:1px solid rgba(255,255,255,.08);
}

.notes-new-btn{
    width:100%;
}

.notes-list{
    flex:1;
    overflow:auto;
    padding:14px;
}

.notes-list-empty{
    font-size:14px;
    opacity:.72;
    line-height:1.6;
}

.note-list-item{
    padding:14px;
    border-radius:18px;
    background:rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.08);
    cursor:pointer;
    transition:transform .16s ease, background .16s ease, border-color .16s ease;
}

.note-list-item + .note-list-item{
    margin-top:10px;
}

.note-list-item:hover{
    transform:translateY(-1px);
    background:rgba(255,255,255,.09);
}

.note-list-item.active{
    border-color:rgba(108,148,255,.8);
    background:rgba(108,148,255,.12);
}

.note-list-title{
    font-size:14px;
    font-weight:800;
    line-height:1.4;
}

.note-list-preview{
    margin-top:6px;
    font-size:12px;
    opacity:.72;
    line-height:1.5;
}

.note-list-time{
    margin-top:8px;
    font-size:11px;
    opacity:.58;
}

.notes-pro-main{
    flex:1;
    height:100%;
}

#notesApp .window-body{
    display:flex;
    height:calc(100% - 68px);
}

.notes-editor-wrap{
    height:100%;
    display:flex;
    flex-direction:column;
    gap:14px;
    padding:18px;
}

.note-title-input{
    width:100%;
    padding:14px 16px;
    font-size:24px;
    font-weight:800;
    color:#fff;
    border:none;
    outline:none;
    border-radius:20px;
    background:rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.08);
}

.notes-editor{
    flex:1;
    width:100%;
    resize:none;
    padding:18px;
    color:#fff;
    line-height:1.7;
    border:none;
    outline:none;
    border-radius:22px;
    background:rgba(255,255,255,.05);
    border:1px solid rgba(255,255,255,.08);
}

.save-indicator{
    font-size:12px;
    opacity:.76;
}

/* ================= SETTINGS ================= */
.settings-wrap{
    height:100%;
    overflow:auto;
    padding:18px;
}

.settings-grid{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:16px;
}

.settings-card{
    padding:18px;
    border-radius:24px;
    background:rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.08);
}

.settings-card-title{
    margin-bottom:14px;
    font-size:18px;
    font-weight:800;
}

.wallpaper-preview-box{
    margin-top:14px;
    border-radius:22px;
    overflow:hidden;
    border:1px solid rgba(255,255,255,.08);
}

.wallpaper-preview{
    width:100%;
    aspect-ratio:16/9;
    background:center/cover no-repeat;
}

.range-row{
    margin-top:4px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}

.range-meta{
    font-size:12px;
    opacity:.76;
}

.settings-card input[type="range"]{
    width:100%;
    margin-top:10px;
}

.settings-hint{
    margin-top:12px;
    font-size:12px;
    opacity:.7;
    line-height:1.6;
}

.settings-shortcuts,
.settings-actions{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}

/* ================= TRANSITION HELPERS ================= */
#lockScreen.screen-hidden,
#desktopScreen.screen-hidden{
    opacity:0;
    visibility:hidden;
    pointer-events:none;
}

#lockScreen.screen-visible,
#desktopScreen.screen-visible{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
}

/* ================= SCROLLBAR ================= */
::-webkit-scrollbar{
    width:10px;
    height:10px;
}

::-webkit-scrollbar-track{
    background:rgba(255,255,255,.04);
}

::-webkit-scrollbar-thumb{
    border-radius:999px;
    background:rgba(255,255,255,.16);
}

::-webkit-scrollbar-thumb:hover{
    background:rgba(255,255,255,.24);
}

/* ================= RESPONSIVE ================= */
@media (max-width:1100px){
    .start-menu-body{
        grid-template-columns:1fr;
    }

    .window-body{
        grid-template-columns:1fr;
    }

    .detail-panel,
    .bookmarks-detail{
        border-left:none;
        border-top:1px solid rgba(255,255,255,.08);
    }

    .settings-grid{
        grid-template-columns:1fr;
    }
}

@media (max-width:900px){
    .topbar{
        top:14px;
        left:14px;
        right:14px;
        gap:12px;
    }

    .topbar .avatar{
        width:56px;
        height:56px;
        border-radius:16px;
    }

    .time-box{
        min-width:0;
        padding:14px;
    }

    .topbar #time{
        font-size:34px;
    }

    .dock{
        gap:10px;
        padding:12px 14px;
        bottom:14px;
        width:calc(100vw - 18px);
        justify-content:center;
    }

    .dock-item{
        width:54px;
        height:54px;
        border-radius:18px;
    }

    .dock-item img{
        width:48px;
        height:48px;
    }

    .window{
        left:3vw !important;
        right:3vw;
        top:88px !important;
        width:94vw !important;
        height:calc(100vh - 170px) !important;
        transform:none !important;
        border-radius:22px;
    }

    .window-header{
        padding:14px;
        cursor:default;
    }

    .path-badge{
        max-width:180px;
    }

    .modal-card{
        width:calc(100vw - 20px);
        margin:20px auto 0;
        border-radius:22px;
    }

    .form-grid{
        grid-template-columns:1fr;
    }

    .notes-pro-sidebar{
        width:100%;
        height:240px;
        border-right:none;
        border-bottom:1px solid rgba(255,255,255,.08);
    }

    #notesApp .window-body{
        flex-direction:column;
    }

    .start-menu-pro{
        left:10px;
        top:84px;
        width:calc(100vw - 20px);
    }
}

@media (max-width:640px){
    .topbar{
        flex-direction:column;
        align-items:flex-start;
    }

    .time-box{
        width:100%;
        text-align:left;
    }

    .topbar #time{
        font-size:30px;
    }

    .start-menu-head{
        padding:16px;
    }

    .start-menu-body{
        padding:16px;
    }

    .power-btn{
        padding:11px 12px;
        font-size:13px;
    }

    .notes-editor-wrap,
    .settings-wrap,
    .gallery-grid,
    .bookmarks-grid-panel,
    .detail-panel,
    .bookmarks-detail{
        padding:14px;
    }

    .note-title-input{
        font-size:20px;
    }
}

/* ================= HIDE DOCK LOCKSCREEN ================= */
body:not(.desktop-ready) .dock,
body:not(.desktop-ready) #startMenu,
body:not(.desktop-ready) .window,
body:not(.desktop-ready) .modal-layer,
body:not(.desktop-ready) .image-viewer{
    display:none !important;
}

/* Chặn bôi đen toàn bộ UI */
html, body,
div, span, p, h1, h2, h3, h4, h5, h6,
button, a, img, label,
.window, .dock, .dock-item, .start-menu-pro, .topbar, .time-box,
.gallery-grid, .bookmarks-grid, .notes-list, .settings-wrap {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Nhưng vẫn cho phép chọn text trong vùng nhập */
input, textarea, [contenteditable="true"] {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}