/* ==========================================================================
   GameHub OS Desktop Overlay
   Authentic Fluent / Windows-inspired OS Theme for GameHub
   Scoped strictly to prevent any side effects on existing website styles.
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. In-Frame App Mode (applied when page is loaded inside an OS window)
   -------------------------------------------------------------------------- */
html.gh-in-os-frame header,
html.gh-in-os-frame .nav-wrap,
html.gh-in-os-frame .mobile-drawer,
html.gh-in-os-frame #navbar,
html.gh-in-os-frame footer,
html.gh-in-os-frame .footer-bottom,
html.gh-in-os-frame .gh-os-admin-trigger-pill {
    display: none !important;
}

html.gh-in-os-frame body {
    padding-top: 0 !important;
    margin-top: 0 !important;
    background: #080b12 !important;
}

html.gh-in-os-frame .main-dashboard-wrap {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

html.gh-in-os-frame .dash-shell {
    min-height: 100vh !important;
}

html.gh-in-os-frame .dash-sidebar {
    top: 0 !important;
    height: 100vh !important;
    padding-top: 14px !important;
}

html.gh-in-os-frame .dash-top-bar {
    top: 0 !important;
    background: rgba(11, 14, 20, 0.98) !important;
    backdrop-filter: blur(14px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45) !important;
    z-index: 40 !important;
}

@media (max-width: 1024px) {
    html.gh-in-os-frame .dash-sidebar {
        top: 0 !important;
        height: 100vh !important;
    }
}

/* --------------------------------------------------------------------------
   1. Root Desktop Environment
   -------------------------------------------------------------------------- */
#gh-os-desktop-root {
    --os-font: -apple-system, BlinkMacSystemFont, 'Segoe UI Variable', 'Segoe UI', system-ui, Roboto, sans-serif;
    --os-mono: ui-monospace, 'Cascadia Code', Consolas, monospace;
    --os-bg: radial-gradient(circle at 75% 20%, rgba(30, 58, 138, 0.22) 0%, rgba(15, 23, 42, 0) 50%), radial-gradient(circle at 25% 80%, rgba(56, 189, 248, 0.08) 0%, rgba(15, 23, 42, 0) 45%), linear-gradient(180deg, #0b0f19 0%, #060911 100%);
    --os-taskbar-bg: rgba(11, 15, 24, 0.85);
    --os-win-bg: rgba(15, 21, 33, 0.96);
    --os-win-header-bg: rgba(18, 25, 40, 0.98);
    --os-border: rgba(255, 255, 255, 0.07);
    --os-border-active: rgba(96, 165, 250, 0.35);
    --os-text-primary: #f1f5f9;
    --os-text-secondary: #94a3b8;
    --os-text-muted: #64748b;
    --os-accent: #0078d4;
    --os-accent-hover: #2b88d8;
    --os-taskbar-h: 44px;

    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999990;
    background: var(--os-bg);
    background-size: cover;
    background-position: center;
    font-family: var(--os-font);
    font-size: 13px;
    color: var(--os-text-primary);
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    box-sizing: border-box;
    display: none;
}

#gh-os-desktop-root * {
    box-sizing: border-box;
}

/* When OS Mode is active, prevent body from scrolling underneath and hide regular website DOM immediately */
html.gh-os-active body,
html.gh-os-preactive body {
    overflow: hidden !important;
    background: radial-gradient(circle at 80% 25%, #16243d 0%, #0b111e 55%, #070a12 100%) !important;
}

html.gh-os-active body > :not(#gh-os-desktop-root),
html.gh-os-preactive body > :not(#gh-os-desktop-root) {
    display: none !important;
}

html.gh-os-active #gh-os-desktop-root,
html.gh-os-preactive #gh-os-desktop-root {
    display: block !important;
}

/* Desktop Canvas Area */
#gh-os-desktop-root .gh-os-desktop {
    position: relative;
    width: 100vw;
    height: calc(100vh - var(--os-taskbar-h));
    overflow: hidden;
}

/* Desktop Watermark (Removed for natural minimalism) */
#gh-os-desktop-root .gh-os-watermark {
    display: none !important;
}

/* Desktop Icons Grid & Draggable Icons */
#gh-os-desktop-root .gh-os-icons-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: var(--os-taskbar-h);
    width: 100%;
    height: calc(100% - var(--os-taskbar-h));
    pointer-events: none;
    z-index: 5;
}

#gh-os-desktop-root .gh-os-desk-icon {
    position: absolute;
    width: 88px;
    height: 98px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 5px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease;
    padding-left: 2px;
    padding-right: 2px;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: auto;
    touch-action: none;
}

#gh-os-desktop-root .gh-os-desk-icon:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

#gh-os-desktop-root .gh-os-desk-icon.selected {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.22);
}

#gh-os-desktop-root .gh-os-desk-icon.is-dragging {
    z-index: 60;
    opacity: 0.9;
    cursor: grabbing !important;
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
    transition: none !important;
}

#gh-os-desktop-root .gh-os-icon-tile {
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    box-shadow: none;
    margin-bottom: 4px;
    transition: transform 0.15s ease;
    pointer-events: none;
    flex-shrink: 0;
}

#gh-os-desktop-root .gh-os-icon-tile svg {
    width: 48px;
    height: 48px;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

#gh-os-desktop-root .gh-os-desk-icon:hover .gh-os-icon-tile {
    transform: translateY(-2px) scale(1.04);
}

#gh-os-desktop-root .gh-os-icon-label {
    font-size: 11.5px;
    font-weight: 400;
    color: #f1f5f9;
    text-align: center;
    line-height: 1.25;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95), 0 0 8px rgba(0, 0, 0, 0.7);
    width: 84px;
    height: 30px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   2. Window Component & Aero Snap
   -------------------------------------------------------------------------- */
#gh-os-desktop-root .gh-os-window {
    position: absolute;
    background: var(--os-win-bg);
    border: 1px solid var(--os-border);
    border-radius: 9px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

#gh-os-desktop-root .gh-os-window.active {
    border-color: var(--os-border-active);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(96, 165, 250, 0.35);
}

#gh-os-desktop-root .gh-os-window.minimized {
    display: none !important;
}

#gh-os-desktop-root .gh-os-window.maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: calc(100vh - var(--os-taskbar-h)) !important;
    border-radius: 0 !important;
    border: none !important;
}

/* Snap Layouts (Split screen left / right) */
#gh-os-desktop-root .gh-os-window.snapped-left {
    top: 0 !important;
    left: 0 !important;
    width: 50vw !important;
    height: calc(100vh - var(--os-taskbar-h)) !important;
    border-radius: 0 8px 8px 0 !important;
}

#gh-os-desktop-root .gh-os-window.snapped-right {
    top: 0 !important;
    left: 50vw !important;
    width: 50vw !important;
    height: calc(100vh - var(--os-taskbar-h)) !important;
    border-radius: 8px 0 0 8px !important;
}

/* Aero Snap Ghost Preview Outline */
#gh-os-desktop-root .gh-os-snap-preview {
    position: absolute;
    background: rgba(96, 165, 250, 0.12);
    border: 2px dashed rgba(96, 165, 250, 0.65);
    border-radius: 8px;
    z-index: 99998;
    pointer-events: none;
    transition: all 0.1s ease;
    display: none;
    backdrop-filter: blur(6px);
}

/* Window Header / Titlebar */
#gh-os-desktop-root .gh-os-win-header {
    height: 38px;
    background: var(--os-win-header-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px 0 12px;
    cursor: default;
}

#gh-os-desktop-root .gh-os-win-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--os-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    user-select: none;
}

#gh-os-desktop-root .gh-os-win-title svg {
    color: var(--os-accent-hover);
    flex-shrink: 0;
}

/* Window Controls (Minimize, Maximize, Close) */
#gh-os-desktop-root .gh-os-win-controls {
    display: flex;
    align-items: center;
}

#gh-os-desktop-root .gh-os-win-btn {
    width: 44px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}

#gh-os-desktop-root .gh-os-win-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

#gh-os-desktop-root .gh-os-win-btn.close:hover {
    background: #e11d48;
    color: #fff;
}

/* Window Address/Navigation Bar */
#gh-os-desktop-root .gh-os-win-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    background: rgba(10, 14, 23, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#gh-os-desktop-root .gh-os-win-nav-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

#gh-os-desktop-root .gh-os-win-nav-lock {
    position: absolute;
    left: 8px;
    color: #4ade80;
    pointer-events: none;
    z-index: 2;
}

#gh-os-desktop-root .gh-os-win-nav-url {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    padding: 4px 10px 4px 26px;
    font-family: var(--os-mono);
    font-size: 11px;
    color: #cbd5e1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    outline: none;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

#gh-os-desktop-root .gh-os-win-nav-url:focus {
    border-color: rgba(96, 165, 250, 0.45);
    background: rgba(15, 23, 42, 0.9);
    color: #f8fafc;
}

