/* Infinite OS — Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
:root {
    --bg: #0f0f1a;
    --bg2: #1a1a2e;
    --bg3: #252540;
    --surface: #ffffff08;
    --surface-hover: #ffffff14;
    --border: #ffffff14;
    --accent: #7c3aed;
    --accent-hover: #6d28d9;
    --text: #e8e8f0;
    --text2: #9898b0;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --taskbar-height: 44px;
    --transition: 0.2s ease;
}
body {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    user-select: none;
}

#desktop {
    position: fixed;
    inset: 0 0 var(--taskbar-height) 0;
    background:
        radial-gradient(ellipse at 20% 50%, #1a1a2e88 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, #2d1b6988 0%, transparent 60%),
        radial-gradient(ellipse at 50% 80%, #0f346088 0%, transparent 60%),
        linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #0f0f1a 100%);
    overflow: hidden;
}
#desktop-icons {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 4px;
    padding: 16px;
    height: 100%;
    align-content: flex-start;
}
#desktop-widgets {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}
.desktop-widget {
    position: absolute;
    width: 240px;
    min-height: 132px;
    color: var(--text);
    background: var(--bg2);
    background: color-mix(in srgb, var(--bg2) 82%, transparent);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 4px);
    box-shadow: var(--shadow);
    overflow: hidden;
    pointer-events: auto;
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    user-select: none;
    animation: winOpen 0.18s ease;
}
.desktop-widget-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: 34px;
    padding: 0 8px 0 12px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    cursor: move;
}
.desktop-widget-title {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-size: 12px;
    font-weight: 600;
}
.desktop-widget-title span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.desktop-widget-actions {
    display: flex;
    gap: 4px;
    flex: 0 0 auto;
}
.desktop-widget-actions button {
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 999px;
    color: var(--text2);
    background: transparent;
    cursor: pointer;
}
.desktop-widget-actions button:hover {
    color: var(--text);
    background: var(--surface-hover);
}
.desktop-widget-body {
    padding: 14px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text2);
    white-space: pre-wrap;
}
.desktop-widget-body.has-frame {
    min-height: 96px;
    padding: 0;
    overflow: hidden;
    white-space: normal;
    scrollbar-width: none;
}
.desktop-widget-body.has-frame::-webkit-scrollbar {
    display: none;
}
.desktop-widget-frame {
    display: block;
    width: 100%;
    height: 96px;
    border: 0;
    background: transparent;
    color-scheme: dark;
    overflow: hidden;
}
.desktop-widget-frame::-webkit-scrollbar {
    display: none;
}
.desktop-widget-status {
    min-height: 104px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-align: center;
}
.desktop-widget-status .spinner {
    width: 20px;
    height: 20px;
    border-width: 2px;
}
.desktop-widget-status strong {
    color: var(--text);
    font-size: 13px;
}
.desktop-widget-status small {
    max-width: 190px;
    color: var(--text2);
    font-size: 11px;
    line-height: 1.35;
}
.desktop-widget-status.error strong {
    color: #ff6b6b;
}
.desktop-widget-clock {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--text);
}
.desktop-widget-clock strong {
    font-size: 34px;
    line-height: 1;
    letter-spacing: -0.04em;
}
.desktop-widget-clock span {
    color: var(--text2);
    font-size: 12px;
}
.desktop-widget-list {
    margin: 0;
    padding-left: 18px;
}
.desktop-widget-list li {
    margin: 3px 0;
}
.widget-dialog-o {
    position: fixed;
    inset: 0;
    z-index: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.widget-dialog {
    width: min(420px, 100%);
    color: var(--text);
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 6px);
    box-shadow: var(--shadow);
    overflow: hidden;
    animation: winOpen 0.16s ease;
}
.widget-dialog-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 18px 18px 12px;
}
.widget-dialog-head > span {
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: var(--surface);
    font-size: 20px;
}
.widget-dialog-head strong,
.widget-dialog-head small {
    display: block;
}
.widget-dialog-head strong {
    font-size: 16px;
    margin-bottom: 3px;
}
.widget-dialog-head small {
    color: var(--text2);
    font-size: 12px;
    line-height: 1.4;
}
.widget-dialog-input {
    display: block;
    width: calc(100% - 36px);
    margin: 0 18px;
    padding: 12px;
    resize: vertical;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
}
.widget-dialog-input:focus {
    border-color: var(--accent);
}
.widget-dialog-hint {
    margin: 8px 18px 0;
    color: var(--text2);
    font-size: 11px;
    line-height: 1.4;
}
.widget-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 18px 18px;
}
.widget-dialog-actions button {
    padding: 8px 14px;
    border: 0;
    border-radius: var(--radius-sm);
    color: var(--text);
    background: var(--surface);
    cursor: pointer;
}
.widget-dialog-actions button:hover {
    background: var(--surface-hover);
}
.widget-dialog-ok {
    color: #fff !important;
    background: var(--accent) !important;
}
.widget-dialog-ok:hover {
    background: var(--accent-hover) !important;
}
.widget-dialog-ok.danger {
    background: #ef4444 !important;
}
.widget-dialog-ok.danger:hover {
    background: #dc2626 !important;
}
.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 84px;
    padding: 8px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition);
    gap: 4px;
}
.desktop-icon:hover {
    background: var(--surface-hover);
}
.svg-icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    object-fit: contain;
    vertical-align: -0.15em;
    border-radius: 0.22em;
}
.desktop-icon .icon-emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    font-size: 28px;
    line-height: 1;
}
.desktop-icon .icon-emoji .svg-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}
.properties-icon {
    border-radius: 13px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}
.desktop-icon .icon-label {
    font-size: 11px;
    text-align: center;
    line-height: 1.2;
    color: var(--text);
    word-break: break-word;
    max-width: 72px;
}

#windows-container {
    position: fixed;
    inset: 0 0 var(--taskbar-height) 0;
    pointer-events: none;
    z-index: 10;
}
.window {
    position: absolute;
    min-width: 300px;
    min-height: 200px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    pointer-events: auto;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    animation: winOpen 0.2s ease;
}
@keyframes winOpen {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
.window.max {
    border-radius: 0;
    border: none;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
}
.window-titlebar {
    display: flex;
    align-items: center;
    padding: 0 8px;
    height: 36px;
    background: var(--bg3);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    cursor: default;
}
.window-titlebar .t {
    flex: 1;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    color: var(--text2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 8px;
}
.window-titlebar .t .ie {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-right: 4px;
    vertical-align: -3px;
}
.window-titlebar .t .ie .svg-icon {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}
.wc {
    display: flex;
    gap: 6px;
    align-items: center;
    flex: 0 0 auto;
}
.wc button {
    appearance: none;
    flex: 0 0 12px;
    width: 12px !important;
    height: 12px !important;
    min-width: 12px;
    min-height: 12px;
    max-width: 12px;
    max-height: 12px;
    padding: 0 !important;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: filter 0.1s;
}
.wc button:hover {
    filter: brightness(1.2);
}
.wcc {
    background: #ff5f57;
}
.wcm {
    background: #febc2e;
}
.wcx {
    background: #28c840;
}
.window-body {
    flex: 1;
    overflow: hidden;
    position: relative;
}
.app-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
    color-scheme: dark;
    pointer-events: auto;
}
body.is-dragging .app-frame,
body.is-resizing .app-frame,
body.is-dragging .desktop-widget-frame,
body.is-resizing .desktop-widget-frame {
    pointer-events: none !important;
}
.wrz {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    cursor: nwse-resize;
    z-index: 5;
}
.wrz::after {
    content: "";
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 6px;
    height: 6px;
    border-right: 2px solid var(--text2);
    border-bottom: 2px solid var(--text2);
    opacity: 0.3;
}

/* Boot Screen */
#boot {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.7s ease;
}
#boot::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 50%, #1a1a2e 0%, transparent 60%),
        radial-gradient(ellipse at 70% 50%, #2d1b69 0%, transparent 60%);
    opacity: 0;
    animation: bootGlowIn 2.5s ease forwards;
    pointer-events: none;
}
@keyframes bootGlowIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}
#boot.hide {
    opacity: 0;
    pointer-events: none;
}
#boot-box {
    text-align: center;
    position: relative;
    z-index: 1;
    animation: bootFadeIn 1s ease forwards;
}
@keyframes bootFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
#boot-logo {
    font-size: 52px;
    margin-bottom: 10px;
    color: #7c3aed;
    display: inline-block;
    animation: bootPulse 2.5s ease-in-out infinite;
    filter: drop-shadow(0 0 12px rgba(124, 58, 237, 0.4));
}
@keyframes bootPulse {
    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 12px rgba(124, 58, 237, 0.4));
    }
    50% {
        transform: scale(1.06);
        filter: drop-shadow(0 0 28px rgba(124, 58, 237, 0.7));
    }
}
#boot-name {
    font-size: 22px;
    font-weight: 300;
    letter-spacing: 4px;
    margin-bottom: 32px;
    color: #ccc;
    animation: bootReveal 1.2s ease forwards;
}
@keyframes bootReveal {
    from {
        opacity: 0;
        letter-spacing: 12px;
        filter: blur(4px);
    }
    to {
        opacity: 1;
        letter-spacing: 4px;
        filter: blur(0);
    }
}
#boot-spinner {
    margin-bottom: 20px;
}
.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #ffffff12;
    border-top-color: #a78bfa;
    border-bottom-color: #7c3aed;
    border-radius: 50%;
    animation: spin 0.9s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    margin: 0 auto;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
