@font-face {
    font-family: 'Azonix';
    src: url('https://db.onlinewebfonts.com/t/04e1f7fb2b58d60eb24df50a9807fa36.woff2') format('woff2');
}

:root {
    --pyp-blue: #65d6ff;
    --pyp-mint: #8dffcb;
    --pyp-rose: #ff8fb3;
    --glass-bg: rgba(20, 20, 20, 0.6);
    --glass-border: #333;
    --accent-main: #fff;
    --font-main: 'Rajdhani', sans-serif;
    --font-header: 'Azonix', 'Orbitron', sans-serif;
    --z-bg: 0;
    --z-snow: 1;
    --z-desktop: 10;
    --z-windows: 500;
    --z-dock: 1000;
    --z-triggers: 2000;
    --z-modal: 3000;
    --z-noti: 8000;
    --z-lock: 90000;
    --z-ciri: 95000;
    --z-boot: 99999;
    --bg-page: #000;
    --bg-window: rgba(15, 15, 15, 0.95);
    --dark-gray: #111;
    --mid-gray: #222;
    --user-gray: #333;
    --text-white: #fff;
    --text-muted: #888;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-drag: none;
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

::selection { background: #444; color: #fff; }
::-moz-selection { background: #444; color: #fff; }

body {
    background: radial-gradient(circle at 15% 10%, rgba(101,214,255,0.18), transparent 28%), radial-gradient(circle at 85% 18%, rgba(255,143,179,0.16), transparent 26%), #050607;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    font-family: var(--font-main);
    color: white;
}

#mobile-warning {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
}

#mobile-warning.show-warning { display: flex; }

.mobile-box {
    background: #111;
    border: 2px solid #333;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    max-width: 80%;
    box-shadow: 0 10px 40px rgba(255,255,255,0.05);
}

.mobile-box i { font-size: 3rem; color: #fff; margin-bottom: 15px; }
.mobile-box h2 { font-family: var(--font-header); font-size: 1.2rem; color: #fff; margin-bottom: 10px; }
.mobile-box p { color: #888; font-size: 1rem; font-weight: 600; }

#boot-layer {
    position: fixed; inset: 0; background: #000; z-index: var(--z-boot);
    display: none; transition: opacity 0.6s ease;
}

#boot-content { 
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    text-align: center; z-index: 2; width: 100%;
}

.boot-logo {
    font-family: var(--font-header);
    font-size: 3rem;
    color: #fff;
    letter-spacing: 10px;
    margin-bottom: 10px;
    text-shadow: 0 0 30px rgba(255,255,255,0.2);
}

.boot-logo-img {
    display: block;
    width: clamp(112px, 14vw, 176px);
    height: auto;
    margin: 0 auto 18px;
    filter: drop-shadow(0 24px 44px rgba(0,0,0,0.36));
}

.boot-sub {
    font-family: var(--font-main);
    color: #888;
    font-size: 1.2rem;
    letter-spacing: 4px;
    margin-bottom: 50px;
    text-transform: uppercase;
}

.boot__hint {
    margin-top: 20px; font-size: 0.8rem; color: #555;
}

#boot-btn {
    padding: 15px 50px;
    background: transparent;
    border: 1px solid #555;
    color: #fff;
    font-family: var(--font-header);
    font-size: 18px;
    cursor: pointer;
    letter-spacing: 2px;
    transition: 0.3s;
    border-radius: 4px;
    box-shadow: 0 0 15px rgba(255,255,255,0.1);
}

#boot-btn:hover { background: #fff; color: #000; box-shadow: 0 0 30px rgba(255,255,255,0.4); }

#boot-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    z-index: 1;
}

#bg-video, #bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: var(--z-bg);
    opacity: 0.9;
}

#snow-fx {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: var(--z-snow);
}

#lock-screen {
    position: fixed;
    inset: 0;
    z-index: var(--z-lock);
    background: #000;
    display: flex;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.6s cubic-bezier(0.7,0,0.3,1), opacity 0.4s;
}

#lock-screen.active { opacity: 1; pointer-events: all; transform: translateY(0); }
#lock-screen.slide-up { transform: translateY(-100%); opacity: 1; pointer-events: none; }

#lock-video, #lock-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

#lock-ui {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: 100%;
}

.lock-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-shadow: 0 5px 25px rgba(0,0,0,0.9);
}

.l-day, .l-date, .l-time {
    opacity: 0;
    transform: translateY(30px);
}

#lock-screen.active .l-day { animation: slideUpTxt 0.6s cubic-bezier(0.2,0.8,0.2,1) forwards 0.2s; }
#lock-screen.active .l-date { animation: slideUpTxt 0.6s cubic-bezier(0.2,0.8,0.2,1) forwards 0.35s; }
#lock-screen.active .l-time { animation: slideUpTxt 0.6s cubic-bezier(0.2,0.8,0.2,1) forwards 0.5s; }

@keyframes slideUpTxt {
    to { opacity: 1; transform: translateY(0); }
}