#gh-os-desktop-root .gh-os-win-nav-action {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    color: #94a3b8;
    padding: 3px 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s ease;
}

#gh-os-desktop-root .gh-os-win-nav-action:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

/* Window Body with Frame */
#gh-os-desktop-root .gh-os-win-body {
    flex: 1;
    width: 100%;
    height: calc(100% - 68px);
    position: relative;
    background: #080b12;
}

#gh-os-desktop-root .gh-os-win-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: #080b12;
}

/* Resize Handles */
#gh-os-desktop-root .gh-os-resize-handle {
    position: absolute;
    z-index: 10;
}
#gh-os-desktop-root .gh-os-resize-e { right: 0; top: 0; width: 6px; height: 100%; cursor: e-resize; }
#gh-os-desktop-root .gh-os-resize-s { bottom: 0; left: 0; width: 100%; height: 6px; cursor: s-resize; }
#gh-os-desktop-root .gh-os-resize-se { right: 0; bottom: 0; width: 12px; height: 12px; cursor: se-resize; }

/* --------------------------------------------------------------------------
   3. Terminal / CLI App Window
   -------------------------------------------------------------------------- */
#gh-os-desktop-root .gh-os-term-body {
    flex: 1;
    width: 100%;
    height: calc(100% - 38px);
    background: #05070a;
    font-family: var(--os-mono);
    font-size: 12px;
    padding: 12px 14px;
    overflow-y: auto;
    color: #e2e8f0;
    line-height: 1.5;
}

#gh-os-desktop-root .gh-os-term-output {
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 8px;
}

#gh-os-desktop-root .gh-os-term-prompt {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #38bdf8;
}

#gh-os-desktop-root .gh-os-term-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--os-mono);
    font-size: 12px;
    color: #f1f5f9;
}

/* --------------------------------------------------------------------------
   4. Desktop Widgets Dock (Right Edge - Minimalist Modern Glass)
   -------------------------------------------------------------------------- */
#gh-os-desktop-root .gh-os-widgets-dock {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 250px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 6;
    max-height: calc(100% - var(--os-taskbar-h) - 36px);
    overflow-y: auto;
    scrollbar-width: none;
    pointer-events: none;
}
#gh-os-desktop-root .gh-os-widgets-dock::-webkit-scrollbar { display: none; }

#gh-os-desktop-root .gh-os-widget-card {
    pointer-events: auto;
    background: rgba(15, 22, 35, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 11px 13px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
}

#gh-os-desktop-root .gh-os-widget-card:hover {
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

#gh-os-desktop-root .gh-os-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

#gh-os-desktop-root .gh-os-widget-title {
    font-size: 11px;
    font-weight: 600;
    color: #e2e8f0;
    letter-spacing: 0.01em;
}

#gh-os-desktop-root .gh-os-widget-badge {
    font-size: 9px;
    font-weight: 500;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

#gh-os-desktop-root .gh-os-widget-body {
    font-size: 11px;
    line-height: 1.4;
    color: #cbd5e1;
}

#gh-os-desktop-root .gh-os-widget-main-text {
    font-weight: 600;
    font-size: 11.5px;
    color: #f1f5f9;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#gh-os-desktop-root .gh-os-widget-sub-text {
    font-size: 10px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#gh-os-desktop-root .gh-os-widget-deal-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
}

#gh-os-desktop-root .gh-os-widget-price {
    font-size: 11px;
    font-weight: 600;
    color: #38bdf8;
}

#gh-os-desktop-root .gh-os-widget-savings {
    display: inline-block;
    font-size: 9px;
    font-weight: 600;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 3px;
    padding: 1px 4px;
}

/* Scratchpad Widget Textarea */
#gh-os-desktop-root .gh-os-scratchpad,
#gh-os-desktop-root .gh-os-scratchpad-input {
    width: 100%;
    height: 76px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 6px 8px;
    font-family: inherit;
    font-size: 11px;
    line-height: 1.4;
    color: #e2e8f0;
    resize: none;
    outline: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}

#gh-os-desktop-root .gh-os-scratchpad:focus,
#gh-os-desktop-root .gh-os-scratchpad-input:focus {
    border-color: rgba(96, 165, 250, 0.4);
    background: rgba(0, 0, 0, 0.35);
}

/* --------------------------------------------------------------------------
   5. Bottom Taskbar & Running Window Items
   -------------------------------------------------------------------------- */
#gh-os-desktop-root .gh-os-taskbar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: var(--os-taskbar-h);
    background: var(--os-taskbar-bg);
    border-top: 1px solid var(--os-border);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px 0 10px;
    z-index: 100000;
}

#gh-os-desktop-root .gh-os-tb-left {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
    flex: 1;
    overflow: hidden;
}

/* Start Button */
#gh-os-desktop-root .gh-os-start-btn {
    height: 32px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    gap: 7px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 5px;
    color: #f1f5f9;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.12s ease;
}

#gh-os-desktop-root .gh-os-start-btn:hover,
#gh-os-desktop-root .gh-os-start-btn.active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

/* Taskbar Search Input */
#gh-os-desktop-root .gh-os-search-wrap {
    position: relative;
    width: 190px;
}

#gh-os-desktop-root .gh-os-search-input {
    width: 100%;
    height: 30px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 15px;
    padding: 0 10px 0 30px;
    font-size: 11.5px;
    color: #f1f5f9;
    outline: none;
    transition: all 0.15s ease;
}

#gh-os-desktop-root .gh-os-search-input:focus {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(255, 255, 255, 0.18);
}

#gh-os-desktop-root .gh-os-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
}

/* Running Windows in Taskbar */
#gh-os-desktop-root .gh-os-tb-windows {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}
#gh-os-desktop-root .gh-os-tb-windows::-webkit-scrollbar { display: none; }

#gh-os-desktop-root .gh-os-tb-item {
    height: 34px;
    min-width: 40px;
    max-width: 170px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    border-radius: 6px;
    color: #94a3b8;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.12s ease;
    position: relative;
    overflow: hidden;
}

#gh-os-desktop-root .gh-os-tb-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
}

#gh-os-desktop-root .gh-os-tb-item.active {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    color: #60a5fa;
}

#gh-os-desktop-root .gh-os-tb-item.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: calc(50% - 8px);
    width: 16px;
    height: 3px;
    background: #60a5fa;
    border-radius: 2px;
}

#gh-os-desktop-root .gh-os-tb-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Taskbar Thumbnail Hover Preview */
#gh-os-desktop-root .gh-os-tb-preview {
    position: absolute;
    bottom: calc(var(--os-taskbar-h) + 6px);
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75);
    padding: 10px;
    display: none;
    flex-direction: column;
    gap: 6px;
    z-index: 100010;
    backdrop-filter: blur(20px);
    min-width: 160px;
}

/* Taskbar Right (System Tray) */
#gh-os-desktop-root .gh-os-tb-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

#gh-os-desktop-root .gh-os-tray-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #94a3b8;
    padding: 4px 8px;
    background: transparent;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background 0.12s ease;
}
#gh-os-desktop-root .gh-os-tray-status:hover {
    background: rgba(255, 255, 255, 0.06);
}

#gh-os-desktop-root .gh-os-tray-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

#gh-os-desktop-root .gh-os-tray-clock {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 5px;
    line-height: 1.25;
    font-size: 11px;
    color: #f1f5f9;
    cursor: pointer;
    transition: background 0.12s ease;
}

#gh-os-desktop-root .gh-os-tray-clock:hover {
    background: rgba(255, 255, 255, 0.06);
}

#gh-os-desktop-root .gh-os-tray-date {
    font-size: 10px;
    color: #64748b;
}

/* Far right Show Desktop Sliver (Aero Peek) */
#gh-os-desktop-root .gh-os-show-desktop-sliver {
    width: 6px;
    height: 28px;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    margin-left: 4px;
    transition: background 0.12s ease;
}
#gh-os-desktop-root .gh-os-show-desktop-sliver:hover {
    background: rgba(96, 165, 250, 0.4);
}

/* --------------------------------------------------------------------------
   6. Alt + Tab App Switcher Overlay
   -------------------------------------------------------------------------- */
#gh-os-desktop-root .gh-os-alt-tab-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100050;
}

#gh-os-desktop-root .gh-os-alt-tab-box {
    background: rgba(13, 18, 29, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    gap: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
    max-width: 80vw;
    overflow-x: auto;
}

#gh-os-desktop-root .gh-os-alt-tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    cursor: pointer;
    min-width: 90px;
    transition: all 0.1s ease;
}

#gh-os-desktop-root .gh-os-alt-tab-item.selected {
    background: rgba(96, 165, 250, 0.2);
    border-color: rgba(96, 165, 250, 0.6);
    box-shadow: 0 0 16px rgba(96, 165, 250, 0.3);
}