#boot-status {
    font-size: 13px;
    color: #9898b0;
    margin-bottom: 14px;
    min-height: 20px;
    font-weight: 400;
    letter-spacing: 0.5px;
}
#boot-bar-wrap {
    width: 280px;
    height: 3px;
    background: #ffffff0d;
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto;
    position: relative;
}
#boot-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #7c3aed, #a78bfa, #7c3aed);
    background-size: 200% 100%;
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: barShimmer 1.5s linear infinite;
}
@keyframes barShimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

#boot-stars {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
@keyframes twinkle {
    0%,
    100% {
        opacity: 0.15;
    }
    50% {
        opacity: 0.9;
    }
}

#taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--taskbar-height);
    background: var(--bg2);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 8px;
    z-index: 100;
    backdrop-filter: blur(20px);
}
#tb-start {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--accent);
    font-size: 18px;
    cursor: pointer;
    transition: background var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
#tb-start:hover {
    background: var(--surface-hover);
}
#tb-apps {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 8px;
    overflow: hidden;
}
.tb-app {
    padding: 4px 12px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 12px;
    cursor: pointer;
    transition: background var(--transition);
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 30px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.tb-app .tb-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    border-radius: 4px;
}
.tb-app .tb-title {
    overflow: hidden;
    text-overflow: ellipsis;
}
.tb-app:hover {
    background: var(--surface-hover);
}
.tb-app.on {
    background: var(--accent);
    color: #fff;
}
.tb-app.on:hover {
    background: var(--accent-hover);
}
#tb-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
#tb-clock {
    font-size: 12px;
    color: var(--text2);
    padding: 0 8px;
    font-variant-numeric: tabular-nums;
}