.l-day {
    width: min(520px, 78vw);
    height: clamp(74px, 15vw, 132px);
    margin: 0 0 12px 0;
    font-size: 0;
    color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    text-indent: -9999px;
    overflow: hidden;
    filter: drop-shadow(0 18px 34px rgba(0,0,0,0.76)) drop-shadow(0 0 14px rgba(255,255,255,0.12));
}
.l-date { font-family: var(--font-main); font-size: 1.3rem; letter-spacing: 4px; font-weight: 700; color: #fff; margin-bottom: 8px; text-transform: uppercase; }
.l-time { font-family: var(--font-main); font-size: 1.1rem; letter-spacing: 3px; font-weight: 700; color: #fff; }

#hud-top {
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 5;
    pointer-events: none;
    text-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

.hud-day {
    width: min(340px, 48vw);
    height: clamp(42px, 8vw, 78px);
    margin: 0 auto;
    font-size: 0;
    color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    text-indent: -9999px;
    overflow: hidden;
    opacity: 0.82;
    filter: drop-shadow(0 14px 28px rgba(0,0,0,0.72)) drop-shadow(0 0 10px rgba(255,255,255,0.10));
}

#right-sidebar {
    position: fixed;
    right: 25px;
    top: 8%;
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 50;
}

.sidebar__section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar__title {
    font-size: 12px;
    font-weight: 800;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
}

.sidebar__card {
    background: rgba(15, 15, 15, 0.75);
    backdrop-filter: blur(15px);
    border: 1px solid #333;
    border-radius: 14px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.sidebar__card:hover {
    background: rgba(30, 30, 30, 0.9);
    border-color: #fff;
    transform: translateX(-5px) scale(1.02);
}

.sidebar__info {
    display: flex;
    flex-direction: column;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar__info strong {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar__info small {
    font-size: 11px;
    color: #aaa;
    font-weight: 600;
}

#last-game-icon, #spotify-album-art {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.play-overlay {
    position: absolute;
    right: 15px;
    color: #fff;
    font-size: 16px;
    opacity: 0;
    transition: 0.3s;
}

.sidebar__card:hover .play-overlay {
    opacity: 1;
    transform: scale(1.2);
}

.txt-highlight { font-weight: bold; color: #fff; }
.sidebar__chevron { color: #888; }

#fps-counter { position: fixed; bottom: 24px; left: 24px; background: #111; border: 1px solid #333; padding: 6px 12px; border-radius: 8px; font-family: var(--font-main); font-size: 12px; font-weight: bold; color: #fff; z-index: 99999; display: flex; align-items: center; gap: 6px; box-shadow: 0 4px 15px rgba(0,0,0,0.9); }

#dock-container {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    height: 52px;
    background: rgba(10,10,10,0.8);
    backdrop-filter: blur(10px);
    border: 1px solid #333;
    border-radius: 18px;
    z-index: var(--z-dock);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    transition: transform 0.4s;
    padding: 0 15px;
}

.dock-hidden { transform: translate(-50%, 150%) !important; }

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

.dock-item:hover { background: rgba(255,255,255,0.1); transform: translateY(-5px); }
.dock-item img { width: 28px; height: 28px; object-fit: contain; border-radius: 6px; }
.dock-sep { width: 1px; height: 24px; background: #555; margin: 0 4px; }

.desktop-app {
    position: absolute;
    width: 80px;
    height: 95px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    z-index: var(--z-desktop);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), 
                width 0.3s ease, height 0.3s ease, 
                background 0.3s ease, box-shadow 0.3s ease;
}

.desktop-app:hover { transform: scale(1.05); }

.d-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    pointer-events: none;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.6));
    transition: all 0.3s;
}

.d-label {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    pointer-events: none;
    text-shadow: 0 2px 5px #000, 0 0 2px #000;
    width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.3s;
}

.name-hidden .d-label { opacity: 0 !important; display: none !important; }

.desktop-app.expanded-folder {
    transform: scale(1) !important;
    background: rgba(15, 15, 15, 0.98);
    border: 1px solid #444;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.9);
    cursor: default;
    z-index: 900 !important;
    padding: 15px;
    display: block; 
}

.folder-header {
    font-family: var(--font-main);
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 15px;
    border-bottom: 1px solid #333;
    padding-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.folder-header i { color: #888; transition: 0.2s; cursor: pointer; }
.folder-header i:hover { color: #fff; transform: scale(1.2); }

.folder-grid-expanded {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-height: 250px;
    overflow-y: auto;
}

.folder-grid-expanded::-webkit-scrollbar { width: 4px; }
.folder-grid-expanded::-webkit-scrollbar-thumb { background: #555; border-radius: 5px; }

.f-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.f-app:hover { transform: scale(1.1); }
.f-app img { width: 38px; height: 38px; border-radius: 8px; }
.f-app span { font-size: 11px; color: #ccc; max-width: 50px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center;}

.desktop-large-mode .desktop-app { width: 90px; height: 90px; }
.desktop-large-mode .d-icon { width: 70px; height: 70px; }
.desktop-large-mode .d-label { opacity: 0; pointer-events: none; }

.d-folder-grid {
    width: 50px;
    height: 50px;
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid #555;
    border-radius: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
    padding: 4px;
    pointer-events: none;
    backdrop-filter: blur(5px);
}

.desktop-large-mode .d-folder-grid { width: 70px; height: 70px; padding: 6px; gap: 4px; }
.d-folder-grid img { width: 100%; height: 100%; object-fit: contain; border-radius: 4px; }

#drag-proxy { position: fixed; z-index: 9999; pointer-events: none; opacity: 0.8; display: none; width: 50px; height: 50px; }
#drag-proxy img { width: 100%; height: 100%; object-fit: contain; border-radius: 12px; }
.hidden-badge { position: absolute; top: -5px; right: -5px; background: #fff; color: #000; font-weight: bold; font-size: 10px; width: 18px; height: 18px; border-radius: 50%; align-items: center; justify-content: center; z-index: 2; }

.os-menu {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: 550px;
    height: 600px;
    background: rgba(8, 9, 11, 0.62);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    z-index: var(--z-modal);
    display: none;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.2,0.8,0.2,1);
    flex-direction: column;
    padding: 25px;
    box-shadow: 0 24px 74px rgba(0,0,0,0.58), inset 0 1px 0 rgba(255,255,255,0.08);
    backdrop-filter: blur(26px) saturate(1.15);
    -webkit-backdrop-filter: blur(26px) saturate(1.15);
}

.os-menu.open { display: flex; opacity: 1; transform: translateX(-50%) translateY(0); }
.start-search-bar, .drawer-search-wrap { width: 100%; padding: 12px 15px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; color: white; font-family: var(--font-main); margin-bottom: 20px; display: flex; align-items: center; gap: 10px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.start-search-bar input, .drawer-search-input { background: transparent; border: none; color: white; width: 100%; outline: none; }
.start-search-bar input::placeholder, .drawer-search-input::placeholder { color: #666; }

.pinned-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.pinned-header h3 { font-size: 15px; color: #fff; font-weight: 600; }
.pinned-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 15px; margin-bottom: 30px; }
.pinned-item { display: flex; flex-direction: column; align-items: center; gap: 10px; cursor: pointer; padding: 12px; border-radius: 12px; transition: 0.2s; }
.pinned-item:hover { background: #222; }
.pinned-item img { width: 38px; height: 38px; object-fit: contain; border-radius: 10px; }
.pinned-item span { font-size: 12px; color: #aaa; }
.start-footer { margin-top: auto; padding-top: 15px; border-top: 1px solid rgba(255,255,255,0.14); display: flex; justify-content: space-between; align-items: center; }
.user-profile { display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 30px; height: 30px; background: #333; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.user-identity { display: flex; flex-direction: column; gap: 2px; line-height: 1.1; }
.user-role { font-size: 12px; color: #ddd; }
.user-tagline { font-size: 11px; color: rgba(255,255,255,0.55); font-weight: 600; letter-spacing: 0.02em; }
.power-btn { cursor: pointer; color: #fff; font-size: 18px; }

#app-drawer {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(20px);
    z-index: var(--z-modal);
    display: none;
    opacity: 0;
    transition: 0.3s ease;
    padding: 80px;
    align-content: flex-start;
    border: none; width: 100%; height: 100%;
}

#app-drawer.open { display: block; opacity: 1; }
.drawer-search-wrap { max-width: 600px; margin: 0 auto 40px auto; }
.drawer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 30px; max-width: 900px; margin: 0 auto; }
.drawer-item { display: flex; flex-direction: column; align-items: center; gap: 10px; cursor: pointer; transition: 0.2s; }
.drawer-item:hover { transform: scale(1.1); }
.drawer-item img { width: 60px; height: 60px; border-radius: 16px; object-fit: contain; }
.drawer-item span { color: #fff; font-size: 13px; font-weight: 600; }

.window {
    position: fixed;
    inset: 0;
    background: #000;
    border: none;
    display: flex;
    flex-direction: column;
    z-index: var(--z-windows);
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.window.active { opacity: 1; pointer-events: auto; transform: scale(1); z-index: var(--z-windows); }
.window.minimized {
    transform: translateY(24px) scale(0.96) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}
.win-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 45px;
    background: #111;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 160;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.header-visible .win-header { transform: translateY(0); }
.win-hover-zone {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 45px;
    z-index: 150;
    cursor: grab;
    background: transparent;
    touch-action: none;
    pointer-events: auto;
}
.win-title { font-family: var(--font-header); font-size: 13px; color: #aaa; letter-spacing: 2px; }
.win-controls { display: flex; gap: 10px; align-items: center; position: relative; z-index: 180; }
.win-btn {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    color: transparent;
}
.win-btn:hover { color: #fff; }
.btn-min { background: #444; border: 1px solid #666; }
.btn-min:hover { background: #888; transform: scale(1.15); }
.btn-min::before { content: ''; width: 8px; height: 2px; background: currentColor; border-radius: 2px; }
.btn-full { background: #4f4f4f; border: 1px solid #777; }
.btn-full:hover { background: #d8d8d4; color: #050505; transform: scale(1.15); }
.btn-full::before {
    content: '';
    width: 8px;
    height: 8px;
    border: 2px solid currentColor;
    border-radius: 2px;
}
.btn-close { background: #555; border: 1px solid #777; }
.btn-close:hover { transform: scale(1.15); box-shadow: 0 0 8px #fff; background: #fff; color: #000; }
.btn-close::before, .btn-close::after { content: ''; position: absolute; width: 8px; height: 2px; background: currentColor; border-radius: 2px; }
.btn-close::before { transform: rotate(45deg); }
.btn-close::after { transform: rotate(-45deg); }
.win-body { width: 100%; height: 100%; overflow: hidden; position: relative; background: #000; }
iframe { width: 100%; height: 100%; border: none; display: block; }

.window.window-floating {
    inset: auto !important;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(0,0,0,0.62), inset 0 1px 0 rgba(255,255,255,0.08);
    transition: left 0.28s cubic-bezier(.16,1,.3,1), top 0.28s cubic-bezier(.16,1,.3,1), width 0.28s cubic-bezier(.16,1,.3,1), height 0.28s cubic-bezier(.16,1,.3,1), transform 0.28s cubic-bezier(.16,1,.3,1), opacity 0.28s;
}

.window.window-floating .win-header {
    position: absolute;
    transform: translateY(-100%);
    cursor: grab;
    user-select: none;
    touch-action: none;
    -webkit-user-select: none;
    background: rgba(5,5,6,0.72);
    backdrop-filter: blur(24px) saturate(1.18);
    -webkit-backdrop-filter: blur(24px) saturate(1.18);
}

.window.window-floating.header-visible .win-header,
.window.window-floating.dragging-window .win-header {
    transform: translateY(0);
}

.window.window-floating.dragging-window {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    box-shadow: 0 34px 94px rgba(0,0,0,0.72), 0 0 0 1px rgba(255,255,255,0.18);
}

.window.window-floating.dragging-window .win-header { cursor: grabbing; }
.window.window-floating .win-body { height: 100%; }
.window.window-floating.snap-left { border-radius: 0 16px 16px 0; }
.window.window-floating.snap-right { border-radius: 16px 0 0 16px; }
.window.window-floating.window-fullscreen {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-top: 0;
}
.window.window-floating.window-fullscreen .btn-full::before {
    width: 9px;
    height: 9px;
    box-shadow: -4px 4px 0 -2px currentColor;
}

.snap-preview {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 50vw;
    z-index: 9999998;
    pointer-events: none;
    border: 1px solid rgba(255,255,255,0.24);
    border-radius: 0;
    background: rgba(255,255,255,0.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 24px 70px rgba(0,0,0,0.42);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.snap-preview.active { opacity: 1; transform: scale(1); }
.snap-preview-left { left: 0; }
.snap-preview-right { right: 0; }

#window-drag-shield {
    position: fixed;
    inset: 0;
    z-index: 9999997;
    display: none;
    cursor: grabbing;
    background: transparent;
    pointer-events: auto;
    touch-action: none;
    user-select: none;
}

.window.dragging-window,
.window.dragging-window * {
    cursor: grabbing !important;
}

#window-drag-shield.active { display: block; }

#top-trigger { position: fixed; top: 0; left: 0; width: 100%; height: 20px; z-index: var(--z-triggers); pointer-events: none !important; }
#bottom-trigger { position: fixed; bottom: 0; left: 0; width: 100%; height: 30px; z-index: var(--z-triggers); }

/* Final window movement fix: title bars must behave like real draggable desktop windows. */
.window.window-floating:not(.window-fullscreen):not(.snap-left):not(.snap-right) {
  inset: auto !important;
}
.window.window-floating.dragging-window,
.window.window-floating.dragging-window * {
  transition: none !important;
  animation: none !important;
}
.window.window-floating.dragging-window iframe {
  pointer-events: none !important;
}
body.native-window-dragging,
body.native-window-dragging * {
  cursor: grabbing !important;
  user-select: none !important;
}
body.native-window-dragging iframe {
  pointer-events: none !important;
}

.os-context-menu {
    position: fixed;
    display: none;
    background: #111;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 8px;
    min-width: 220px;
     z-index: 9999999 !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.9);
    font-family: var(--font-main);
    list-style: none; margin: 0;
}
.ctx-item { padding: 10px 15px; color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 12px; transition: 0.2s; border-radius: 6px; }
.ctx-item i { color: #888; font-size: 16px; transition: 0.2s; width: 20px; text-align: center; }
.ctx-item:hover { background: #222; }
.ctx-item:hover i { color: #fff; }
.ctx-separator { height: 1px; background: #333; margin: 6px 0; }
.ctx-row { display: flex; gap: 8px; padding: 0 4px; }
.ctx-btn { flex: 1; background: #222; border: 1px solid #444; color: #ccc; border-radius: 6px; padding: 8px 0; cursor: pointer; transition: 0.2s; display: flex; justify-content: center; align-items: center; }
.ctx-btn:hover { background: #fff; color: #000; border-color: #fff; }

#ciri-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); opacity: 0; pointer-events: none; transition: opacity 0.5s ease; z-index: var(--z-ciri); }
#ciri-window {
    position: fixed;
    bottom: 8vh;
    left: 50%;
    transform: translate(-50%, 40px) scale(0.92);
    width: 90%;
    max-width: 740px;
    height: 85vh;
    max-height: 820px;
    background: #111;
    border: 1px solid #333;
    border-radius: 32px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.9), inset 0 1px 0 rgba(255,255,255,0.05);
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.2,0.8,0.2,1);
    z-index: calc(var(--z-ciri) + 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    box-sizing: border-box;
    overflow: hidden;
    color: white;
}
body.ciri-active #ciri-backdrop { opacity: 1; pointer-events: all; }
body.ciri-active #ciri-window { opacity: 1; pointer-events: all; transform: translate(-50%, 0) scale(1); }
#ciri-boot-screen { position: absolute; inset: 0; background: #000; display: none; flex-direction: column; align-items: center; justify-content: center; z-index: 10000; transition: opacity 0.8s ease, filter 0.8s ease; border-radius: 32px; }
.boot-ciri { font-size: 42px; font-weight: 800; color: #fff; font-family: monospace; border-right: 3px solid #fff; white-space: nowrap; overflow: hidden; width: 0; letter-spacing: -1px; }
.boot-ciri.typing { animation: typeCiri 0.5s steps(5, end) forwards, blinkCiri 0.8s step-end infinite; }
.boot-sub { font-size: 12px; font-weight: 700; color: #888; letter-spacing: 3px; margin-top: 16px; opacity: 0; transform: translateY(20px) scale(0.95); transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.boot-sub.show { opacity: 1; transform: translateY(0) scale(1); }
.boot-loader { margin-top: 40px; display: flex; flex-direction: column; align-items: center; opacity: 0; transition: opacity 0.6s ease; }
.spinner { width: 24px; height: 24px; border: 3px solid #333; border-top-color: #fff; border-radius: 50%; animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite; margin-bottom: 16px; }
.boot-status { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 8px; letter-spacing: 0.5px; }
.boot-warning { font-size: 11px; color: #666; max-width: 280px; text-align: center; line-height: 1.5; font-weight: 500; }
@keyframes typeCiri { from { width: 0; } to { width: 115px; } }
@keyframes blinkCiri { 50% { border-color: transparent; } }
@keyframes spin { to { transform: rotate(360deg); } }

#status-pill { background: #1a1a1a; border-radius: 20px; padding: 8px 18px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid #333; font-size: 11px; font-weight: 700; color: #fff; letter-spacing: 0.5px; margin-bottom: 10px; flex-shrink: 0; text-transform: uppercase; }
.status-icon svg { width: 14px; height: 14px; }
.secure { color: #fff; } .secure-svg { stroke: #fff; }
.unstable { color: #888; } .unstable-svg { stroke: #888; }
#chat-history { width: 100%; display: flex; flex-direction: column; gap: 24px; overflow-y: auto; overflow-x: hidden; flex-grow: 1; padding: 20px 10px; }
#chat-history::-webkit-scrollbar { width: 4px; }
#chat-history::-webkit-scrollbar-thumb { background: #444; border-radius: 10px; }
.message { max-width: 85%; padding: 18px 24px; border-radius: 18px; font-size: 15px; line-height: 1.6; word-wrap: break-word; font-weight: 500; animation: slideUp 0.4s cubic-bezier(0.2,0.8,0.2,1); }
.message p { margin: 0 0 12px 0; } .message p:last-child { margin: 0; }
.message pre { background: #0a0a0a; padding: 12px; border-radius: 10px; overflow-x: auto; border: 1px solid #222; }
.message code { font-family: monospace; font-size: 13.5px; color: #ccc; }
.message.user { background: #333; color: #fff; align-self: flex-end; border-bottom-right-radius: 6px; border: 1px solid #444; }
.message.ciri { background: #1a1a1a; color: #fff; align-self: flex-start; position: relative; padding-right: 24px; border-bottom-left-radius: 6px; border: 1px solid #333; }
details.thought-process { background: #0a0a0a; border-radius: 12px; padding: 12px; margin-bottom: 16px; font-size: 13.5px; border: 1px solid #222; }
details.thought-process summary { cursor: pointer; font-weight: 600; color: #888; display: flex; align-items: center; gap: 8px; outline: none; }
details.thought-process summary:hover { color: #fff; }
details.thought-process summary::before { content: "🧠"; font-size: 15px; }
.thought-content { margin-top: 12px; color: #888; font-family: monospace; line-height: 1.6; border-top: 1px solid #222; padding-top: 12px; white-space: pre-wrap; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

#bottom-wrapper { width: 100%; display: flex; align-items: center; gap: 12px; margin-top: 10px; position: relative; flex-shrink: 0; background: #1a1a1a; padding: 12px 16px; border-radius: 24px; border: 1px solid #333; }
.icon-btn { background: none; border: none; color: #888; cursor: pointer; display: flex; justify-content: center; align-items: center; padding: 8px; border-radius: 50%; transition: 0.2s; }
.icon-btn:hover { background: #333; color: #fff; }
#chat-input { flex: 1; background: transparent; border: none; color: #fff; font-size: 15.5px; font-family: var(--font-main); padding: 0 5px; outline: none; resize: none; max-height: 120px; line-height: 1.4; font-weight: 600; }
#chat-input::placeholder { color: #888; font-weight: 500; }
#mode-toggle { background: #222; color: #888; font-size: 11px; font-weight: 800; letter-spacing: 0.5px; cursor: pointer; padding: 8px 14px; border-radius: 14px; transition: all 0.2s; border: 1px solid #444; }
#mode-toggle:hover { background: #fff; color: #000; border-color: #fff; }
#mode-toggle.live-active { background: #fff; color: #000; border-color: #fff; animation: pulseWhite 2s infinite; }
@keyframes pulseWhite { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.4); } 70% { box-shadow: 0 0 0 8px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
#action-orb { width: 48px; height: 48px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #fff 0%, #aaa 20%, #444 60%, #111 100%); box-shadow: 0 8px 20px rgba(0,0,0,0.8), inset -4px -4px 10px rgba(0,0,0,0.9), inset 2px 2px 8px rgba(255,255,255,0.4); transition: all 0.3s cubic-bezier(0.2,0.8,0.2,1); flex-shrink: 0; cursor: pointer; }
#action-orb:hover { transform: scale(1.08); box-shadow: 0 12px 25px rgba(255,255,255,0.1); }
#action-orb.thinking { animation: orbAlive 2s infinite ease-in-out; filter: contrast(1.2) brightness(1.1); }
@keyframes orbAlive { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255,255,255,0.1); } 50% { transform: scale(1.05); box-shadow: 0 0 20px 5px rgba(255,255,255,0.3); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255,255,255,0.1); } }
#img-preview-box { position: absolute; bottom: 85px; left: 10px; background: #1a1a1a; padding: 6px; border-radius: 12px; display: none; align-items: center; gap: 10px; box-shadow: 0 8px 25px rgba(0,0,0,0.8); border: 1px solid #333; }
#img-preview-box img { height: 44px; border-radius: 8px; }
#img-preview-box span { color: #fff; font-size: 13px; cursor: pointer; padding-right: 10px; font-weight: 800; }
.hidden-media { display: none; }
.hidden-input { display: none; }

#restore-btn { position: fixed; bottom: 24px; right: 0; background: #111; border: 1px solid #444; border-right: none; padding: 14px; border-radius: 16px 0 0 16px; color: #fff; cursor: pointer; transform: translateX(100%); transition: transform 0.5s cubic-bezier(0.2,0.8,0.2,1); z-index: 9998; display: flex; align-items: center; justify-content: center; }
#restore-btn.visible { transform: translateX(0); }
#restore-btn svg { width: 20px; height: 20px; fill: currentColor; }

#pyp-media-panel { position: fixed; bottom: 24px; right: 24px; width: 320px; background: #111; border: 1px solid #333; border-radius: 20px; padding: 16px; box-shadow: 0 24px 48px rgba(0,0,0,0.9), inset 0 1px 1px rgba(255,255,255,0.05); color: #fff; transform: translateY(150%) scale(0.9); opacity: 0; transition: transform 0.6s cubic-bezier(0.2,0.8,0.2,1), opacity 0.5s ease; z-index: var(--z-noti); display: flex; flex-direction: column; gap: 12px; pointer-events: none; }
#pyp-media-panel.active { transform: translateY(0) scale(1); opacity: 1; pointer-events: all; }
#pyp-media-panel.minimized { transform: translateX(150%) scale(0.9); opacity: 0; pointer-events: none; }
.window-actions { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: -4px; }
.action-btn { background: #222; border: 1px solid #444; width: 24px; height: 24px; border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; color: #888; transition: all 0.2s ease; }
.action-btn:hover { background: #fff; color: #000; }
.action-btn svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.player-main { display: flex; align-items: center; gap: 14px; }
.album-art { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; box-shadow: 0 4px 12px rgba(0,0,0,0.8); border: 1px solid #333; }
.track-info { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.title { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; margin-bottom: 2px; }
.artist { font-size: 13px; color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#visualizer { width: 100%; height: 14px; margin-top: 6px; }
.time-wrapper { display: flex; align-items: center; gap: 10px; font-size: 11px; color: #888; font-variant-numeric: tabular-nums; font-weight: 600; }
.progress-hit-area { flex-grow: 1; height: 16px; display: flex; align-items: center; cursor: pointer; outline: none; }
.progress-bg { width: 100%; height: 5px; background: #333; border-radius: 5px; position: relative; overflow: hidden; pointer-events: none; }
.progress-fill { position: absolute; top: 0; left: 0; height: 100%; width: 0%; background: #fff; border-radius: 5px; }
.controls { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 4px; }
.ctrl-btn { background: none; border: none; padding: 0; cursor: pointer; display: flex; justify-content: center; align-items: center; color: #888; transition: transform 0.15s ease, color 0.2s; }
.ctrl-btn:hover { color: #fff; }
.ctrl-btn:active { transform: scale(0.85); }
.ctrl-btn svg { width: 20px; height: 20px; fill: currentColor; }
.play-pause-btn { background: #fff; color: #000; width: 36px; height: 36px; border-radius: 50%; }
.play-pause-btn:hover { color: #000; transform: scale(1.05); background: #ccc; }
.play-pause-btn:active { transform: scale(0.95); }
.hidden-svg { display: none; }
.visible-svg { display: block; }

.modal__backdrop {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 999999;
  align-items: center; justify-content: center; backdrop-filter: blur(10px); border: none;
  width: 100%; height: 100%;
}
.modal__content {
  background: #111; border: 1px solid #333; border-radius: 16px; padding: 30px;
  width: 400px; max-width: 90%; font-family: var(--font-main);
}
.modal__header {
  margin-bottom: 15px; border-bottom: 1px solid #333; padding-bottom: 10px; font-family: 'Orbitron', sans-serif; color: #fff;
}
.modal__list {
  color: #ccc; font-size: 14px; margin-left: 20px; line-height: 1.8; margin-bottom: 20px;
}
.modal__btn {
  width: 100%; padding: 12px; background: #fff; color: #000; border: none; border-radius: 8px; font-weight: bold; cursor: pointer;
}

#wallpaper-menu { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(0.95); width: 800px; max-height: 80vh; background: #111; border: 1px solid #333; border-radius: 16px; z-index: var(--z-modal); display: none; opacity: 0; transition: all 0.3s ease; flex-direction: column; padding: 30px; box-shadow: 0 30px 80px rgba(0,0,0,0.9); }
#wallpaper-menu.open { display: flex; opacity: 1; transform: translate(-50%,-50%) scale(1); }
.wp-modal-header { border-bottom: 1px solid #333; padding-bottom: 15px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; }
.wp-modal-header h2 { font-family: 'Orbitron'; color: #fff; letter-spacing: 2px; margin: 0; }
.wp-controls-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.segmented-control { display: flex; background: #222; border: 1px solid #333; border-radius: 8px; padding: 4px; gap: 4px; border-style: solid; }
.segmented-control label { flex: 1; text-align: center; cursor: pointer; }
.segmented-control input[type="radio"] { display: none; }
.segmented-control span { display: block; padding: 8px 16px; border-radius: 6px; font-family: var(--font-main); font-weight: bold; color: #888; transition: 0.3s; }
.segmented-control input[type="radio"]:checked + span { background: #fff; color: #000; }
.loop-toggle-container { display: flex; align-items: center; gap: 10px; background: #222; border: 1px solid #333; padding: 6px 16px; border-radius: 8px; }
.loop-label { color: #fff; font-weight: bold; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }

.switch { position: relative; display: inline-block; width: 40px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background-color: #444; transition: .3s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px; background-color: #fff; transition: .3s; border-radius: 50%; }
input:checked + .slider { background-color: #fff; }
input:checked + .slider:before { transform: translateX(20px); background-color: #000; }

.wp-grid-container { overflow-y: auto; flex: 1; padding-right: 10px; }
.wp-grid-container::-webkit-scrollbar { width: 6px; }
.wp-grid-container::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }
.wp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 30px; }
.wp-section-title { font-size: 12px; color: #888; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1px; }
.wp-card { background: #000; border: 1px solid #333; border-radius: 10px; overflow: hidden; cursor: pointer; transition: 0.3s; position: relative; aspect-ratio: 16/9; }
.wp-card:hover { border-color: #fff; transform: translateY(-4px); }
.wp-card.active-wp { border: 2px solid #fff; box-shadow: 0 0 15px rgba(255,255,255,0.3); }
.wp-card video, .wp-card img { width: 100%; height: 100%; object-fit: cover; }
.wp-info { position: absolute; bottom: 0; left: 0; width: 100%; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); padding: 10px; font-size: 12px; font-weight: bold; text-shadow: 0 1px 3px black; color: #fff; }
.wp-locked { filter: grayscale(1) brightness(0.4); pointer-events: none; border-style: dashed; }
.close-icon { cursor: pointer; font-size: 1.5rem; color: #fff; }

#toast-container { position: fixed; bottom: 70px; right: 20px; z-index: 99999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast-notification { background: #111; border: 1px solid #333; border-radius: 8px; width: 340px; padding: 15px; color: #fff; box-shadow: 0 8px 25px rgba(0,0,0,0.9); transform: translateX(120%); transition: transform 0.4s cubic-bezier(0.2,0.8,0.2,1); pointer-events: auto; cursor: pointer; }
.toast-notification.show { transform: translateX(0); }
.toast-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.toast-app-info { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #888; font-weight: 700; }
.toast-icon { width: 16px; height: 16px; background: #333; border-radius: 4px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 10px; }
.toast-close { color: #888; font-size: 14px; cursor: pointer; transition: 0.2s; }
.toast-close:hover { color: #fff; }
.toast-title { font-family: var(--font-main); font-weight: bold; font-size: 15px; margin-bottom: 4px; letter-spacing: 0.5px; }
.toast-body { font-family: var(--font-main); font-size: 13px; color: #ccc; line-height: 1.4; }

.faq-box {
  background: #111; border: 1px solid #333; border-radius: 16px; padding: 30px;
  width: 500px; max-width: 90%; font-family: var(--font-main); color: #fff;
}
.faq-header {
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid #333; padding-bottom: 15px; margin-bottom: 20px;
}
.faq-header h2 { font-family: 'Orbitron', sans-serif; letter-spacing: 1px; }
.faq-item { margin-bottom: 20px; }
.faq-item h3 { font-size: 16px; color: #fff; margin-bottom: 5px; }
.faq-item p { font-size: 13px; color: #aaa; line-height: 1.5; }

.config__main-header {
  color: #fff; border-bottom: 2px solid #333; padding-bottom: 10px; font-weight: 700; font-family: 'Orbitron', sans-serif; letter-spacing: 1px;
}
.config__category {
  color: #fff; font-weight: bold; margin-top: 25px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.config__card {
  background: #111; border: 1px solid #333; padding: 15px; border-radius: 10px; margin-bottom: 12px;
  display: flex; justify-content: space-between; align-items: center; transition: 0.2s;
}
.config__card--clickable { cursor: pointer; }
.config__card--clickable:hover { background: #1a1a1a; border-color: #555; transform: translateX(5px); }
.config__info { display: flex; gap: 15px; align-items: center; }
.config__icon { color: #888; font-size: 1.5rem; width: 30px; text-align: center; }
.config__text { display: flex; flex-direction: column; }
.config__text strong { color: #fff; font-size: 15px; }
.config__text small { color: #888; font-size: 13px; }
.config__select {
  background: #222; color: #fff; border: 1px solid #444; padding: 8px; border-radius: 6px; outline: none; font-family: inherit;
}
.config__input-sm {
  width: 40px; height: 30px; color: #fff; background: #222; border: 1px solid #555; text-align: center;
  font-size: 1.2rem; font-weight: bold; outline: none; border-radius: 4px;
}
.config__input-sm:focus, .config__select:focus { border-color: #888; }


/* PypOS polish */
#pyp-media-panel, #restore-btn, #toast-container, .toast-notification { display: none !important; }
#dock-container, .os-menu, .sidebar__card, .window, #wallpaper-menu, #ciri-window { border-color: rgba(255,255,255,0.14); box-shadow: 0 24px 70px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.08); }
#dock-container { background: rgba(7, 10, 14, 0.72); border-radius: 14px; }
.dock-item:hover, .pinned-item:hover, .ctx-item:hover { background: rgba(101,214,255,0.14); }
.boot-logo, .hud-day, .l-day { text-shadow: 0 0 24px rgba(101,214,255,0.35), 0 12px 36px rgba(0,0,0,0.7); }
#fps-counter { display: none !important; }


/* Restored PypOS motion */
#right-sidebar .sidebar__section { animation: pypFloatIn 520ms cubic-bezier(.2,.8,.2,1) both; }
#right-sidebar .sidebar__section:nth-child(2) { animation-delay: 90ms; }
.dock-item { animation: pypDockPop 420ms cubic-bezier(.2,.8,.2,1) both; }
.dock-item:nth-child(2n) { animation-delay: 35ms; }
.window.active { animation: pypWindowOpen 320ms cubic-bezier(.2,.8,.2,1) both; }
.wp-card { animation: pypCardRise 360ms cubic-bezier(.2,.8,.2,1) both; }
.sidebar__card, .pinned-item, .drawer-item, .wp-card { transition: transform .24s cubic-bezier(.2,.8,.2,1), border-color .24s, background .24s, box-shadow .24s; }
.sidebar__card:hover, .wp-card:hover { transform: translateY(-5px) scale(1.015); box-shadow: 0 18px 45px rgba(0,0,0,.55), 0 0 0 1px rgba(101,214,255,.18); }
.dock-item:hover { transform: translateY(-7px) scale(1.08); }
@keyframes pypFloatIn { from { opacity:0; transform: translateX(28px); filter: blur(8px); } to { opacity:1; transform: translateX(0); filter: blur(0); } }
@keyframes pypDockPop { from { opacity:0; transform: translateY(18px) scale(.82); } to { opacity:1; transform: translateY(0) scale(1); } }
@keyframes pypWindowOpen { from { opacity:0; transform: translateY(18px) scale(.97); } to { opacity:1; transform: translateY(0) scale(1); } }
@keyframes pypCardRise { from { opacity:0; transform: translateY(12px); } to { opacity:1; transform: translateY(0); } }

/* Warm PypOS boot screen */
#boot-layer {
    background:
        linear-gradient(135deg, rgba(255, 238, 181, 0.92), rgba(255, 184, 159, 0.88) 42%, rgba(150, 205, 255, 0.9)),
        #f7d39c;
    overflow: hidden;
}

#boot-layer::before {
    content: "";
    position: absolute;
    inset: -18%;
    background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.58), transparent 26%),
        radial-gradient(circle at 82% 24%, rgba(255,126,117,0.42), transparent 28%),
        radial-gradient(circle at 42% 84%, rgba(84,154,255,0.32), transparent 32%);
    animation: pypBootDrift 10s ease-in-out infinite alternate;
}

#boot-layer::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.16) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: radial-gradient(circle at center, black, transparent 72%);
    -webkit-mask-image: radial-gradient(circle at center, black, transparent 72%);
    opacity: 0.32;
}

#boot-content {
    width: min(620px, calc(100% - 40px));
    padding: 46px 44px 38px;
    border-radius: 30px;
    background: rgba(255,255,255,0.42);
    border: 1px solid rgba(255,255,255,0.62);
    box-shadow: 0 28px 90px rgba(95, 54, 38, 0.24), inset 0 1px 0 rgba(255,255,255,0.72);
    backdrop-filter: blur(22px) saturate(1.18);
    -webkit-backdrop-filter: blur(22px) saturate(1.18);
    animation: pypBootCardIn 700ms cubic-bezier(.2,.8,.2,1) both;
}

.boot-logo {
    font-family: var(--font-main);
    font-size: clamp(3.6rem, 9vw, 6.4rem);
    line-height: 0.9;
    font-weight: 800;
    letter-spacing: 0;
    color: #202124;
    margin: 0 0 12px;
    text-transform: none;
    text-shadow: 0 12px 34px rgba(255,255,255,0.62);
}

.boot-logo.boot-logo-img {
    width: clamp(130px, 16vw, 210px);
    height: auto;
    margin: 0 auto 18px;
    color: transparent;
    text-shadow: none;
    filter: drop-shadow(0 22px 38px rgba(0,0,0,0.36));
}

#boot-layer .boot-sub {
    color: #6d4b3d;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    margin: 0 0 34px;
    opacity: 0.82;
}

#boot-btn {
    width: min(360px, 100%);
    padding: 16px 28px;
    background: linear-gradient(135deg, #ffffff, #fff2c4 48%, #ffd1c7);
    border: 1px solid rgba(255,255,255,0.7);
    color: #202124;
    font-family: var(--font-main);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0;
    border-radius: 999px;
    box-shadow: 0 16px 34px rgba(121, 75, 48, 0.18), inset 0 1px 0 rgba(255,255,255,0.9);
}

#boot-btn:hover {
    background: linear-gradient(135deg, #fff, #e8f0fe 45%, #e6f4ea);
    color: #202124;
    transform: translateY(-2px) scale(1.015);
    box-shadow: 0 22px 44px rgba(66, 83, 105, 0.22);
}

#boot-btn:active {
    transform: translateY(0) scale(0.99);
}

.boot__hint {
    margin-top: 18px;
    font-size: 0.82rem;
    color: rgba(32,33,36,0.58);
    font-weight: 700;
    letter-spacing: 0.03em;
}

@keyframes pypBootCardIn {
    from { opacity: 0; transform: translate(-50%, -44%) scale(0.96); filter: blur(8px); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: blur(0); }
}

@keyframes pypBootDrift {
    from { transform: translate3d(-2%, -1%, 0) rotate(-2deg) scale(1); }
    to { transform: translate3d(2%, 1%, 0) rotate(2deg) scale(1.05); }
}


/* PypOS black/white theme system */
:root[data-theme="black"], body[data-theme="black"] {
  --theme-surface: rgba(4, 5, 7, 0.88);
  --theme-surface-2: rgba(12, 13, 16, 0.9);
  --theme-border: rgba(255,255,255,0.12);
  --theme-text: #f7f7f4;
  --theme-muted: #96989e;
}
:root[data-theme="white"], body[data-theme="white"] {
  --theme-surface: rgba(255, 255, 255, 0.86);
  --theme-surface-2: rgba(247, 248, 250, 0.92);
  --theme-border: rgba(30, 34, 40, 0.14);
  --theme-text: #17191d;
  --theme-muted: #60656f;
}
body[data-theme="black"] {
  background: radial-gradient(circle at 18% 8%, rgba(110,18,16,0.24), transparent 28%), radial-gradient(circle at 82% 12%, rgba(46,46,56,0.28), transparent 30%), #020203;
  color: var(--theme-text);
}
body[data-theme="white"] {
  background: radial-gradient(circle at 16% 12%, rgba(255,214,143,0.42), transparent 28%), radial-gradient(circle at 84% 16%, rgba(176,211,255,0.42), transparent 30%), #f5f6f8;
  color: var(--theme-text);
}
body[data-theme="black"] #dock-container,
body[data-theme="black"] .os-menu,
body[data-theme="black"] .sidebar__card,
body[data-theme="black"] .window,
body[data-theme="black"] #wallpaper-menu,
body[data-theme="black"] #ciri-window,
body[data-theme="black"] .os-context-menu,
body[data-theme="black"] .config__card,
body[data-theme="black"] .faq-box,
body[data-theme="black"] .modal__content {
  background: rgba(4, 5, 7, 0.62) !important;
  border-color: var(--theme-border) !important;
  color: var(--theme-text) !important;
  box-shadow: 0 24px 70px rgba(0,0,0,0.62), inset 0 1px 0 rgba(255,255,255,0.06) !important;
}
body[data-theme="white"] #dock-container,
body[data-theme="white"] .os-menu,
body[data-theme="white"] .sidebar__card,
body[data-theme="white"] .window,
body[data-theme="white"] #wallpaper-menu,
body[data-theme="white"] #ciri-window,
body[data-theme="white"] .os-context-menu,
body[data-theme="white"] .config__card,
body[data-theme="white"] .faq-box,
body[data-theme="white"] .modal__content {
  background: rgba(255, 255, 255, 0.68) !important;
  border-color: var(--theme-border) !important;
  color: var(--theme-text) !important;
  box-shadow: 0 24px 70px rgba(80,92,114,0.18), inset 0 1px 0 rgba(255,255,255,0.8) !important;
}
body[data-theme="white"] .sidebar__title,
body[data-theme="white"] .sidebar__info small,
body[data-theme="white"] .config__text small,
body[data-theme="white"] .drawer-item span,
body[data-theme="white"] .pinned-item span,
body[data-theme="white"] .ctx-item,
body[data-theme="white"] .win-title,
body[data-theme="white"] .config__text strong,
body[data-theme="white"] .pinned-header h3,
body[data-theme="white"] .user-role,
body[data-theme="white"] .user-tagline,
body[data-theme="white"] .wp-modal-header h2,
body[data-theme="white"] .close-icon,
body[data-theme="white"] .txt-highlight,
body[data-theme="white"] .sidebar__info strong {
  color: var(--theme-text) !important;
  text-shadow: none !important;
}
body[data-theme="white"] .start-search-bar,
body[data-theme="white"] .drawer-search-wrap,
body[data-theme="white"] .config__select,
body[data-theme="white"] .config__input-sm,
body[data-theme="white"] input[type="text"] {
  background: rgba(255,255,255,0.82) !important;
  color: #17191d !important;
  border-color: rgba(30,34,40,0.14) !important;
}
body[data-theme="black"] .start-search-bar,
body[data-theme="black"] .drawer-search-wrap,
body[data-theme="black"] .config__select,
body[data-theme="black"] .config__input-sm {
  background: rgba(0,0,0,0.46) !important;
  color: #f7f7f4 !important;
}
body[data-theme="white"] .dock-item:hover,
body[data-theme="white"] .pinned-item:hover,
body[data-theme="white"] .ctx-item:hover,
body[data-theme="white"] .sidebar__card:hover {
  background: rgba(30,34,40,0.08) !important;
}
body[data-theme="black"] #boot-layer {
  background: radial-gradient(circle at 20% 8%, rgba(112,18,15,.34), transparent 28%), linear-gradient(135deg, #060607, #140606 48%, #020203) !important;
}
body[data-theme="black"] #boot-content {
  background: rgba(7,8,10,0.76) !important;
  border-color: rgba(255,255,255,0.12) !important;
}
body[data-theme="black"] .boot-logo,
body[data-theme="black"] #boot-layer .boot-sub,
body[data-theme="black"] .boot__hint {
  color: #f7f7f4 !important;
}
body[data-theme="black"] #boot-btn {
  background: linear-gradient(135deg, #15171c, #050506) !important;
  color: #f7f7f4 !important;
  border-color: rgba(255,255,255,0.16) !important;
}
body[data-theme="white"] #boot-layer {
  background: linear-gradient(135deg, rgba(255, 238, 181, 0.92), rgba(255, 184, 159, 0.88) 42%, rgba(150, 205, 255, 0.9)), #f7d39c !important;
}
.window, #dock-container, .sidebar__card, .os-menu, #wallpaper-menu, .drawer-item, .pinned-item, .wp-card, .desktop-app, #boot-content {
  animation-duration: 560ms !important;
  animation-timing-function: cubic-bezier(.16, 1, .3, 1) !important;
}
.window.active { animation: pypUltraWindow 520ms cubic-bezier(.16,1,.3,1) both !important; }
#dock-container { animation: pypUltraDock 700ms cubic-bezier(.16,1,.3,1) both; }
.os-menu.open, #app-drawer.open, #wallpaper-menu.open { animation: pypUltraPanel 520ms cubic-bezier(.16,1,.3,1) both; }
@keyframes pypUltraWindow { from { opacity:0; transform: translateY(30px) scale(.94); filter: blur(14px); } to { opacity:1; transform: translateY(0) scale(1); filter: blur(0); } }
@keyframes pypUltraDock { from { opacity:0; transform: translate(-50%, 36px) scale(.88); filter: blur(12px); } to { opacity:1; transform: translate(-50%, 0) scale(1); filter: blur(0); } }
@keyframes pypUltraPanel { from { opacity:0; transform: translateX(-50%) translateY(34px) scale(.92); filter: blur(12px); } to { opacity:1; transform: translateX(-50%) translateY(0) scale(1); filter: blur(0); } }

/* Matte/gloss black reset: no cyber colors, no mixed light leaks */
body,
body[data-theme="black"] {
  background:
    radial-gradient(circle at 16% 10%, rgba(255,255,255,0.13), transparent 26%),
    radial-gradient(circle at 74% 4%, rgba(255,255,255,0.055), transparent 30%),
    linear-gradient(135deg, #000 0%, #050506 42%, #0b0b0d 68%, #000 100%) !important;
  color: #f7f7f4;
}

#boot-layer,
body[data-theme="black"] #boot-layer {
  background:
    radial-gradient(circle at 18% 9%, rgba(255,255,255,0.18), transparent 22%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.045), transparent 38%),
    linear-gradient(145deg, #000 0%, #050506 44%, #101012 64%, #000 100%) !important;
}

#boot-layer::before,
body[data-theme="black"] #boot-layer::before {
  background:
    radial-gradient(circle at 22% 12%, rgba(255,255,255,0.16), transparent 24%),
    radial-gradient(circle at 72% 18%, rgba(255,255,255,0.07), transparent 26%) !important;
  opacity: 0.78;
  animation: pypBlackLightDrift 12s ease-in-out infinite alternate !important;
}

#boot-layer::after,
body[data-theme="black"] #boot-layer::after {
  background-image:
    linear-gradient(rgba(255,255,255,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.055) 1px, transparent 1px) !important;
  opacity: 0.16 !important;
}

#boot-content,
body[data-theme="black"] #boot-content {
  background: linear-gradient(145deg, rgba(2,2,3,0.90), rgba(12,12,14,0.78)) !important;
  border: 1px solid rgba(255,255,255,0.20) !important;
  box-shadow:
    0 34px 110px rgba(0,0,0,0.82),
    inset 0 1px 0 rgba(255,255,255,0.16),
    inset 0 -1px 0 rgba(255,255,255,0.045) !important;
  backdrop-filter: blur(26px) saturate(1.04) !important;
  -webkit-backdrop-filter: blur(26px) saturate(1.04) !important;
}

.boot-logo,
body[data-theme="black"] .boot-logo {
  color: #f5f5f2 !important;
  text-shadow:
    0 0 18px rgba(255,255,255,0.42),
    0 12px 42px rgba(0,0,0,0.94) !important;
}

#boot-layer .boot-sub,
body[data-theme="black"] #boot-layer .boot-sub,
.boot__hint,
body[data-theme="black"] .boot__hint {
  color: rgba(247,247,244,0.68) !important;
  text-shadow: none !important;
}

#boot-btn,
body[data-theme="black"] #boot-btn {
  background: linear-gradient(145deg, rgba(22,23,25,0.96), rgba(3,3,4,0.96)) !important;
  border: 1px solid rgba(255,255,255,0.22) !important;
  color: #f8f8f5 !important;
  box-shadow:
    0 18px 45px rgba(0,0,0,0.62),
    inset 0 1px 0 rgba(255,255,255,0.14) !important;
}

#boot-btn:hover,
body[data-theme="black"] #boot-btn:hover {
  background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(196,196,190,0.92)) !important;
  color: #050505 !important;
  box-shadow:
    0 22px 58px rgba(255,255,255,0.12),
    0 18px 56px rgba(0,0,0,0.72) !important;
}

#dock-container,
.os-menu,
.sidebar__card,
.window,
#wallpaper-menu,
#ciri-window,
.os-context-menu,
.config__card,
.faq-box,
.modal__content,
body[data-theme="black"] #dock-container,
body[data-theme="black"] .os-menu,
body[data-theme="black"] .sidebar__card,
body[data-theme="black"] .window,
body[data-theme="black"] #wallpaper-menu,
body[data-theme="black"] #ciri-window,
body[data-theme="black"] .os-context-menu,
body[data-theme="black"] .config__card,
body[data-theme="black"] .faq-box,
body[data-theme="black"] .modal__content {
  background: linear-gradient(145deg, rgba(4,4,5,0.82), rgba(16,16,18,0.64)) !important;
  border-color: rgba(255,255,255,0.14) !important;
  box-shadow:
    0 24px 74px rgba(0,0,0,0.68),
    inset 0 1px 0 rgba(255,255,255,0.08) !important;
}

.dock-item:hover,
.pinned-item:hover,
.ctx-item:hover,
body[data-theme="black"] .dock-item:hover,
body[data-theme="black"] .pinned-item:hover,
body[data-theme="black"] .ctx-item:hover,
body[data-theme="black"] .sidebar__card:hover {
  background: rgba(255,255,255,0.10) !important;
}

.sidebar__card:hover,
.wp-card:hover {
  box-shadow:
    0 18px 45px rgba(0,0,0,.68),
    0 0 0 1px rgba(255,255,255,.16) !important;
}

@keyframes pypBlackLightDrift {
  from { transform: translate3d(-1.2%, -0.6%, 0) scale(1); }
  to { transform: translate3d(1.2%, 0.6%, 0) scale(1.035); }
}

:root,
:root[data-theme="black"],
body[data-theme="black"] {
  --pyp-blue: #f4f4f1;
  --pyp-mint: #d6d6d0;
  --pyp-rose: #ffffff;
}

.hud-day,
.l-day {
  text-shadow:
    0 0 20px rgba(255,255,255,0.24),
    0 12px 38px rgba(0,0,0,0.82) !important;
}

/* Windows 12-style acrylic pass: clearer, more transparent, still black */
html {
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

#bg-video,
#bg-img,
#lock-video,
#lock-img {
  image-rendering: auto;
  transform: translateZ(0) scale(1.002);
  backface-visibility: hidden;
  will-change: transform;
  filter: contrast(1.045) saturate(1.08) brightness(1.02);
}

img,
video,
iframe {
  image-rendering: auto;
  backface-visibility: hidden;
}

#dock-container,
.os-menu,
#app-drawer,
#wallpaper-menu,
.window.window-floating,
.sidebar__card,
#ciri-window,
.os-context-menu,
.modal__content,
.faq-box {
  background: linear-gradient(145deg, rgba(4,4,5,0.44), rgba(18,18,20,0.26)) !important;
  border-color: rgba(255,255,255,0.18) !important;
  box-shadow:
    0 26px 82px rgba(0,0,0,0.54),
    inset 0 1px 0 rgba(255,255,255,0.16),
    inset 0 -1px 0 rgba(255,255,255,0.035) !important;
  backdrop-filter: blur(36px) saturate(1.28) contrast(1.02) !important;
  -webkit-backdrop-filter: blur(36px) saturate(1.28) contrast(1.02) !important;
}

.win-header,
.start-search-bar,
.drawer-search-wrap,
.config__card,
.pinned-item,
.drawer-item,
.wp-card,
.loop-toggle-container,
.segmented-control {
  background: rgba(5,5,6,0.32) !important;
  border-color: rgba(255,255,255,0.14) !important;
  backdrop-filter: blur(24px) saturate(1.18) !important;
  -webkit-backdrop-filter: blur(24px) saturate(1.18) !important;
}

#dock-container {
  background: rgba(3,3,4,0.34) !important;
}

#app-drawer {
  background: rgba(0,0,0,0.42) !important;
}

.window.window-floating .win-body,
.window.window-floating iframe {
  background: rgba(0,0,0,0.08) !important;
}

.pinned-item:hover,
.drawer-item:hover,
.dock-item:hover,
.sidebar__card:hover,
.wp-card:hover,
.ctx-item:hover {
  background: rgba(255,255,255,0.12) !important;
  border-color: rgba(255,255,255,0.24) !important;
}

.dock-item img,
.pinned-item img,
.drawer-item img,
.desktop-app img,
.wp-card img,
.wp-card video {
  image-rendering: auto;
  filter: contrast(1.04) saturate(1.05);
}

body[data-theme="white"] #dock-container,
body[data-theme="white"] .os-menu,
body[data-theme="white"] #app-drawer,
body[data-theme="white"] #wallpaper-menu,
body[data-theme="white"] .window.window-floating,
body[data-theme="white"] .sidebar__card,
body[data-theme="white"] #ciri-window,
body[data-theme="white"] .os-context-menu,
body[data-theme="white"] .modal__content,
body[data-theme="white"] .faq-box {
  background: rgba(255,255,255,0.46) !important;
  backdrop-filter: blur(36px) saturate(1.22) !important;
  -webkit-backdrop-filter: blur(36px) saturate(1.22) !important;
}

/* Contained acrylic menus: no bottom bleed, transparent everywhere */
#wallpaper-menu {
  width: min(1280px, calc(100vw - 72px)) !important;
  height: min(820px, calc(100vh - 78px)) !important;
  max-height: calc(100vh - 96px) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  display: none;
  background: linear-gradient(145deg, rgba(5,5,6,0.22), rgba(16,16,18,0.10)) !important;
  backdrop-filter: blur(56px) saturate(1.36) contrast(1.05) !important;
  -webkit-backdrop-filter: blur(56px) saturate(1.36) contrast(1.05) !important;
}

#wallpaper-menu.open {
  display: flex !important;
}

.wp-modal-header,
.wp-controls-row {
  flex: 0 0 auto;
}

.wp-grid-container {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 12px !important;
  padding-bottom: 18px !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.wp-grid {
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)) !important;
  gap: 18px !important;
  margin-bottom: 22px !important;
}

.wp-card {
  min-height: 0;
  background: rgba(0,0,0,0.10) !important;
  border-color: rgba(255,255,255,0.16) !important;
  box-shadow: 0 18px 42px rgba(0,0,0,0.30), inset 0 1px 0 rgba(255,255,255,0.10) !important;
}

.wp-card video,
.wp-card img {
  display: block;
  object-fit: cover !important;
  transform: translateZ(0) scale(1.002);
}

#app-drawer {
  background: rgba(0,0,0,0.18) !important;
  backdrop-filter: blur(38px) saturate(1.25) brightness(0.9) !important;
  -webkit-backdrop-filter: blur(38px) saturate(1.25) brightness(0.9) !important;
}

.os-menu,
#start-menu {
  background: linear-gradient(145deg, rgba(5,5,6,0.34), rgba(12,12,14,0.18)) !important;
  backdrop-filter: blur(44px) saturate(1.32) contrast(1.04) !important;
  -webkit-backdrop-filter: blur(44px) saturate(1.32) contrast(1.04) !important;
}

.drawer-search-wrap,
.start-search-bar,
.pinned-item,
.drawer-item {
  background: rgba(0,0,0,0.12) !important;
}

@media (max-width: 820px) {
  #wallpaper-menu {
    width: calc(100vw - 28px) !important;
    height: calc(100vh - 56px) !important;
    padding: 20px !important;
  }
  .wp-controls-row {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }
}

/* Center full-screen drawers/dialogs precisely */
#app-drawer {
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: clamp(28px, 7vh, 80px) clamp(24px, 6vw, 80px) !important;
  box-sizing: border-box !important;
  overflow: hidden auto !important;
  border: 0 !important;
}

#app-drawer.open {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

#app-drawer::backdrop {
  background: transparent !important;
}

.drawer-search-wrap {
  width: min(720px, 100%) !important;
  max-width: 720px !important;
  margin: 0 auto clamp(28px, 5vh, 48px) auto !important;
  flex: 0 0 auto;
}

.drawer-grid {
  width: min(980px, 100%) !important;
  max-width: 980px !important;
  margin: 0 auto !important;
  justify-content: center;
  justify-items: center;
  align-content: start;
}

.drawer-item {
  width: 96px;
  min-height: 100px;
  justify-content: flex-start;
}

#hud-top {
  left: 50% !important;
  right: auto !important;
  width: min(420px, 60vw);
  transform: translateX(-50%) !important;
  display: flex;
  justify-content: center;
}

.hud-day {
  width: 100% !important;
  background-position: center center !important;
}

.hud-day,
.l-day {
  background-size: cover !important;
}

/* Full-screen drawer must never inherit centered modal transforms */
#app-drawer,
#app-drawer.open {
  transform: none !important;
}

#app-drawer.open {
  animation: pypDrawerAcrylicIn 360ms cubic-bezier(.16,1,.3,1) both !important;
}

@keyframes pypDrawerAcrylicIn {
  from { opacity: 0; filter: blur(10px); }
  to { opacity: 1; filter: blur(0); }
}

/* Final acrylic cleanup: remove app tile plates, enlarge day mark */
.drawer-item,
.pinned-item,
.desktop-app,
body[data-theme="black"] .drawer-item,
body[data-theme="black"] .pinned-item,
body[data-theme="black"] .desktop-app {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.drawer-item:hover,
.pinned-item:hover,
.desktop-app:hover,
body[data-theme="black"] .drawer-item:hover,
body[data-theme="black"] .pinned-item:hover,
body[data-theme="black"] .desktop-app:hover {
  background: rgba(255,255,255,0.055) !important;
  border: 0 !important;
  box-shadow: none !important;
}

.drawer-item img,
.pinned-item img,
.desktop-app img {
  background: transparent !important;
  box-shadow: none !important;
}

#app-drawer {
  background: rgba(0,0,0,0.08) !important;
  backdrop-filter: blur(52px) saturate(1.34) brightness(0.96) !important;
  -webkit-backdrop-filter: blur(52px) saturate(1.34) brightness(0.96) !important;
}

.os-menu,
#start-menu,
#wallpaper-menu {
  background: linear-gradient(145deg, rgba(5,5,6,0.22), rgba(20,20,22,0.08)) !important;
  border-color: rgba(255,255,255,0.16) !important;
  backdrop-filter: blur(54px) saturate(1.36) brightness(0.94) !important;
  -webkit-backdrop-filter: blur(54px) saturate(1.36) brightness(0.94) !important;
}

.start-search-bar,
.drawer-search-wrap {
  background: rgba(0,0,0,0.20) !important;
}

#hud-top {
  top: 10.2% !important;
  width: min(680px, 54vw) !important;
}

.hud-day {
  height: clamp(82px, 8vw, 112px) !important;
  opacity: 0.96 !important;
  background-size: auto clamp(430px, 30vw, 560px) !important;
  background-position: center center !important;
  image-rendering: auto;
  transform: translateZ(0);
  backface-visibility: hidden;
  filter: drop-shadow(0 18px 34px rgba(0,0,0,0.58)) drop-shadow(0 0 12px rgba(255,255,255,0.10)) !important;
}

.l-day {
  width: min(760px, 84vw) !important;
  height: clamp(100px, 17vw, 178px) !important;
  opacity: 0.95;
}

/* Transparent desktop widgets */
#desktop-widgets {
  position: fixed;
  left: 76px;
  top: 116px;
  width: min(430px, 34vw);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  z-index: 22;
  pointer-events: none;
}
.desk-widget {
  min-height: 118px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255,255,255,.10), rgba(255,255,255,.025));
  color: #fff;
  box-shadow: 0 24px 70px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter: blur(34px) saturate(1.22);
  -webkit-backdrop-filter: blur(34px) saturate(1.22);
  animation: widgetRise .7s cubic-bezier(.16,1,.3,1) both;
}
.desk-widget:nth-child(2) { animation-delay: .06s; }
.desk-widget:nth-child(3) { animation-delay: .12s; }
.desk-widget:nth-child(4) { animation-delay: .18s; }
.desk-widget span {
  display: block;
  color: rgba(255,255,255,.62);
  font: 800 11px var(--font-main);
  text-transform: uppercase;
  letter-spacing: .18em;
  margin-bottom: 12px;
}
.desk-widget strong {
  display: block;
  font: 900 clamp(20px, 2.2vw, 34px) var(--font-header);
  letter-spacing: 0;
  line-height: 1;
}
.desk-widget small {
  display: block;
  margin-top: 11px;
  color: rgba(255,255,255,.56);
  font: 700 13px var(--font-main);
}
.desk-widget--clock { grid-column: span 2; min-height: 150px; }
.desk-widget--clock strong { font-size: clamp(44px, 5vw, 74px); }
@keyframes widgetRise { from { opacity:0; transform:translateY(18px) scale(.96); filter:blur(12px); } to { opacity:1; transform:none; filter:blur(0); } }
body:has(.window.active:not(.minimized)) #desktop-widgets { opacity: .42; transform: scale(.98); transition: opacity .28s ease, transform .28s ease; }

/* PypSettings template overhaul */
.config__main-header {
  border: 0 !important;
  font-size: clamp(34px, 5vw, 62px) !important;
  letter-spacing: -0.04em !important;
  margin-bottom: 20px !important;
}
.config__category {
  margin-top: 26px !important;
  border: 0 !important;
  color: rgba(255,255,255,.70) !important;
  letter-spacing: .18em !important;
}
.config__card {
  min-height: 88px !important;
  border-radius: 24px !important;
  background: linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.028)) !important;
  border-color: rgba(255,255,255,.15) !important;
  backdrop-filter: blur(26px) saturate(1.18) !important;
  -webkit-backdrop-filter: blur(26px) saturate(1.18) !important;
  box-shadow: 0 22px 68px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.10) !important;
}
.config__card:hover { transform: translateY(-3px) !important; border-color: rgba(255,255,255,.28) !important; }
@media (max-width: 980px) { #desktop-widgets { width: calc(100vw - 130px); grid-template-columns: 1fr; } .desk-widget--clock { grid-column: auto; } }

/* Hard fix: app windows must be draggable, not pinned to the corner */
.win-hover-zone { display: none !important; pointer-events: none !important; }
.window.window-floating {
  min-width: min(760px, calc(100vw - 40px));
  min-height: min(520px, calc(100vh - 110px));
}
.window.window-floating .win-header,
.window.header-visible .win-header {
  transform: translateY(0) !important;
  cursor: grab !important;
  pointer-events: auto !important;
}
.window.dragging-window .win-header { cursor: grabbing !important; }
.window.window-floating .win-body {
  padding-top: 45px;
  box-sizing: border-box;
}
.window.window-floating iframe {
  height: 100%;
}
.window.window-fullscreen {
  left: 0 !important;
  top: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
}
.window.window-fullscreen .win-body {
  padding-top: 45px;
}

/* Keep desktop widgets from covering wallpaper picker or app windows */
body:has(#wallpaper-menu.open) #desktop-widgets,
body:has(.window.active:not(.minimized)) #desktop-widgets {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateX(-24px) scale(.96) !important;
}
#desktop-widgets {
  left: max(116px, 6.5vw) !important;
  top: 118px !important;
  width: min(390px, calc(100vw - 180px)) !important;
}

/* Wallpaper menu stays inside the visible viewport and scrolls internally */
#wallpaper-menu {
  top: 50% !important;
  width: min(1360px, calc(100vw - 120px)) !important;
  height: min(720px, calc(100vh - 150px)) !important;
  max-height: calc(100vh - 150px) !important;
  overflow: hidden !important;
}
#wallpaper-menu .wp-grid-container {
  min-height: 0 !important;
  overflow-y: auto !important;
  padding-bottom: 34px !important;
}
#wallpaper-menu .wp-card {
  aspect-ratio: 16 / 9 !important;
}

#bg-video, #bg-img, #lock-video, #lock-img {
  object-fit: cover !important;
  width: 100% !important;
  height: 100% !important;
}

/* Final wallpaper modal centering fix: keep animation from pushing it below viewport */
#wallpaper-menu,
dialog#wallpaper-menu {
  position: fixed !important;
  left: 50% !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  transform: translate(-50%, -50%) scale(.985) !important;
  width: min(1280px, calc(100vw - 180px)) !important;
  height: min(650px, calc(100vh - 210px)) !important;
  max-width: calc(100vw - 180px) !important;
  max-height: calc(100vh - 210px) !important;
  padding: 26px 28px 22px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
#wallpaper-menu.open,
dialog#wallpaper-menu.open {
  display: flex !important;
  transform: translate(-50%, -50%) scale(1) !important;
  animation: pypWallpaperModalIn 360ms cubic-bezier(.16,1,.3,1) both !important;
}
@keyframes pypWallpaperModalIn {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 26px)) scale(.96); filter: blur(10px); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: blur(0); }
}
#wallpaper-menu .wp-modal-header {
  flex: 0 0 auto !important;
  margin-bottom: 16px !important;
  padding-bottom: 14px !important;
}
#wallpaper-menu .wp-controls-row {
  flex: 0 0 auto !important;
  margin-bottom: 16px !important;
}
#wallpaper-menu .wp-grid-container {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 0 12px 28px 0 !important;
  scrollbar-gutter: stable !important;
}
#wallpaper-menu .wp-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
  margin-bottom: 18px !important;
}
#wallpaper-menu .wp-card {
  aspect-ratio: 16 / 9 !important;
  min-height: 0 !important;
}
#wallpaper-menu .wp-card:hover {
  transform: translateY(-2px) scale(1.01) !important;
}
@media (max-width: 1200px) {
  #wallpaper-menu, dialog#wallpaper-menu {
    width: calc(100vw - 110px) !important;
    max-width: calc(100vw - 110px) !important;
  }
  #wallpaper-menu .wp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 820px) {
  #wallpaper-menu, dialog#wallpaper-menu {
    width: calc(100vw - 32px) !important;
    height: calc(100vh - 96px) !important;
    max-width: calc(100vw - 32px) !important;
    max-height: calc(100vh - 96px) !important;
    padding: 18px !important;
  }
  #wallpaper-menu .wp-grid { grid-template-columns: 1fr !important; }
}

/* Movable desktop widgets */
#desktop-widgets { display: none !important; }
.desktop-widget-item {
  width: 220px !important;
  height: auto !important;
  min-height: 132px !important;
  align-items: stretch !important;
  cursor: grab !important;
  z-index: calc(var(--z-desktop) + 1) !important;
}
.desktop-widget-item:active { cursor: grabbing !important; }
.desktop-widget-card {
  width: 100%;
  min-height: 132px;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.16);
  background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(12,12,14,.20));
  color: #fff;
  box-shadow: 0 24px 70px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter: blur(34px) saturate(1.24);
  -webkit-backdrop-filter: blur(34px) saturate(1.24);
  box-sizing: border-box;
  user-select: none;
}
.desktop-widget-card .widget-grip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  color: rgba(255,255,255,.68);
  font: 800 11px var(--font-main);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.desktop-widget-card .widget-grip i { font-size: 15px; color: rgba(255,255,255,.86); }
.desktop-widget-card strong {
  display: block;
  font: 900 34px/0.96 var(--font-header);
  letter-spacing: 0;
  color: #fff;
}
.desktop-widget-card small {
  display: block;
  margin-top: 12px;
  color: rgba(255,255,255,.62);
  font: 700 13px var(--font-main);
}
.desktop-widget-clock strong { font-size: 48px; }
.widget-picker-menu.widget-shelf {
  position: fixed !important;
  left: 74px !important;
  top: 24px !important;
  bottom: 24px !important;
  z-index: 600000;
  width: min(390px, calc(100vw - 98px));
  display: none;
  padding: 14px !important;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 22px;
  background:
    radial-gradient(circle at 15% 0%, rgba(255,255,255,.18), transparent 28%),
    linear-gradient(145deg, rgba(12,12,13,.62), rgba(0,0,0,.34)) !important;
  box-shadow: 0 30px 90px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter: blur(34px) saturate(1.18);
  -webkit-backdrop-filter: blur(34px) saturate(1.18);
  color: white;
  animation: widgetShelfIn .28s cubic-bezier(.2,.9,.2,1) both;
}
.widget-shelf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 6px 6px 14px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.widget-shelf-head strong {
  display: block;
  font: 900 24px/1 var(--font-header);
  letter-spacing: 0;
}
.widget-shelf-head span {
  display: block;
  margin-top: 7px;
  color: rgba(255,255,255,.58);
  font: 700 12px var(--font-main);
}
.widget-shelf-close {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  background: rgba(255,255,255,.09);
  color: #fff;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease;
}
.widget-shelf-close:hover { background: rgba(255,255,255,.16); transform: scale(1.05); }
.widget-shelf-list {
  height: calc(100% - 78px);
  overflow: auto;
  padding: 14px 4px 4px;
  scrollbar-width: thin;
}
.widget-shelf-group { margin: 0 0 18px; }
.widget-shelf-group h4 {
  margin: 0 0 8px;
  padding: 0 6px;
  color: rgba(255,255,255,.5);
  font: 900 10px var(--font-main);
  letter-spacing: .18em;
  text-transform: uppercase;
}
.widget-choice {
  width: 100%;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 7px 0;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,.13), rgba(255,255,255,.045));
  color: #fff;
  cursor: grab;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
  touch-action: none;
}
.widget-choice:hover {
  transform: translateX(4px);
  border-color: rgba(255,255,255,.22);
  background: linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,.07));
}
.widget-choice.dragging {
  cursor: grabbing;
  transform: scale(.98);
  opacity: .65;
}
.widget-choice i {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(255,255,255,.11);
  color: rgba(255,255,255,.92);
  font-size: 16px;
}
.widget-choice span {
  flex: 1;
  min-width: 0;
}
.widget-choice b {
  display: block;
  font: 900 14px var(--font-main);
  color: rgba(255,255,255,.94);
}
.widget-choice small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: rgba(255,255,255,.56);
  font: 700 11px var(--font-main);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.widget-choice em {
  color: rgba(255,255,255,.42);
  font: 900 10px var(--font-main);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-style: normal;
}
.widget-drag-preview {
  position: fixed;
  z-index: 800000;
  width: 252px;
  pointer-events: none;
  opacity: .86;
  transform: scale(.98);
  filter: drop-shadow(0 24px 50px rgba(0,0,0,.45));
}
.widget-drag-preview.drop-ready {
  opacity: 1;
  transform: scale(1.02);
}
.widget-drag-preview .desktop-widget-card {
  width: 252px;
  min-height: 116px;
  animation: none;
}
@keyframes widgetShelfIn {
  from { opacity: 0; transform: translateX(-18px) scale(.98); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@media (max-width: 720px) {
  .widget-picker-menu.widget-shelf {
    left: 12px !important;
    right: 12px !important;
    top: 16px !important;
    bottom: 16px !important;
    width: auto;
  }
}

/* Fullscreen apps plus reliable split screen */
.window.window-fullscreen,
.window.window-floating.snap-left,
.window.window-floating.snap-right {
  min-width: 0 !important;
  min-height: 0 !important;
}
.window.window-floating.snap-left,
.window.window-floating.snap-right {
  width: 50vw !important;
  height: 100vh !important;
  top: 0 !important;
}
.window.window-floating.snap-left { left: 0 !important; }
.window.window-floating.snap-right { left: 50vw !important; }
.window.window-floating.dragging-window {
  min-width: min(520px, calc(100vw - 32px)) !important;
}

/* 4K-style quality pass: cleaner day art, sharper media, no blurry day crop */
#bg-video, #bg-img, #lock-video, #lock-img {
  object-fit: cover !important;
  object-position: center center !important;
  image-rendering: auto !important;
  filter: contrast(1.07) saturate(1.08) brightness(1.03) !important;
  transform: translateZ(0) scale(1.004) !important;
}
#hud-top {
  top: 9.5% !important;
  width: min(560px, 48vw) !important;
}
.hud-day,
.l-day {
  background-size: min(560px, 48vw) min(560px, 48vw) !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  image-rendering: auto !important;
  -ms-interpolation-mode: bicubic;
  transform: translateZ(0);
  backface-visibility: hidden;
  filter:
    contrast(1.12)
    drop-shadow(0 18px 34px rgba(0,0,0,.62))
    drop-shadow(0 0 18px rgba(255,255,255,.16)) !important;
}
.hud-day {
  width: min(560px, 48vw) !important;
  height: clamp(92px, 7.8vw, 132px) !important;
  opacity: .98 !important;
}
.l-day {
  width: min(920px, 86vw) !important;
  height: clamp(112px, 15vw, 190px) !important;
  background-size: min(920px, 86vw) min(920px, 86vw) !important;
}
.desktop-widget-item.widget-live-drag {
  transition: none !important;
  transform: scale(1.035) !important;
  z-index: 950 !important;
}
.desktop-widget-item.widget-live-drag .desktop-widget-card {
  box-shadow: 0 34px 94px rgba(0,0,0,.58), inset 0 1px 0 rgba(255,255,255,.18) !important;
  border-color: rgba(255,255,255,.30) !important;
}

/* Widget repair + stronger motion pass */
.widget-picker-menu.widget-shelf {
  animation: pypShelfBloom .42s cubic-bezier(.16,1,.3,1) both !important;
  transform-origin: left center;
}
.widget-shelf-list {
  overscroll-behavior: contain;
}
.widget-choice {
  animation: pypWidgetChoiceIn .38s cubic-bezier(.16,1,.3,1) both;
}
.widget-choice:nth-of-type(2n) { animation-delay: .025s; }
.widget-choice:nth-of-type(3n) { animation-delay: .05s; }
.widget-choice:hover {
  transform: translateX(8px) scale(1.025) !important;
  border-color: rgba(255,255,255,.28) !important;
  box-shadow: 0 18px 44px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.18);
}
.widget-choice:hover i {
  animation: pypWidgetIconPulse .7s cubic-bezier(.16,1,.3,1) both;
}
.widget-choice:active,
.widget-choice.dragging {
  transform: translateX(3px) scale(.965) !important;
  filter: brightness(1.12);
}
.widget-drag-preview {
  transition: transform .12s ease, opacity .12s ease, filter .12s ease;
}
.widget-drag-preview.drop-ready {
  transform: scale(1.045) rotate(.35deg);
  filter: drop-shadow(0 30px 70px rgba(0,0,0,.62)) brightness(1.08);
}
.widget-drag-preview.drop-ready .desktop-widget-card {
  animation: pypDropPulse .65s ease-in-out infinite alternate;
}
.desktop-widget-item {
  animation: pypWidgetLand .48s cubic-bezier(.16,1,.3,1) both;
}
.desktop-widget-item:hover .desktop-widget-card {
  transform: translateY(-5px) scale(1.035);
  border-color: rgba(255,255,255,.30);
  box-shadow: 0 34px 92px rgba(0,0,0,.54), inset 0 1px 0 rgba(255,255,255,.18);
}
.desktop-widget-card {
  transition: transform .22s cubic-bezier(.16,1,.3,1), border-color .22s ease, box-shadow .22s ease, filter .22s ease;
}
@keyframes pypShelfBloom {
  from { opacity: 0; transform: translateX(-34px) scale(.94); filter: blur(14px); }
  62% { opacity: 1; transform: translateX(6px) scale(1.012); filter: blur(0); }
  to { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); }
}
@keyframes pypWidgetChoiceIn {
  from { opacity: 0; transform: translateX(-16px) scale(.96); filter: blur(8px); }
  to { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); }
}
@keyframes pypWidgetLand {
  from { opacity: 0; transform: translateY(18px) scale(.88); filter: blur(8px); }
  65% { opacity: 1; transform: translateY(-6px) scale(1.04); filter: blur(0); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes pypWidgetIconPulse {
  0% { transform: scale(1) rotate(0deg); }
  45% { transform: scale(1.18) rotate(-4deg); }
  100% { transform: scale(1) rotate(0deg); }
}
@keyframes pypDropPulse {
  from { box-shadow: 0 24px 70px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.12); }
  to { box-shadow: 0 38px 90px rgba(0,0,0,.54), 0 0 0 1px rgba(255,255,255,.28), inset 0 1px 0 rgba(255,255,255,.2); }
}