#gh-os-desktop-root .gh-os-alt-tab-title {
    font-size: 11px;
    font-weight: 600;
    color: #f1f5f9;
    text-align: center;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   7. Action Center & System Flyout
   -------------------------------------------------------------------------- */
#gh-os-desktop-root .gh-os-action-center {
    position: absolute;
    bottom: calc(var(--os-taskbar-h) + 8px);
    right: 10px;
    width: 330px;
    background: rgba(13, 18, 29, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8);
    display: none;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    z-index: 100001;
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
}

#gh-os-desktop-root .gh-os-action-center.open {
    display: flex;
}

#gh-os-desktop-root .gh-os-ac-section-title {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

#gh-os-desktop-root .gh-os-ac-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

#gh-os-desktop-root .gh-os-ac-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.12s ease;
}

#gh-os-desktop-root .gh-os-ac-tile.active {
    background: rgba(96, 165, 250, 0.2);
    border-color: rgba(96, 165, 250, 0.5);
    color: #60a5fa;
}

#gh-os-desktop-root .gh-os-ac-tile svg {
    margin-bottom: 6px;
}

/* --------------------------------------------------------------------------
   8. Start Menu Flyout (Authentic Windows 11 Fluent)
   -------------------------------------------------------------------------- */
#gh-os-desktop-root .gh-os-start-menu {
    position: absolute;
    bottom: calc(var(--os-taskbar-h) + 10px);
    left: 12px;
    width: 540px;
    max-height: 580px;
    background: rgba(15, 23, 42, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.06);
    display: none;
    flex-direction: column;
    z-index: 100001;
    overflow: hidden;
    user-select: none;
    animation: ghOsStartPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes ghOsStartPop {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#gh-os-desktop-root .gh-os-start-menu.open {
    display: flex;
}

#gh-os-desktop-root .gh-os-sm-search-box {
    margin: 16px 20px 8px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 7px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

#gh-os-desktop-root .gh-os-sm-search-box:focus-within {
    border-color: #60a5fa;
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
    background: rgba(0, 0, 0, 0.5);
}

#gh-os-desktop-root .gh-os-sm-search-icon {
    color: #64748b;
    flex-shrink: 0;
}

#gh-os-desktop-root .gh-os-sm-search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #f1f5f9;
    font-size: 12px;
    outline: none;
}

#gh-os-desktop-root .gh-os-sm-search-input::placeholder {
    color: #64748b;
}

#gh-os-desktop-root .gh-os-sm-scroll {
    padding: 6px 20px 14px;
    overflow-y: auto;
    max-height: 430px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

#gh-os-desktop-root .gh-os-sm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 0 4px;
}

#gh-os-desktop-root .gh-os-sm-section-label {
    font-size: 12px;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: -0.01em;
}

#gh-os-desktop-root .gh-os-sm-all-badge {
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    padding: 2px 8px;
    cursor: default;
    transition: all 0.12s;
}

#gh-os-desktop-root .gh-os-sm-pinned-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px 4px;
}

#gh-os-desktop-root .gh-os-sm-pinned-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.12s ease, transform 0.12s ease;
    text-align: center;
}

#gh-os-desktop-root .gh-os-sm-pinned-item:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-1px);
}

#gh-os-desktop-root .gh-os-sm-pinned-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #60a5fa;
    margin-bottom: 5px;
    transition: transform 0.15s ease;
}

#gh-os-desktop-root .gh-os-sm-pinned-item:hover .gh-os-sm-pinned-icon {
    transform: scale(1.05);
}

#gh-os-desktop-root .gh-os-sm-pinned-title {
    font-size: 11px;
    font-weight: 500;
    color: #e2e8f0;
    line-height: 1.2;
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

#gh-os-desktop-root .gh-os-sm-legal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

#gh-os-desktop-root .gh-os-sm-legal-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.12s ease;
}

#gh-os-desktop-root .gh-os-sm-legal-item:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(96, 165, 250, 0.35);
    transform: translateY(-1px);
}

#gh-os-desktop-root .gh-os-sm-legal-icon {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #93c5fd;
    flex-shrink: 0;
}

#gh-os-desktop-root .gh-os-sm-legal-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    text-align: left;
}

#gh-os-desktop-root .gh-os-sm-legal-title {
    font-size: 12px;
    font-weight: 600;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#gh-os-desktop-root .gh-os-sm-legal-sub {
    font-size: 10px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#gh-os-desktop-root .gh-os-sm-footer {
    padding: 10px 20px;
    background: rgba(10, 14, 23, 0.85);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#gh-os-desktop-root .gh-os-sm-user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.12s ease;
}

#gh-os-desktop-root .gh-os-sm-user-chip:hover {
    background: rgba(255, 255, 255, 0.08);
}

#gh-os-desktop-root .gh-os-sm-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid rgba(96, 165, 250, 0.4);
    object-fit: cover;
}

#gh-os-desktop-root .gh-os-sm-user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-align: left;
}

#gh-os-desktop-root .gh-os-sm-username {
    font-size: 12px;
    font-weight: 600;
    color: #f8fafc;
}

#gh-os-desktop-root .gh-os-sm-usertitle {
    font-size: 10px;
    color: #60a5fa;
    font-weight: 500;
}

#gh-os-desktop-root .gh-os-sm-footer-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

#gh-os-desktop-root .gh-os-sm-settings-btn {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid transparent;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

#gh-os-desktop-root .gh-os-sm-settings-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    color: #60a5fa;
    transform: rotate(35deg);
}

#gh-os-desktop-root .gh-os-sm-power-btn {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid transparent;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

#gh-os-desktop-root .gh-os-sm-power-btn:hover {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

@media (max-width: 620px) {
    #gh-os-desktop-root .gh-os-start-menu {
        width: calc(100vw - 20px);
        left: 10px;
    }
    #gh-os-desktop-root .gh-os-sm-pinned-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    #gh-os-desktop-root .gh-os-sm-legal-grid {
        grid-template-columns: 1fr;
    }
}

#gh-os-desktop-root .gh-os-tray-settings-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 5px;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    margin-right: 2px;
}

#gh-os-desktop-root .gh-os-tray-settings-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #60a5fa;
    transform: rotate(35deg);
}

#gh-os-desktop-root .gh-os-tray-exit-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 5px;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s ease;
}

#gh-os-desktop-root .gh-os-tray-exit-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
}

/* --------------------------------------------------------------------------
   9. Floating Admin Quick Trigger Pill
   -------------------------------------------------------------------------- */
.gh-os-admin-trigger-pill {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999980;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(96, 165, 250, 0.35);
    border-radius: 24px;
    padding: 7px 14px 7px 11px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e2e8f0;
    font-family: var(--os-font, 'Segoe UI', system-ui, sans-serif);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.15s ease;
}

.gh-os-admin-trigger-pill:hover {
    background: rgba(30, 41, 59, 0.95);
    border-color: #60a5fa;
    color: #60a5fa;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55), 0 0 12px rgba(96, 165, 250, 0.25);
}

.gh-os-admin-trigger-pill svg {
    color: #60a5fa;
    flex-shrink: 0;
}

.gh-os-admin-trigger-badge {
    background: rgba(96, 165, 250, 0.2);
    color: #93c5fd;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 4px;
}

.gh-os-admin-trigger-badge.gh-os-vip-trigger-badge {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.25), rgba(168, 85, 247, 0.25));
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.4);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
}

/* --------------------------------------------------------------------------
   10. Desktop Context Menu
   -------------------------------------------------------------------------- */
#gh-os-desktop-root .gh-os-ctx-menu {
    position: absolute;
    width: 200px;
    background: rgba(15, 23, 42, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
    padding: 5px;
    display: none;
    flex-direction: column;
    z-index: 100002;
    backdrop-filter: blur(20px);
}

#gh-os-desktop-root .gh-os-ctx-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 5px;
    color: #cbd5e1;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.1s ease, color 0.1s ease;
}

#gh-os-desktop-root .gh-os-ctx-item:hover {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
}

#gh-os-desktop-root .gh-os-ctx-sep {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 4px 0;
}

/* --------------------------------------------------------------------------
   11. Wallpaper Personalizer Modal
   -------------------------------------------------------------------------- */
#gh-os-desktop-root .gh-os-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100060;
    backdrop-filter: blur(6px);
}

#gh-os-desktop-root .gh-os-modal-box {
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    width: 440px;
    max-width: 90vw;
    padding: 18px 20px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85);
}

#gh-os-desktop-root .gh-os-wp-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 14px 0;
}

#gh-os-desktop-root .gh-os-wp-choice {
    height: 70px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    display: flex;
    align-items: flex-end;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
    transition: transform 0.12s ease, border-color 0.12s ease;
}

#gh-os-desktop-root .gh-os-wp-choice:hover {
    transform: scale(1.02);
    border-color: #60a5fa;
}

