/* Windows-style desktop environment */

.desktop-root {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    background: var(--desktop-bg, #1a1a2e);
    color: var(--bs-body-color);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    user-select: none;
    -webkit-user-select: none;
    overflow: hidden;
}

/* Desktop wallpaper area */
.desktop-area {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0f0c29 0%, #1a1a2e 35%, #24243e 100%);
}

/* Desktop shortcut icons */
.desktop-shortcut {
    position: absolute;
    width: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.1s;
    z-index: 1;
}

.desktop-shortcut:hover {
    background: rgba(255, 255, 255, 0.08);
}

.desktop-shortcut:active {
    background: rgba(255, 255, 255, 0.12);
}

.shortcut-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
}

.shortcut-icon .bi {
    line-height: 1;
}

.shortcut-label {
    font-size: 11px;
    color: #fff;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    word-break: break-word;
    line-height: 1.3;
    max-height: 2.6em;
    overflow: hidden;
}

/* Taskbar */
.desktop-taskbar {
    height: 44px;
    background: rgba(20, 20, 40, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    padding: 0 8px;
    gap: 8px;
    z-index: 100;
}

.taskbar-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.taskbar-start-btn {
    width: 38px;
    height: 34px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 18px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.taskbar-start-btn:hover,
.taskbar-start-btn.active {
    background: rgba(255, 255, 255, 0.12);
}

.taskbar-start-btn .bi {
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.taskbar-search {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 4px 10px;
    width: 200px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.taskbar-search input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 12px;
    width: 100%;
}

.taskbar-search input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.taskbar-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    overflow-x: auto;
}

.taskbar-window-btn {
    position: relative;
    height: 32px;
    padding: 0 12px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: #ddd;
    font-size: 11px;
    border-radius: 5px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.taskbar-window-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.taskbar-window-btn.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.taskbar-window-btn.minimized-btn {
    opacity: 0.55;
}

.taskbar-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.taskbar-notifications {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Clock with date */
.taskbar-clock {
    color: #ddd;
    font-size: 11px;
    padding: 0 6px;
    white-space: nowrap;
}

.taskbar-clock-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
    line-height: 1.3;
}

.taskbar-clock-wrap:hover { background: rgba(255,255,255,0.1); }

.taskbar-clock-time {
    color: #ddd;
    font-size: 12px;
    white-space: nowrap;
}

.taskbar-clock-date {
    color: rgba(255,255,255,0.55);
    font-size: 10px;
    white-space: nowrap;
}

/* Show Desktop button */
.show-desktop-btn {
    width: 6px;
    height: 34px;
    border: none;
    border-left: 1px solid rgba(255,255,255,0.12);
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
}

.show-desktop-btn:hover { background: rgba(255,255,255,0.12); }

/* Taskbar thumbnail hover preview */
.taskbar-window-btn {
    position: relative;
}

.taskbar-thumb-preview {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    background: rgba(28, 28, 48, 0.97);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    z-index: 1000;
    pointer-events: none;
    overflow: hidden;
}

.taskbar-thumb-title {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    font-size: 11px;
    color: #ccc;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.taskbar-thumb-body {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
}

.taskbar-thumb-icon {
    font-size: 36px;
    color: rgba(255,255,255,0.25);
}

/* Alt+Tab switcher */
.alttab-backdrop {
    position: fixed;
    inset: 0;
    z-index: 800;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
}

.alttab-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(22, 22, 40, 0.95);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 20px;
    z-index: 801;
    box-shadow: 0 12px 48px rgba(0,0,0,0.7);
    min-width: 400px;
    max-width: 80vw;
}

.alttab-title {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.alttab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.alttab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 90px;
    padding: 10px 6px;
    border: 2px solid transparent;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    cursor: pointer;
    color: #ccc;
    transition: border-color 0.1s, background 0.1s;
}

.alttab-item:hover, .alttab-item.active {
    border-color: rgba(80,130,255,0.7);
    background: rgba(80,130,255,0.15);
    color: #fff;
}

.alttab-thumb {
    width: 64px;
    height: 48px;
    background: rgba(0,0,0,0.3);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alttab-thumb-icon { font-size: 24px; color: rgba(255,255,255,0.4); }

.alttab-label {
    font-size: 10px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

/* Snap Assist panel */
.snap-assist-panel {
    position: absolute;
    background: rgba(22, 22, 40, 0.94);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 12px;
    z-index: 510;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    min-width: 200px;
    backdrop-filter: blur(20px);
}

.snap-assist-title {
    font-size: 10px;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 10px;
}

.snap-assist-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.snap-assist-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
    cursor: pointer;
    color: #ccc;
    font-size: 12px;
    white-space: nowrap;
    transition: background 0.1s;
    width: 100%;
}

.snap-assist-item:hover { background: rgba(255,255,255,0.1); color: #fff; }
.snap-assist-icon { font-size: 14px; color: rgba(255,255,255,0.5); }
.snap-assist-label { overflow: hidden; text-overflow: ellipsis; }

.snap-assist-close {
    position: absolute;
    top: 6px;
    right: 6px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    font-size: 12px;
    padding: 2px 4px;
    border-radius: 3px;
}
.snap-assist-close:hover { color: #fff; background: rgba(255,255,255,0.1); }

.taskbar-notify-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #ddd;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background 0.15s;
}

.taskbar-notify-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.notify-badge {
    position: absolute;
    top: 2px;
    right: 4px;
    background: #e74c3c;
    color: #fff;
    font-size: 9px;
    min-width: 15px;
    height: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

/* Start Menu */
.start-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 600;
}

.start-menu {
    position: fixed;
    bottom: 52px;
    left: 8px;
    width: 360px;
    max-height: 560px;
    background: rgba(30, 30, 55, 0.96);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    z-index: 601;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.start-menu-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 16px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 14px;
}

.start-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.start-user-avatar .bi {
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.start-menu-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.start-menu-section {
    margin-bottom: 8px;
}

.start-menu-section-title {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 8px 4px;
}

.start-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 7px 10px;
    border: none;
    background: transparent;
    color: #ddd;
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    transition: background 0.1s;
}

.start-menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.start-menu-item-icon {
    font-size: 16px;
    width: 24px;
    min-width: 24px;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.6);
}

/* Start menu section headers (nested nav) */
.start-section-group {
    margin-bottom: 1px;
}

.start-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 7px 10px;
    border: none;
    background: rgba(255, 255, 255, 0.04);
    color: #ccc;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    transition: background 0.1s;
}

.start-section-header:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.start-section-header.open { background: rgba(255, 255, 255, 0.07); color: #fff; }

.start-section-chevron {
    font-size: 10px;
    transition: transform 0.18s ease;
    color: rgba(255, 255, 255, 0.4);
}

.start-section-chevron.open { transform: rotate(90deg); }

.start-menu-sub-item {
    padding-left: 28px !important;
    font-size: 12px !important;
    color: rgba(255, 255, 255, 0.75) !important;
}

.start-menu-sub-item:hover { background: rgba(255, 255, 255, 0.07) !important; color: #fff !important; }

.start-menu-pin {
    margin-left: auto;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.2);
    transition: color 0.15s, background 0.15s;
    padding: 3px 5px;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
}

.start-menu-pin:hover {
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.08);
}

.start-menu-pin.pinned {
    color: #4fc3f7;
}

.start-menu-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 6px;
}

/* Windows */
.desktop-window {
    position: absolute;
    border-radius: 8px;
    background: var(--desktop-window-bg, #1e1e32);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    min-width: 300px;
    min-height: 200px;
    transition: box-shadow 0.15s;
}

.desktop-window.focused {
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(100, 150, 255, 0.2);
}

.desktop-window.maximized {
    border-radius: 0;
    width: 100% !important;
    height: calc(100% - 44px) !important;
}

.desktop-window.minimized {
    display: none;
}

.window-titlebar {
    height: 36px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    padding: 0 8px;
    gap: 8px;
    cursor: default;
    flex-shrink: 0;
}

.window-title-icon {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

.window-title {
    flex: 1;
    font-size: 12px;
    color: #ccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.window-controls {
    display: flex;
    gap: 2px;
}

.window-btn {
    width: 30px;
    height: 26px;
    border: none;
    background: transparent;
    color: #ccc;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s;
}

.window-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.window-btn.close:hover {
    background: #e81123;
    color: #fff;
}

.window-body {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.window-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
}

/* Resize handles */
.resize-handle {
    position: absolute;
    z-index: 10;
}

.resize-handle.n  { top: 0; left: 8px; right: 8px; height: 5px; cursor: n-resize; }
.resize-handle.s  { bottom: 0; left: 8px; right: 8px; height: 5px; cursor: s-resize; }
.resize-handle.e  { right: 0; top: 8px; bottom: 8px; width: 5px; cursor: e-resize; }
.resize-handle.w  { left: 0; top: 8px; bottom: 8px; width: 5px; cursor: w-resize; }
.resize-handle.ne { top: 0; right: 0; width: 10px; height: 10px; cursor: ne-resize; }
.resize-handle.nw { top: 0; left: 0; width: 10px; height: 10px; cursor: nw-resize; }
.resize-handle.se { bottom: 0; right: 0; width: 10px; height: 10px; cursor: se-resize; }
.resize-handle.sw { bottom: 0; left: 0; width: 10px; height: 10px; cursor: sw-resize; }

/* Notification Panel */
.notify-backdrop {
    position: fixed;
    inset: 0;
    z-index: 600;
}

.notify-panel {
    position: fixed;
    bottom: 52px;
    right: 8px;
    width: 340px;
    max-height: 420px;
    background: rgba(30, 30, 55, 0.96);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    z-index: 601;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.notify-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 13px;
}

.notify-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 4px;
}

.notify-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    color: #ddd;
    font-size: 12px;
    transition: background 0.1s;
}

.notify-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.notify-item-text {
    flex: 1;
    min-width: 0;
}

.smaller {
    font-size: 11px;
}

/* Context Menu */
.desktop-context-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 602;
}