/* Start Menu */
#sm-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}
#sm-footer {
    display: flex;
    gap: 2px;
    padding: 6px 12px 8px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    justify-content: center;
}
.sm-act {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text);
    font-size: 12px;
    cursor: pointer;
    transition: background var(--transition);
    white-space: nowrap;
}
.sm-act:hover {
    background: var(--surface);
}
.sm-act span:first-child {
    font-size: 15px;
}

/* Settings App */
.settings-wrap {
    padding: 20px;
    overflow-y: auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.settings-wrap h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.settings-wrap .sec {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}
.settings-wrap .sec h3 {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 10px;
    color: var(--text);
}
.settings-wrap label {
    font-size: 12px;
    color: var(--text2);
    display: block;
    margin-bottom: 5px;
}
.settings-wrap .swatch-grid {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.settings-wrap .swatch {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition:
        transform var(--transition),
        border-color var(--transition);
    border: 2px solid transparent;
}
.settings-wrap .swatch:hover {
    transform: scale(1.15);
}
.settings-wrap .swatch.on {
    border-color: var(--text);
}
.settings-wrap input[type="text"],
.settings-wrap input[type="url"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg3);
    color: var(--text);
    font-size: 13px;
    outline: none;
    transition: border-color var(--transition);
}
.settings-wrap input[type="text"]:focus,
.settings-wrap input[type="url"]:focus {
    border-color: var(--accent);
}
.settings-wrap input[type="range"] {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg3);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}
.settings-wrap input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg2);
    cursor: pointer;
}
.settings-wrap .range-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.settings-wrap .range-row span {
    font-size: 12px;
    color: var(--text2);
    min-width: 32px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.settings-wrap .wp-preview {
    width: 100%;
    height: 100px;
    border-radius: var(--radius-sm);
    background: var(--bg3);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin-top: 8px;
    transition: background-image 0.3s ease;
    border: 1px solid var(--border);
}
.settings-wrap .btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}
.settings-wrap .btn-row button {
    padding: 8px 20px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    transition: background var(--transition);
}
.settings-wrap .btn-primary {
    background: var(--accent);
    color: #fff;
}
.settings-wrap .btn-primary:hover {
    background: var(--accent-hover);
}
.settings-wrap .btn-secondary {
    background: var(--surface);
    color: var(--text);
}
.settings-wrap .btn-secondary:hover {
    background: var(--surface-hover);
}
.settings-wrap .btn-danger {
    background: #ef444444;
    color: #f87171;
}
.settings-wrap .btn-danger:hover {
    background: #ef444466;
}
.settings-wrap .menu-editor {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.settings-wrap .menu-editor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg3);
}
.settings-wrap .menu-editor-head div {
    min-width: 0;
}
.settings-wrap .menu-editor-head strong {
    display: block;
    font-size: 13px;
    color: var(--text);
    margin-bottom: 2px;
}
.settings-wrap .menu-editor-head span {
    display: block;
    font-size: 11px;
    line-height: 1.4;
    color: var(--text2);
}
.settings-wrap .menu-reset-mini {
    flex-shrink: 0;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-size: 12px;
    transition:
        background var(--transition),
        border-color var(--transition);
}
.settings-wrap .menu-reset-mini:hover {
    background: var(--surface-hover);
    border-color: var(--accent);
}
.settings-wrap .menu-preview-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    min-height: 42px;
    align-items: center;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
}
.settings-wrap .menu-preview-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    padding: 5px 8px;
    border-radius: 999px;
    background: var(--bg3);
    color: var(--text);
    border: 1px solid var(--border);
    font-size: 11px;
    line-height: 1;
}
.settings-wrap .menu-preview-icon {
    font-size: 12px;
}
.settings-wrap .menu-preview-empty,
.settings-wrap .menu-empty-card {
    color: var(--text2);
    font-size: 11px;
    line-height: 1.4;
}
.settings-wrap .menu-empty-card {
    padding: 10px 12px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
}
.settings-wrap .menu-editor-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.settings-wrap .menu-group-title {
    margin: 4px 2px 0;
    color: var(--text2);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.settings-wrap .menu-edit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition:
        background var(--transition),
        border-color var(--transition),
        opacity var(--transition);
}
.settings-wrap .menu-edit-row:hover {
    background: var(--surface-hover);
}
.settings-wrap .menu-edit-row.off {
    opacity: 0.72;
}
.settings-wrap .menu-edit-info {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}
.settings-wrap .menu-edit-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 16px;
}
.settings-wrap .menu-edit-row.off .menu-edit-icon {
    filter: grayscale(1);
}
.settings-wrap .menu-edit-main {
    min-width: 0;
}
.settings-wrap .menu-edit-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.settings-wrap .menu-edit-title {
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}
.settings-wrap .menu-edit-desc {
    margin-top: 2px;
    color: var(--text2);
    font-size: 11px;
    line-height: 1.35;
}
.settings-wrap .menu-shortcut-chip {
    padding: 2px 6px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text2);
    font-size: 10px;
    font-weight: 600;
}
.settings-wrap .menu-edit-side {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.settings-wrap .menu-order-badge {
    min-width: 26px;
    height: 22px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text2);
    font-size: 10px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.settings-wrap .menu-order-badge.muted {
    min-width: 48px;
    font-weight: 600;
}
.settings-wrap .menu-edit-controls {
    display: flex;
    gap: 4px;
}
.settings-wrap .menu-edit-controls button {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-size: 13px;
    transition:
        background var(--transition),
        border-color var(--transition),
        opacity var(--transition);
}
.settings-wrap .menu-edit-controls button:hover:not(:disabled) {
    background: var(--surface-hover);
    border-color: var(--accent);
}
.settings-wrap .menu-edit-controls button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.settings-wrap .menu-toggle {
    position: relative;
    display: block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
    margin: 0;
    cursor: pointer;
}
.settings-wrap .menu-toggle input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.settings-wrap .menu-toggle-ui {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: var(--bg3);
    border: 1px solid var(--border);
    transition:
        background var(--transition),
        border-color var(--transition);
}
.settings-wrap .menu-toggle-ui::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: var(--text2);
    transition:
        transform var(--transition),
        background var(--transition);
}
.settings-wrap .menu-toggle input:checked + .menu-toggle-ui {
    background: var(--accent);
    border-color: var(--accent);
}
.settings-wrap .menu-toggle input:checked + .menu-toggle-ui::after {
    transform: translateX(18px);
    background: #fff;
}
.settings-wrap .menu-toggle input:focus-visible + .menu-toggle-ui {
    box-shadow: 0 0 0 2px var(--accent);
}