/* --------------------------------------------------------------------------
   12. Desktop Taskbar Widgets Button & Floating Resizable Widgets System
   -------------------------------------------------------------------------- */
#gh-os-desktop-root .gh-os-tb-widgets-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 10px;
    background: transparent;
    border: none;
    border-radius: var(--os-radius-sm);
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--os-transition), color var(--os-transition);
}
#gh-os-desktop-root .gh-os-tb-widgets-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}
#gh-os-desktop-root .gh-os-tb-widgets-btn:active {
    background: rgba(255, 255, 255, 0.12);
}

#gh-os-desktop-root .gh-os-widgets-area {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 6;
}

/* ==========================================================================
   Desktop Floating Widgets (Windows 11 Acrylic Glass Aesthetics)
   ========================================================================== */

#gh-os-desktop-root .gh-os-floating-widget {
    position: absolute;
    pointer-events: auto;
    background: rgba(13, 18, 30, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    user-select: none;
    transition: box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.15s ease;
}

#gh-os-desktop-root .gh-os-floating-widget:hover {
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.65), 0 0 24px rgba(96, 165, 250, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#gh-os-desktop-root .gh-os-floating-widget.dragging {
    opacity: 0.95;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 28px rgba(96, 165, 250, 0.3);
    border-color: #60a5fa;
    cursor: grabbing;
    transform: scale(1.01);
}

#gh-os-desktop-root .gh-os-floating-widget.resizing {
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 28px rgba(96, 165, 250, 0.3);
    border-color: #60a5fa;
}

/* Live Pulse Indicator Dot */
#gh-os-desktop-root .gh-os-live-pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    display: inline-block;
    animation: ghPulseDot 1.8s infinite ease-in-out;
    flex-shrink: 0;
}
#gh-os-desktop-root .gh-os-live-pulse-dot.amber {
    background: #f59e0b;
    box-shadow: 0 0 8px #f59e0b;
}
#gh-os-desktop-root .gh-os-live-pulse-dot.purple {
    background: #c084fc;
    box-shadow: 0 0 8px #c084fc;
}
@keyframes ghPulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.65); opacity: 0.45; }
}

#gh-os-desktop-root .gh-os-widget-drag-handle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px 8px 12px;
    cursor: grab;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

#gh-os-desktop-root .gh-os-widget-title-wrap {
    display: flex;
    align-items: center;
    gap: 7px;
    pointer-events: none;
}

#gh-os-desktop-root .gh-os-widget-icon {
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

#gh-os-desktop-root .gh-os-widget-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.01em;
}

#gh-os-desktop-root .gh-os-widget-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    font-size: 10px;
    font-weight: 600;
    padding: 1.5px 7px;
    border-radius: 999px;
}

#gh-os-desktop-root .gh-os-widget-close-btn {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.15s ease;
}

#gh-os-desktop-root .gh-os-widget-close-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
    transform: scale(1.05);
}

#gh-os-desktop-root .gh-os-widget-body {
    flex: 1;
    padding: 9px 11px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

#gh-os-desktop-root .gh-os-widget-content-wrap {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#gh-os-desktop-root .gh-os-widget-resizer {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 14px;
    height: 14px;
    cursor: se-resize;
    z-index: 10;
}
#gh-os-desktop-root .gh-os-widget-resizer::after {
    content: '';
    position: absolute;
    right: 3px;
    bottom: 3px;
    width: 6px;
    height: 6px;
    border-right: 2px solid rgba(255, 255, 255, 0.25);
    border-bottom: 2px solid rgba(255, 255, 255, 0.25);
}
#gh-os-desktop-root .gh-os-widget-resizer:hover::after {
    border-color: #60a5fa;
}

/* ==========================================================================
   Spotlight Hero Banner Cards
   ========================================================================== */

#gh-os-desktop-root .gh-os-wsummary-bar {
    padding: 9px 11px;
    border-radius: 10px;
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    flex-shrink: 0;
    transition: all 0.15s ease;
}

#gh-os-desktop-root .gh-os-wsummary-bar.hero-freebies {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.05) 100%);
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.1);
}

#gh-os-desktop-root .gh-os-wsummary-bar.hero-deals {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(180, 83, 9, 0.05) 100%);
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.1);
}

#gh-os-desktop-root .gh-os-wsummary-bar.hero-fortnite {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(217, 70, 239, 0.05) 100%);
    border-color: rgba(168, 85, 247, 0.3);
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.1);
}

#gh-os-desktop-root .gh-os-hero-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

#gh-os-desktop-root .gh-os-hero-spotlight-pill {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #34d399;
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(16, 185, 129, 0.35);
    padding: 1.5px 6px;
    border-radius: 4px;
}

#gh-os-desktop-root .gh-os-hero-spotlight-pill.amber {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(245, 158, 11, 0.35);
}

#gh-os-desktop-root .gh-os-hero-count,
#gh-os-desktop-root .gh-os-hero-countdown {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 500;
}

#gh-os-desktop-root .gh-os-hero-main-title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    margin-bottom: 4px;
}

#gh-os-desktop-root .gh-os-hero-meta-row,
#gh-os-desktop-root .gh-os-hero-deal-pricing,
#gh-os-desktop-root .gh-os-hero-vbucks-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

#gh-os-desktop-root .gh-os-hero-claim-tag {
    font-size: 10px;
    font-weight: 600;
    color: #34d399;
}

#gh-os-desktop-root .gh-os-hero-sale-price {
    font-size: 13.5px;
    font-weight: 800;
    color: #34d399;
}

#gh-os-desktop-root .gh-os-hero-normal-price {
    font-size: 11px;
    color: #64748b;
    text-decoration: line-through;
}

#gh-os-desktop-root .gh-os-hero-store-tag {
    font-size: 10.5px;
    color: #94a3b8;
    margin-left: auto;
}

#gh-os-desktop-root .gh-os-hero-category-tag {
    font-size: 10px;
    color: #cbd5e1;
    margin-left: auto;
}

/* ==========================================================================
   Multi-Item Lists & High-Quality Card Rows
   ========================================================================== */

#gh-os-desktop-root .gh-os-wlist-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding-right: 3px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

#gh-os-desktop-root .gh-os-wlist-container::-webkit-scrollbar {
    width: 4px;
}
#gh-os-desktop-root .gh-os-wlist-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
}
#gh-os-desktop-root .gh-os-wlist-container::-webkit-scrollbar-thumb:hover {
    background: rgba(96, 165, 250, 0.5);
}

#gh-os-desktop-root .gh-os-wlist-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 9px;
    padding: 7px 10px;
    gap: 8px;
    cursor: pointer;
    transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

#gh-os-desktop-root .gh-os-wlist-row:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(96, 165, 250, 0.35);
    transform: translateX(2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

#gh-os-desktop-root .gh-os-wlist-row-left {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    flex: 1;
}

#gh-os-desktop-root .gh-os-wrow-thumb {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

#gh-os-desktop-root .gh-os-wrow-thumb-fallback {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#gh-os-desktop-root .gh-os-wrow-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

#gh-os-desktop-root .gh-os-wlist-title {
    font-size: 11.5px;
    font-weight: 600;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

#gh-os-desktop-root .gh-os-wrow-subinfo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 9.5px;
    color: #94a3b8;
}

#gh-os-desktop-root .gh-os-wrow-worth {
    font-size: 9.5px;
    color: #64748b;
}

#gh-os-desktop-root .gh-os-wstore-badge {
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
#gh-os-desktop-root .gh-os-wstore-badge.store-epic {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
}
#gh-os-desktop-root .gh-os-wstore-badge.store-steam {
    background: rgba(102, 192, 244, 0.15);
    color: #66c0f4;
    border-color: rgba(102, 192, 244, 0.35);
}
#gh-os-desktop-root .gh-os-wstore-badge.store-gog {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border-color: rgba(168, 85, 247, 0.35);
}
#gh-os-desktop-root .gh-os-wstore-badge.store-amazon {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.35);
}

#gh-os-desktop-root .gh-os-wlist-claim-btn {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border: 1px solid rgba(52, 211, 153, 0.5);
    color: #ffffff;
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    text-decoration: none;
    flex-shrink: 0;
    transition: all 0.15s ease;
}
#gh-os-desktop-root .gh-os-wlist-claim-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 3px 12px rgba(16, 185, 129, 0.55);
}

#gh-os-desktop-root .gh-os-wlist-row-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

#gh-os-desktop-root .gh-os-wlist-sale-price {
    font-size: 11.5px;
    font-weight: 700;
    color: #34d399;
}
#gh-os-desktop-root .gh-os-wlist-normal-price {
    font-size: 9.5px;
    color: #64748b;
    text-decoration: line-through;
}
#gh-os-desktop-root .gh-os-wlist-savings-pill {
    font-size: 9.5px;
    font-weight: 700;
    padding: 1.5px 5px;
    border-radius: 4px;
    background: linear-gradient(135deg, #d97706, #f59e0b);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35);
}