.desktop-context-menu {
    position: fixed;
    z-index: 603;
    background: rgba(35, 35, 60, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 4px;
    min-width: 180px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.context-menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 7px 12px;
    border: none;
    background: transparent;
    color: #ddd;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    transition: background 0.1s;
}

.context-menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.context-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 4px 8px;
}

/* Context menu submenu */
.context-menu-submenu-trigger {
    display: flex;
    align-items: center;
    position: relative;
    padding: 7px 12px;
    color: #ddd;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.1s;
    user-select: none;
}

.context-menu-submenu-trigger:hover { background: rgba(255, 255, 255, 0.08); }

.context-submenu {
    position: absolute;
    left: 100%;
    top: -4px;
    min-width: 170px;
    background: rgba(35, 35, 60, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    z-index: 5;
}

.context-menu-item.active {
    color: #4fc3f7;
}

/* Icon size variants */
.icons-large .desktop-shortcut  { width: 110px; }
.icons-large .shortcut-icon     { width: 60px; height: 60px; font-size: 36px; border-radius: 12px; }
.icons-large .shortcut-label    { font-size: 12px; }

.icons-medium .desktop-shortcut { width: 90px; }   /* default */

.icons-small .desktop-shortcut  { width: 70px; flex-direction: row; gap: 6px; padding: 4px 6px; align-items: center; }
.icons-small .shortcut-icon     { width: 28px; height: 28px; font-size: 16px; border-radius: 6px; flex-shrink: 0; }
.icons-small .shortcut-label    { font-size: 10px; text-align: left; }

/* ── Wallpaper / Personalization Panel ────────────────────────── */
.wallpaper-backdrop {
    position: fixed;
    inset: 0;
    z-index: 700;
    background: rgba(0, 0, 0, 0.4);
}

.wallpaper-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 480px;
    max-height: 82vh;
    background: rgba(22, 22, 40, 0.97);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    z-index: 701;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.wallpaper-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    color: #fff;
    font-size: 14px;
    flex-shrink: 0;
}