/* Launcher */
#launcher {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
}
#launcher.hide {
    display: none;
}
#launcher-bg {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}
#launcher-box {
    position: relative;
    width: 560px;
    max-width: 90vw;
    max-height: 70vh;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: winOpen 0.2s ease;
}
#launcher-hd {
    padding: 16px 20px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
#launcher-srch {
    display: flex;
    gap: 8px;
    padding: 8px 20px;
}
#launcher-inp {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 15px;
    outline: none;
    transition: border-color var(--transition);
}
#launcher-inp:focus {
    border-color: var(--accent);
}
#launcher-inp::placeholder {
    color: var(--text2);
    opacity: 0.6;
}
#launcher-go {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background var(--transition);
    white-space: nowrap;
}
#launcher-go:hover {
    background: var(--accent-hover);
}
#launcher-go:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
#launcher-st {
    padding: 4px 20px 0;
    font-size: 12px;
    color: var(--text2);
    min-height: 20px;
}
#launcher-sug {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 20px 16px;
    overflow-y: auto;
}

/* Notifications */
#notif-box {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 320px;
}
.notif {
    padding: 12px 16px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
    animation: nfIn 0.3s ease;
    cursor: pointer;
}
@keyframes nfIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
.notif .nf-t {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}
.notif .nf-m {
    font-size: 12px;
    color: var(--text2);
}