#gh-os-desktop-root .gh-os-vbucks-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 2px 6px;
    border-radius: 6px;
    flex-shrink: 0;
}

#gh-os-desktop-root .gh-os-fn-rarity-indicator {
    width: 4px;
    height: 24px;
    border-radius: 2px;
    background: #3b82f6;
    flex-shrink: 0;
}
#gh-os-desktop-root .gh-os-fn-rarity-indicator.legendary { background: #f59e0b; box-shadow: 0 0 6px rgba(245, 158, 11, 0.6); }
#gh-os-desktop-root .gh-os-fn-rarity-indicator.epic { background: #a855f7; box-shadow: 0 0 6px rgba(168, 85, 247, 0.6); }
#gh-os-desktop-root .gh-os-fn-rarity-indicator.rare { background: #3b82f6; box-shadow: 0 0 6px rgba(59, 130, 246, 0.6); }
#gh-os-desktop-root .gh-os-fn-rarity-indicator.uncommon { background: #10b981; box-shadow: 0 0 6px rgba(16, 185, 129, 0.6); }

#gh-os-desktop-root .gh-os-witem-rarity-pill {
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}
#gh-os-desktop-root .gh-os-witem-rarity-pill.legendary { background: rgba(245, 158, 11, 0.18); color: #fbbf24; border-color: rgba(245, 158, 11, 0.4); }
#gh-os-desktop-root .gh-os-witem-rarity-pill.epic { background: rgba(168, 85, 247, 0.18); color: #c084fc; border-color: rgba(168, 85, 247, 0.4); }
#gh-os-desktop-root .gh-os-witem-rarity-pill.rare { background: rgba(59, 130, 246, 0.18); color: #60a5fa; border-color: rgba(59, 130, 246, 0.4); }
#gh-os-desktop-root .gh-os-witem-rarity-pill.uncommon { background: rgba(16, 185, 129, 0.18); color: #34d399; border-color: rgba(16, 185, 129, 0.4); }

/* Digital Clock Widget */
#gh-os-desktop-root .gh-os-widget-clock {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

#gh-os-desktop-root .gh-os-widget-clock-time {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #f8fafc;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

#gh-os-desktop-root .gh-os-widget-clock-date {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

/* --------------------------------------------------------------------------
   13. Widgets Gallery Modal & Icon Manager Modal
   -------------------------------------------------------------------------- */
#gh-os-desktop-root .gh-os-widget-gallery-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 4px;
}

#gh-os-desktop-root .gh-os-widget-gallery-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 12px;
    gap: 12px;
    transition: background 0.12s ease, border-color 0.12s ease;
}

#gh-os-desktop-root .gh-os-widget-gallery-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
}

#gh-os-desktop-root .gh-os-wgc-icon {
    font-size: 20px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    flex-shrink: 0;
}

#gh-os-desktop-root .gh-os-wgc-info {
    flex: 1;
    min-width: 0;
}

#gh-os-desktop-root .gh-os-wgc-title {
    font-size: 12.5px;
    font-weight: 600;
    color: #f1f5f9;
}

#gh-os-desktop-root .gh-os-wgc-desc {
    font-size: 10.5px;
    color: #94a3b8;
    line-height: 1.3;
    margin-top: 1px;
}

#gh-os-desktop-root .gh-os-widget-toggle-btn {
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

#gh-os-desktop-root .gh-os-widget-toggle-btn.added {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}
#gh-os-desktop-root .gh-os-widget-toggle-btn.added:hover {
    background: rgba(239, 68, 68, 0.25);
}

#gh-os-desktop-root .gh-os-widget-toggle-btn.add {
    background: #2563eb;
    color: #ffffff;
}
#gh-os-desktop-root .gh-os-widget-toggle-btn.add:hover {
    background: #1d4ed8;
}

/* Icon Manager Grid & Switch */
#gh-os-desktop-root .gh-os-icon-mgr-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 4px;
}

#gh-os-desktop-root .gh-os-icon-mgr-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px 12px;
    gap: 12px;
    transition: background 0.12s ease;
}

#gh-os-desktop-root .gh-os-icon-mgr-item:hover {
    background: rgba(255, 255, 255, 0.07);
}

#gh-os-desktop-root .gh-os-imm-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

#gh-os-desktop-root .gh-os-imm-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#gh-os-desktop-root .gh-os-imm-title {
    font-size: 12px;
    font-weight: 500;
    color: #f1f5f9;
}

#gh-os-desktop-root .gh-os-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}

#gh-os-desktop-root .gh-os-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

#gh-os-desktop-root .gh-os-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: 0.2s;
    border-radius: 20px;
}

#gh-os-desktop-root .gh-os-slider:before {
    position: absolute;
    content: '';
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.2s;
    border-radius: 50%;
}

#gh-os-desktop-root input:checked + .gh-os-slider {
    background-color: #3b82f6;
}

#gh-os-desktop-root input:checked + .gh-os-slider:before {
    transform: translateX(16px);
}

/* --------------------------------------------------------------------------
   14. Start Menu Category Folder System & Icon Context Menu
   -------------------------------------------------------------------------- */
#gh-os-desktop-root .gh-os-sm-view-wrap {
    position: relative;
    display: inline-block;
}

#gh-os-desktop-root .gh-os-sm-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #cbd5e1;
    font-size: 11px;
    padding: 3px 8px;
    cursor: pointer;
    transition: all 0.12s ease;
}

#gh-os-desktop-root .gh-os-sm-view-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

#gh-os-desktop-root .gh-os-sm-view-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    background: rgba(20, 28, 45, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    z-index: 100;
    min-width: 140px;
    padding: 4px;
    display: none;
    flex-direction: column;
    gap: 2px;
}
#gh-os-desktop-root .gh-os-sm-view-dropdown.open {
    display: flex !important;
}

#gh-os-desktop-root .gh-os-sm-view-opt {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    font-size: 11px;
    color: #cbd5e1;
    background: transparent;
    border: none;
    border-radius: 4px;
    text-align: left;
    cursor: pointer;
    transition: background 0.1s ease;
}

#gh-os-desktop-root .gh-os-sm-view-opt:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

#gh-os-desktop-root .gh-os-sm-view-opt.active {
    background: rgba(59, 130, 246, 0.25);
    color: #60a5fa;
    font-weight: 600;
}

/* Category Grid & Folders (3 columns layout inspired by Screenshot 4) */
#gh-os-desktop-root .gh-os-sm-category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 4px 0 12px 0;
}

#gh-os-desktop-root .gh-os-sm-folder-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 12px 8px 10px 8px;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

#gh-os-desktop-root .gh-os-sm-folder-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

#gh-os-desktop-root .gh-os-sm-folder-preview {
    width: 60px;
    height: 60px;
    background: rgba(10, 16, 28, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 5px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 4px;
    align-items: center;
    justify-items: center;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

#gh-os-desktop-root .gh-os-sm-mini-icon {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#gh-os-desktop-root .gh-os-sm-mini-placeholder {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.04);
}

#gh-os-desktop-root .gh-os-sm-folder-name {
    font-size: 11px;
    font-weight: 600;
    color: #f1f5f9;
    margin-top: 8px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

#gh-os-desktop-root .gh-os-sm-folder-count {
    font-size: 9.5px;
    color: #94a3b8;
    margin-top: 2px;
}

/* Category Folder Detail View */
#gh-os-desktop-root .gh-os-sm-folder-detail {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#gh-os-desktop-root .gh-os-sm-folder-detail-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 4px;
}

#gh-os-desktop-root .gh-os-sm-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #93c5fd;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    cursor: pointer;
    transition: all 0.12s ease;
}

#gh-os-desktop-root .gh-os-sm-back-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #fff;
}

#gh-os-desktop-root .gh-os-sm-folder-detail-title {
    font-size: 13px;
    font-weight: 600;
    color: #f1f5f9;
}

#gh-os-desktop-root .gh-os-sm-cat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 6px 10px;
    gap: 10px;
    transition: background 0.12s ease;
}

#gh-os-desktop-root .gh-os-sm-cat-row:hover {
    background: rgba(255, 255, 255, 0.07);
}

#gh-os-desktop-root .gh-os-sm-cat-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#gh-os-desktop-root .gh-os-sm-cat-info {
    flex: 1;
    min-width: 0;
}

#gh-os-desktop-root .gh-os-sm-cat-title {
    font-size: 11.5px;
    font-weight: 600;
    color: #f1f5f9;
}

#gh-os-desktop-root .gh-os-sm-cat-desc {
    font-size: 9.5px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#gh-os-desktop-root .gh-os-sm-cat-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