.wallpaper-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
}

.wallpaper-panel-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px 16px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    flex-shrink: 0;
}

.wallpaper-type-row {
    display: flex;
    gap: 6px;
    padding: 10px 16px 0;
}

.wallpaper-type-btn {
    flex: 1;
    padding: 7px 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.wallpaper-type-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}

.wallpaper-type-btn.active {
    background: rgba(80, 130, 255, 0.25);
    border-color: rgba(80, 130, 255, 0.6);
    color: #fff;
}

.wallpaper-preview {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #111;
    overflow: hidden;
    flex-shrink: 0;
}

.wallpaper-section-title {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.wallpaper-color-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.wallpaper-color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    padding: 0;
    background: transparent;
}

.wallpaper-color-swatch.big {
    width: 52px;
    height: 52px;
}

.wallpaper-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.wallpaper-preset-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    transition: border-color 0.1s, transform 0.1s;
}

.wallpaper-preset-dot:hover {
    transform: scale(1.15);
}

.wallpaper-preset-dot.active {
    border-color: #fff;
    transform: scale(1.15);
}

.wallpaper-direction-grid {
    display: grid;
    grid-template-columns: repeat(3, 32px);
    gap: 4px;
    margin-bottom: 4px;
}

.dir-btn {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: background 0.1s, color 0.1s;
}

.dir-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.dir-btn.active { background: rgba(80, 130, 255, 0.3); border-color: rgba(80, 130, 255, 0.6); color: #fff; }

.wallpaper-photo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.wallpaper-photo-thumb {
    aspect-ratio: 16/9;
    border-radius: 5px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    background: rgba(255, 255, 255, 0.05);
    transition: border-color 0.15s, transform 0.1s;
}

.wallpaper-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wallpaper-photo-thumb:hover { transform: scale(1.03); }
.wallpaper-photo-thumb.active { border-color: #4fc3f7; }

.btn-icon {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.1s, color 0.1s;
}
.btn-icon:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

/* Snap preview overlay */
.snap-preview {
    position: absolute;
    background: rgba(80, 130, 255, 0.18);
    border: 2px solid rgba(80, 130, 255, 0.55);
    border-radius: 8px;
    pointer-events: none;
    z-index: 50;
    transition: left 0.08s ease, top 0.08s ease, width 0.08s ease, height 0.08s ease;
    box-shadow: inset 0 0 20px rgba(80, 130, 255, 0.08);
}