/* Context Menu */
#ctx {
    position: fixed;
    z-index: 500;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 4px;
    min-width: 210px;
    backdrop-filter: blur(20px);
}
#ctx.hide {
    display: none;
}
#ctx .ctx-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition);
}
#ctx .ctx-item:hover {
    background: var(--surface);
}
#ctx .ctx-item em {
    color: var(--text2);
    font-size: 11px;
    font-style: normal;
}
#ctx .ctx-empty {
    padding: 10px 12px;
    color: var(--text2);
    font-size: 12px;
    cursor: default;
}
#ctx .div {
    height: 1px;
    background: var(--border);
    margin: 4px 8px;
    padding: 0;
    pointer-events: none;
}

/* About */
.ab-o {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 400;
}
.ab-b {
    width: 360px;
    padding: 32px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.ab-b h1 {
    font-size: 32px;
    margin-bottom: 4px;
}
.ab-b h2 {
    font-size: 14px;
    color: var(--text2);
    font-weight: 400;
    margin-bottom: 16px;
}
.ab-b p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text2);
    margin-bottom: 8px;
}
.ab-b button {
    margin-top: 16px;
    padding: 8px 24px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    font-size: 14px;
}
.ab-b button:hover {
    background: var(--accent-hover);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text2);
}

/* ─── Build / Loading Animations ─────────────────────────────────── */
@keyframes buildSpin {
    to {
        transform: rotate(360deg);
    }
}
@keyframes typingPulse {
    0%,
    100% {
        opacity: 0.3;
    }
    50% {
        opacity: 1;
    }
}