#gh-os-desktop-root .gh-os-sm-cat-pin-btn,
#gh-os-desktop-root .gh-os-sm-cat-open-btn {
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 500;
    border-radius: 5px;
    cursor: pointer;
    border: none;
    transition: all 0.12s ease;
}

#gh-os-desktop-root .gh-os-sm-cat-pin-btn {
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
#gh-os-desktop-root .gh-os-sm-cat-pin-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}
#gh-os-desktop-root .gh-os-sm-cat-pin-btn.pinned {
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.3);
}

#gh-os-desktop-root .gh-os-sm-cat-open-btn {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.35);
}
#gh-os-desktop-root .gh-os-sm-cat-open-btn:hover {
    background: #2563eb;
    color: #fff;
}

/* Icon Right Click Context Menu */
#gh-os-desktop-root .gh-os-icon-ctx-menu {
    position: absolute;
    width: 190px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 5px;
    display: none;
    flex-direction: column;
    gap: 2px;
    z-index: 100050;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
}

/* --------------------------------------------------------------------------
   15. Advanced Widgets Gallery Modal Redesign
   -------------------------------------------------------------------------- */
#gh-os-desktop-root .gh-os-wgallery-modal-box {
    width: 760px;
    max-width: 92vw;
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    padding: 20px 24px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

#gh-os-desktop-root .gh-os-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 12px;
}

#gh-os-desktop-root .gh-os-modal-title-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

#gh-os-desktop-root .gh-os-wgallery-icon-badge {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(96, 165, 250, 0.12);
    border: 1px solid rgba(96, 165, 250, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#gh-os-desktop-root .gh-os-modal-title {
    font-size: 15px;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.2;
}

#gh-os-desktop-root .gh-os-modal-subtitle {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 3px;
    line-height: 1.4;
}

#gh-os-desktop-root .gh-os-wgallery-active-pill {
    font-size: 10px;
    font-weight: 600;
    color: #34d399;
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.3);
    border-radius: 10px;
    padding: 1px 7px;
}

#gh-os-desktop-root .gh-os-modal-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 16px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
#gh-os-desktop-root .gh-os-modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Gallery Toolbar */
#gh-os-desktop-root .gh-os-wgallery-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

#gh-os-desktop-root .gh-os-wgallery-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 6px 10px;
    width: 220px;
    transition: border-color 0.15s ease;
}
#gh-os-desktop-root .gh-os-wgallery-search-wrap:focus-within {
    border-color: #60a5fa;
    background: rgba(255, 255, 255, 0.08);
}

#gh-os-desktop-root .gh-os-wgallery-search-input {
    background: transparent;
    border: none;
    outline: none;
    color: #f1f5f9;
    font-size: 11.5px;
    width: 100%;
}
#gh-os-desktop-root .gh-os-wgallery-search-input::placeholder {
    color: #64748b;
}

#gh-os-desktop-root .gh-os-wgallery-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}
#gh-os-desktop-root .gh-os-wgallery-tabs::-webkit-scrollbar { display: none; }

#gh-os-desktop-root .gh-os-wgallery-tab {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 500;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.12s ease;
    white-space: nowrap;
}
#gh-os-desktop-root .gh-os-wgallery-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
}
#gh-os-desktop-root .gh-os-wgallery-tab.active {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(96, 165, 250, 0.4);
    color: #60a5fa;
    font-weight: 600;
}

/* 2-Column Responsive Card Grid */
#gh-os-desktop-root .gh-os-wgallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    overflow-y: auto;
    max-height: 480px;
    padding-right: 4px;
    margin-bottom: 14px;
}
@media (max-width: 640px) {
    #gh-os-desktop-root .gh-os-wgallery-grid {
        grid-template-columns: 1fr;
    }
}

#gh-os-desktop-root .gh-os-wgallery-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
#gh-os-desktop-root .gh-os-wgallery-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
#gh-os-desktop-root .gh-os-wgallery-card.is-active {
    border-color: rgba(52, 211, 153, 0.3);
    background: rgba(16, 185, 129, 0.04);
}

#gh-os-desktop-root .gh-os-wgc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#gh-os-desktop-root .gh-os-wgc-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

#gh-os-desktop-root .gh-os-wgc-icon-badge {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#gh-os-desktop-root .gh-os-wgc-title {
    font-size: 13px;
    font-weight: 600;
    color: #f8fafc;
}

#gh-os-desktop-root .gh-os-wgc-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

#gh-os-desktop-root .gh-os-wgc-category-pill {
    font-size: 9.5px;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 5px;
    border-radius: 4px;
}

#gh-os-desktop-root .gh-os-wgc-desc {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.4;
    flex: 1;
}

#gh-os-desktop-root .gh-os-wgc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

#gh-os-desktop-root .gh-os-wgc-size-tip {
    font-size: 9.5px;
    color: #64748b;
}

/* Action button with Added/Remove hover morph */
#gh-os-desktop-root .gh-os-wgallery-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    white-space: nowrap;
}

#gh-os-desktop-root .gh-os-wgallery-action-btn.btn-add {
    background: #2563eb;
    color: #ffffff;
}
#gh-os-desktop-root .gh-os-wgallery-action-btn.btn-add:hover {
    background: #1d4ed8;
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.4);
}

#gh-os-desktop-root .gh-os-wgallery-action-btn.btn-remove {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(52, 211, 153, 0.3);
    color: #34d399;
}
#gh-os-desktop-root .gh-os-wgallery-action-btn.btn-remove .gh-os-btn-text-hover {
    display: none;
}
#gh-os-desktop-root .gh-os-wgallery-action-btn.btn-remove:hover {
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(239, 68, 68, 0.35);
    color: #f87171;
}
#gh-os-desktop-root .gh-os-wgallery-action-btn.btn-remove:hover .gh-os-btn-text-normal {
    display: none;
}
#gh-os-desktop-root .gh-os-wgallery-action-btn.btn-remove:hover .gh-os-btn-text-hover {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

#gh-os-desktop-root .gh-os-wgallery-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#gh-os-desktop-root .gh-os-wgallery-footer-tip {
    font-size: 10.5px;
    color: #64748b;
}

#gh-os-desktop-root .gh-os-wgallery-reset-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #cbd5e1;
    font-size: 11.5px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.12s ease;
}
#gh-os-desktop-root .gh-os-wgallery-reset-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

#gh-os-desktop-root .gh-os-modal-done-btn {
    background: #2563eb;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
    padding: 6px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
}
#gh-os-desktop-root .gh-os-modal-done-btn:hover {
    background: #1d4ed8;
}

/* --------------------------------------------------------------------------
   16. Custom Wallpaper Link System
   -------------------------------------------------------------------------- */
#gh-os-desktop-root .gh-os-wp-modal-box {
    width: 520px;
    max-width: 92vw;
}

#gh-os-desktop-root .gh-os-wp-section-label {
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

#gh-os-desktop-root .gh-os-wp-custom-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#gh-os-desktop-root .gh-os-wp-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

#gh-os-desktop-root .gh-os-wp-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 6px 10px;
}
#gh-os-desktop-root .gh-os-wp-input-wrap:focus-within {
    border-color: #60a5fa;
}

#gh-os-desktop-root .gh-os-wp-url-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 12px;
}

#gh-os-desktop-root .gh-os-wp-clear-btn {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 12px;
}
#gh-os-desktop-root .gh-os-wp-clear-btn:hover {
    color: #cbd5e1;
}

#gh-os-desktop-root .gh-os-wp-apply-btn {
    background: #2563eb;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 7px 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease;
}
#gh-os-desktop-root .gh-os-wp-apply-btn:hover {
    background: #1d4ed8;
}

#gh-os-desktop-root .gh-os-wp-preview-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px;
}

#gh-os-desktop-root .gh-os-wp-preview-thumb {
    width: 80px;
    height: 48px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

#gh-os-desktop-root .gh-os-wp-preview-meta {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#gh-os-desktop-root .gh-os-wp-preview-status {
    font-size: 11px;
    font-weight: 500;
}

#gh-os-desktop-root .gh-os-wp-reset-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 11px;
    cursor: pointer;
    text-decoration: underline;
}
#gh-os-desktop-root .gh-os-wp-reset-btn:hover {
    color: #fff;
}

#gh-os-desktop-root .gh-os-wp-presets-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

#gh-os-desktop-root .gh-os-wp-presets-label {
    font-size: 10.5px;
    color: #64748b;
}

#gh-os-desktop-root .gh-os-wp-sample-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    color: #cbd5e1;
    font-size: 10.5px;
    padding: 2px 7px;
    cursor: pointer;
    transition: all 0.1s ease;
}
#gh-os-desktop-root .gh-os-wp-sample-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: #60a5fa;
}

/* --------------------------------------------------------------------------
   17. Responsive Widget Content & Scaling Styles
   -------------------------------------------------------------------------- */
#gh-os-desktop-root .gh-os-widget-content-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

#gh-os-desktop-root .gh-os-widget-content-wrap.notes-wrap {
    height: 100%;
}

/* Responsive widget content layout */
#gh-os-desktop-root .gh-os-widget-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
#gh-os-desktop-root .gh-os-widget-icon svg {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    aspect-ratio: 1 / 1 !important;
    display: block !important;
}

#gh-os-desktop-root .gh-os-wsummary-bar {
    padding-bottom: 5px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

#gh-os-desktop-root .gh-os-wlist-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    flex: 1;
    min-height: 40px;
    height: 100%;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

#gh-os-desktop-root .gh-os-wlist-container::-webkit-scrollbar {
    width: 4px;
}
#gh-os-desktop-root .gh-os-wlist-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

/* In very compact mode, hide list if widget height is extremely low */
#gh-os-desktop-root .gh-os-floating-widget.w-size-compact .gh-os-wlist-container {
    max-height: 60px;
}
#gh-os-desktop-root .gh-os-floating-widget.w-size-tall .gh-os-wlist-container {
    max-height: 100%;
}

/* Multi-Item Lists (Freebies, Deals, Bundles, Codes) */
#gh-os-desktop-root .gh-os-wlist-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding-right: 2px;
}

#gh-os-desktop-root .gh-os-wlist-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    padding: 4px 8px;
    gap: 6px;
    font-size: 11px;
}

#gh-os-desktop-root .gh-os-wlist-row-left {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

#gh-os-desktop-root .gh-os-wlist-store-tag {
    font-size: 9px;
    font-weight: 600;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 4px;
    border-radius: 3px;
    text-transform: uppercase;
}

#gh-os-desktop-root .gh-os-wlist-title {
    font-size: 11px;
    font-weight: 500;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#gh-os-desktop-root .gh-os-wlist-free-badge {
    font-size: 9px;
    font-weight: 700;
    color: #34d399;
    background: rgba(52, 211, 153, 0.15);
    padding: 1px 5px;
    border-radius: 3px;
}

/* System Health Expanded Grid */
#gh-os-desktop-root .gh-os-whealth-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    flex: 1;
}

#gh-os-desktop-root .gh-os-whealth-item {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

#gh-os-desktop-root .gh-os-whealth-label {
    font-size: 9px;
    color: #94a3b8;
}

#gh-os-desktop-root .gh-os-whealth-bar-wrap {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

#gh-os-desktop-root .gh-os-whealth-bar {
    height: 100%;
    background: #34d399;
    border-radius: 2px;
}

#gh-os-desktop-root .gh-os-whealth-val {
    font-size: 10px;
    font-weight: 600;
    color: #f1f5f9;
}

/* Fortnite Cosmetic Items */
#gh-os-desktop-root .gh-os-wgrid-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    padding: 4px 8px;
    gap: 6px;
}

#gh-os-desktop-root .gh-os-witem-rarity-pill {
    font-size: 8.5px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 1px 4px;
    border-radius: 3px;
}
#gh-os-desktop-root .gh-os-witem-rarity-pill.legendary { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
#gh-os-desktop-root .gh-os-witem-rarity-pill.epic { background: rgba(168, 85, 247, 0.2); color: #c084fc; }
#gh-os-desktop-root .gh-os-witem-rarity-pill.rare { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }

#gh-os-desktop-root .gh-os-witem-price {
    font-size: 10px;
    font-weight: 600;
    color: #fbbf24;
}

/* Promo Codes Widget */
#gh-os-desktop-root .gh-os-wcode-inline {
    font-family: monospace;
    font-size: 10px;
    background: rgba(255, 255, 255, 0.08);
    padding: 1px 4px;
    border-radius: 3px;
    color: #f472b6;
}

#gh-os-desktop-root .gh-os-wcode-copy-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    color: #cbd5e1;
    font-size: 9.5px;
    font-weight: 600;
    padding: 2px 7px;
    cursor: pointer;
    transition: all 0.12s ease;
}
#gh-os-desktop-root .gh-os-wcode-copy-btn:hover {
    background: #2563eb;
    color: #fff;
    border-color: #3b82f6;
}

/* Digital Clock Seconds Indicator */
#gh-os-desktop-root .gh-os-wclock-seconds {
    font-size: 10px;
    color: #64748b;
    margin-top: 3px;
    font-variant-numeric: tabular-nums;
}

/* Quick Notes Footer */
#gh-os-desktop-root .gh-os-wnotes-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 9.5px;
    color: #64748b;
    padding-top: 3px;
}

/* Fix: Fluent Folder Back Button & Header */
#gh-os-desktop-root .gh-os-sm-folder-detail-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 8px;
}

#gh-os-desktop-root .gh-os-sm-folder-back-btn,
#gh-os-desktop-root .gh-os-sm-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    color: #93c5fd;
    font-size: 11.5px;
    font-weight: 500;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.12s ease;
    user-select: none;
}

#gh-os-desktop-root .gh-os-sm-folder-back-btn:hover,
#gh-os-desktop-root .gh-os-sm-back-btn:hover {
    background: rgba(59, 130, 246, 0.25);
    border-color: #60a5fa;
    color: #ffffff;
}

#gh-os-desktop-root .gh-os-sm-folder-current-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #f8fafc;
}

/* Fix: Icon aspect ratio and distortion fixes across all views */
#gh-os-desktop-root .gh-os-icon-tile svg {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
    aspect-ratio: 1 / 1 !important;
    display: block !important;
    margin: 0 auto !important;
    flex-shrink: 0 !important;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.45));
}

#gh-os-desktop-root .gh-os-sm-pinned-icon svg {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    max-width: 34px !important;
    max-height: 34px !important;
    aspect-ratio: 1 / 1 !important;
    display: block !important;
    margin: 0 auto !important;
    flex-shrink: 0 !important;
}

#gh-os-desktop-root .gh-os-sm-mini-icon svg {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    aspect-ratio: 1 / 1 !important;
    display: block !important;
    margin: 0 auto !important;
    flex-shrink: 0 !important;
}

#gh-os-desktop-root .gh-os-sm-cat-icon svg {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    aspect-ratio: 1 / 1 !important;
    display: block !important;
    margin: 0 auto !important;
    flex-shrink: 0 !important;
}


/* ==========================================================================
   Desktop Icon Size Variants (Small, Medium, Large)
   ========================================================================== */

/* Small (Compact density) */
#gh-os-desktop-root.gh-os-icons-small .gh-os-desk-icon {
    width: 72px;
    height: 80px;
    padding-top: 3px;
    border-radius: 6px;
}
#gh-os-desktop-root.gh-os-icons-small .gh-os-icon-tile {
    width: 42px;
    height: 42px;
    margin-bottom: 2px;
}
#gh-os-desktop-root.gh-os-icons-small .gh-os-icon-tile svg {
    width: 34px;
    height: 34px;
}
#gh-os-desktop-root.gh-os-icons-small .gh-os-icon-label {
    font-size: 10px;
    width: 68px;
    height: 26px;
    line-height: 1.15;
}

/* Medium (Balanced modern layout) */
#gh-os-desktop-root.gh-os-icons-medium .gh-os-desk-icon {
    width: 80px;
    height: 90px;
    padding-top: 4px;
    border-radius: 7px;
}
#gh-os-desktop-root.gh-os-icons-medium .gh-os-icon-tile {
    width: 48px;
    height: 48px;
    margin-bottom: 3px;
}
#gh-os-desktop-root.gh-os-icons-medium .gh-os-icon-tile svg {
    width: 40px;
    height: 40px;
}
#gh-os-desktop-root.gh-os-icons-medium .gh-os-icon-label {
    font-size: 11px;
    width: 76px;
    height: 28px;
    line-height: 1.2;
}

/* Large (High visibility & readability - default enlarged) */
#gh-os-desktop-root.gh-os-icons-large .gh-os-desk-icon {
    width: 90px;
    height: 100px;
    padding-top: 5px;
    border-radius: 8px;
}
#gh-os-desktop-root.gh-os-icons-large .gh-os-icon-tile {
    width: 54px;
    height: 54px;
    margin-bottom: 4px;
}
#gh-os-desktop-root.gh-os-icons-large .gh-os-icon-tile svg {
    width: 48px;
    height: 48px;
}
#gh-os-desktop-root.gh-os-icons-large .gh-os-icon-label {
    font-size: 11.5px;
    width: 86px;
    height: 30px;
    line-height: 1.25;
}

/* ==========================================================================
   Desktop Icon Background Shadows Customization (None, Subtle, Deep, Glass)
   ========================================================================== */

/* None / Flat outline */
#gh-os-desktop-root.gh-os-shadow-none .gh-os-icon-tile svg {
    filter: none !important;
}
#gh-os-desktop-root.gh-os-shadow-none .gh-os-icon-label {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

/* Subtle Shadow */
#gh-os-desktop-root.gh-os-shadow-subtle .gh-os-icon-tile svg {
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.45)) !important;
}
#gh-os-desktop-root.gh-os-shadow-subtle .gh-os-icon-label {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 2px 6px rgba(0, 0, 0, 0.75);
}

/* Deep Shadow (Default - high contrast on wallpaper) */
#gh-os-desktop-root.gh-os-shadow-deep .gh-os-icon-tile svg {
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.8)) drop-shadow(0 2px 5px rgba(0, 0, 0, 0.6)) !important;
}
#gh-os-desktop-root.gh-os-shadow-deep .gh-os-icon-label {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.98), 0 0 10px rgba(0, 0, 0, 0.9);
}

/* Glass Plate Card Backdrop */
#gh-os-desktop-root.gh-os-shadow-glass .gh-os-desk-icon {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
#gh-os-desktop-root.gh-os-shadow-glass .gh-os-desk-icon:hover {
    background: rgba(30, 41, 59, 0.75);
    border-color: rgba(96, 165, 250, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 12px rgba(96, 165, 250, 0.2);
}
#gh-os-desktop-root.gh-os-shadow-glass .gh-os-icon-tile svg {
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.55)) !important;
}
#gh-os-desktop-root.gh-os-shadow-glass .gh-os-icon-label {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
}

/* ==========================================================================
   Desktop & Icon Settings Modal
   ========================================================================== */

#gh-os-desktop-root .gh-os-settings-modal-box {
    width: 580px;
    max-width: 92vw;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);
    padding: 20px;
    color: #f1f5f9;
}

#gh-os-desktop-root .gh-os-settings-icon-badge {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(96, 165, 250, 0.12);
    border: 1px solid rgba(96, 165, 250, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#gh-os-desktop-root .gh-os-settings-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

#gh-os-desktop-root .gh-os-settings-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #94a3b8;
    text-transform: uppercase;
}

#gh-os-desktop-root .gh-os-settings-val-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

#gh-os-desktop-root .gh-os-settings-cards-grid {
    display: grid;
    gap: 10px;
}

#gh-os-desktop-root .gh-os-size-grid {
    grid-template-columns: repeat(3, 1fr);
}

#gh-os-desktop-root .gh-os-shadow-grid {
    grid-template-columns: repeat(4, 1fr);
}

#gh-os-desktop-root .gh-os-settings-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

#gh-os-desktop-root .gh-os-settings-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

#gh-os-desktop-root .gh-os-settings-card.active {
    background: rgba(37, 99, 235, 0.18);
    border-color: #3b82f6;
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.25);
}

#gh-os-desktop-root .gh-os-settings-card .gh-os-card-name {
    font-size: 12px;
    font-weight: 600;
    color: #f1f5f9;
    margin-top: 6px;
}

#gh-os-desktop-root .gh-os-settings-card.active .gh-os-card-name {
    color: #93c5fd;
}

#gh-os-desktop-root .gh-os-settings-card .gh-os-card-desc {
    font-size: 9.5px;
    color: #94a3b8;
    margin-top: 2px;
    line-height: 1.2;
}

#gh-os-desktop-root .gh-os-card-icon-preview,
#gh-os-desktop-root .gh-os-card-shadow-preview {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#gh-os-desktop-root .gh-os-preview-tile {
    border-radius: 6px;
    background: linear-gradient(135deg, #0078D4, #2B88D8);
    transition: all 0.15s ease;
}

#gh-os-desktop-root .gh-os-preview-tile.s { width: 22px; height: 22px; }
#gh-os-desktop-root .gh-os-preview-tile.m { width: 28px; height: 28px; }
#gh-os-desktop-root .gh-os-preview-tile.l { width: 34px; height: 34px; }

#gh-os-desktop-root .gh-os-preview-tile.s-none {
    width: 28px;
    height: 28px;
    box-shadow: none;
}
#gh-os-desktop-root .gh-os-preview-tile.s-subtle {
    width: 28px;
    height: 28px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
}
#gh-os-desktop-root .gh-os-preview-tile.s-deep {
    width: 28px;
    height: 28px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.8), 0 0 10px rgba(0, 0, 0, 0.6);
}
#gh-os-desktop-root .gh-os-preview-tile.s-glass {
    width: 28px;
    height: 28px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

/* Live desktop sample box */
#gh-os-desktop-root .gh-os-settings-live-preview-box {
    margin-top: 18px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px 14px;
}

#gh-os-desktop-root .gh-os-preview-box-header {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

#gh-os-desktop-root .gh-os-preview-sample-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 14px 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    min-height: 120px;
    background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 16px 16px;
}

#gh-os-desktop-root .gh-os-sample-icon {
    position: static !important;
}

/* Modal footer action buttons */
#gh-os-desktop-root .gh-os-settings-footer-actions {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
    gap: 10px;
}

#gh-os-desktop-root .gh-os-settings-action-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 11.5px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

#gh-os-desktop-root .gh-os-settings-action-link:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(96, 165, 250, 0.4);
    color: #60a5fa;
}

#gh-os-desktop-root .gh-os-settings-reset-link {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 11px;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.15s ease;
}

#gh-os-desktop-root .gh-os-settings-reset-link:hover {
    color: #f87171;
}

@media (max-width: 620px) {
    #gh-os-desktop-root .gh-os-settings-cards-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* --------------------------------------------------------------------------
   Theme Gift Manager Modal (Admin Only)
   -------------------------------------------------------------------------- */
#gh-os-desktop-root .gh-os-theme-gift-modal-box {
    width: 680px;
    max-width: 95vw;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(32px) saturate(190%);
    -webkit-backdrop-filter: blur(32px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#gh-os-desktop-root .gh-os-gift-icon-badge {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(147, 51, 234, 0.2));
    border: 1px solid rgba(96, 165, 250, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#gh-os-desktop-root .gh-os-theme-gift-body {
    padding: 18px 24px 24px;
    overflow-y: auto;
    max-height: 75vh;
}

#gh-os-desktop-root .gh-os-theme-gift-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

#gh-os-desktop-root .gh-os-gift-input-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 160px;
}

#gh-os-desktop-root .gh-os-gift-label {
    font-size: 10.5px;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.5px;
}

#gh-os-desktop-root .gh-os-gift-input {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 8px 12px;
    color: #f1f5f9;
    font-size: 12.5px;
    font-family: inherit;
    outline: none;
    transition: all 0.15s ease;
}

#gh-os-desktop-root .gh-os-gift-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

#gh-os-desktop-root .gh-os-gift-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 9px 16px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transition: all 0.15s ease;
    white-space: nowrap;
    height: 36px;
}

#gh-os-desktop-root .gh-os-gift-submit-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

#gh-os-desktop-root .gh-os-gift-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

#gh-os-desktop-root .gh-os-gift-list-title {
    font-size: 11.5px;
    font-weight: 700;
    color: #cbd5e1;
    letter-spacing: 0.5px;
}

#gh-os-desktop-root .gh-os-gift-refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 11px;
    padding: 4px 9px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s ease;
}

#gh-os-desktop-root .gh-os-gift-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #60a5fa;
}

#gh-os-desktop-root .gh-os-gift-table-wrap {
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
    max-height: 280px;
    overflow-y: auto;
}

#gh-os-desktop-root .gh-os-gift-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: left;
}

#gh-os-desktop-root .gh-os-gift-table th {
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.7);
    color: #94a3b8;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#gh-os-desktop-root .gh-os-gift-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
    vertical-align: middle;
}

#gh-os-desktop-root .gh-os-gift-table tr:hover td {
    background: rgba(255, 255, 255, 0.025);
}

#gh-os-desktop-root .gh-os-gift-user-cell {
    display: flex;
    align-items: center;
    gap: 9px;
}

#gh-os-desktop-root .gh-os-gift-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

#gh-os-desktop-root .gh-os-gift-avatar-placeholder {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

#gh-os-desktop-root .gh-os-gift-username {
    font-weight: 600;
    color: #f1f5f9;
}

#gh-os-desktop-root .gh-os-gift-tag {
    font-size: 11px;
    color: #94a3b8;
}

#gh-os-desktop-root .gh-os-gift-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    color: #cbd5e1;
}

#gh-os-desktop-root .gh-os-gift-date {
    font-size: 11px;
    color: #94a3b8;
}

#gh-os-desktop-root .gh-os-gift-note {
    font-size: 11.5px;
    color: #cbd5e1;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

#gh-os-desktop-root .gh-os-gift-revoke-btn {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s ease;
}

#gh-os-desktop-root .gh-os-gift-revoke-btn:hover {
    background: #dc2626;
    border-color: #ef4444;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
}

#gh-os-desktop-root .gh-os-gift-empty {
    text-align: center;
    color: #94a3b8;
    padding: 24px 16px;
    font-size: 12px;
}
