/* ============ 统一App UI - Windows 11高斯模糊风格 ============ */

/* 窗口背景模糊 */
body.window-blur-enabled .window {
    background: rgba(243, 243, 243, 0.75);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
}

body.dark-mode.window-blur-enabled .window {
    background: rgba(32, 32, 32, 0.8);
}


/* 设置应用 */
.settings-app {
    background: transparent !important;
}

.settings-content {
    background: transparent !important;
}

/* 取消设置分区卡片背景，避免图片下方出现额外卡片层 */
.settings-section {
    background: transparent !important;
    backdrop-filter: none !important;
    border: none !important;
}

.dark-mode .settings-section {
    background: transparent !important;
    border: none !important;
}

/* 文件管理器 */
.files-app {
    background: transparent !important;
}

.files-content {
    background: transparent !important;
}

.files-toolbar {
    background: rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(30px) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.dark-mode .files-toolbar {
    background: rgba(255, 255, 255, 0.02) !important;
    border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}

/* 快记 */
.notes-app {
    background: rgba(249, 249, 249, 0.6) !important;
    backdrop-filter: blur(60px) saturate(180%) !important;
}

.dark-mode .notes-app {
    background: rgba(45, 45, 45, 0.6) !important;
}

.notes-toolbar {
    background: rgba(249, 249, 249, 0.7) !important;
    backdrop-filter: blur(40px) saturate(180%) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.dark-mode .notes-toolbar {
    background: rgba(45, 45, 45, 0.7) !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

.notes-editor-container {
    background: transparent !important;
}

.notes-editor {
    background: rgba(255, 255, 255, 0.4) !important;
    backdrop-filter: blur(30px) !important;
}

.dark-mode .notes-editor {
    background: rgba(255, 255, 255, 0.02) !important;
}

.notes-statusbar {
    background: rgba(249, 249, 249, 0.7) !important;
    backdrop-filter: blur(40px) saturate(180%) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.dark-mode .notes-statusbar {
    background: rgba(45, 45, 45, 0.7) !important;
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

/* 浏览器 */
.browser-app {
    background: transparent !important;
}

.browser-header {
    background: rgba(249, 249, 249, 0.8) !important;
    backdrop-filter: blur(50px) saturate(180%) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.dark-mode .browser-header {
    background: rgba(45, 45, 45, 0.8) !important;
    border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}

.browser-navbar {
    background: transparent !important;
}

.browser-address-bar {
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(20px) !important;
}

.dark-mode .browser-address-bar {
    background: rgba(255, 255, 255, 0.08) !important;
}

.browser-start-page {
    background: transparent !important;
}

/* 计算器 */
.calculator-app {
    background: rgba(249, 249, 249, 0.6) !important;
    backdrop-filter: blur(60px) saturate(180%) !important;
}

.dark-mode .calculator-app {
    background: rgba(45, 45, 45, 0.6) !important;
}

.calculator-display {
    background: rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(30px) !important;
}

.dark-mode .calculator-display {
    background: rgba(255, 255, 255, 0.02) !important;
}

.calculator-buttons {
    background: transparent !important;
}

.calculator-button {
    background: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(20px) !important;
}

.dark-mode .calculator-button {
    background: rgba(255, 255, 255, 0.05) !important;
}

.calculator-button:hover {
    background: rgba(255, 255, 255, 0.7) !important;
}

.dark-mode .calculator-button:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

.calculator-button.operator {
    background: rgba(var(--accent-rgb, 0, 120, 212), 0.2) !important;
}

.calculator-button.operator:hover {
    background: rgba(var(--accent-rgb, 0, 120, 212), 0.3) !important;
}

.calculator-button.equals {
    background: rgba(var(--accent-rgb, 0, 120, 212), 0.9) !important;
    color: white !important;
}

.calculator-button.equals:hover {
    background: var(--accent-hover) !important;
}

/* 模糊禁用时的纯色底 */
body.window-blur-disabled .window {
    background: var(--bg-primary) !important;
    backdrop-filter: none !important;
}

body.window-blur-disabled .settings-section,
body.window-blur-disabled .notes-editor,
body.window-blur-disabled .browser-address-bar,
body.window-blur-disabled .calculator-display {
    background: var(--bg-tertiary) !important;
    backdrop-filter: none !important;
}

body.window-blur-disabled .notes-toolbar,
body.window-blur-disabled .notes-statusbar,
body.window-blur-disabled .browser-header,
body.window-blur-disabled .files-toolbar {
    background: var(--bg-secondary) !important;
    backdrop-filter: none !important;
}

/* 快记 */
.notes-app {
    color: var(--text-primary);
    background: transparent !important;
    background-color: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    position: relative;
    overflow: hidden;
}

.window.fw-host .window-content.notes-app {
    background: transparent !important;
    background-color: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.notes-page,
.notes-editor-page {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.notes-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex: 0 0 auto;
    margin-bottom: 18px;
}

.notes-page-header h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.15;
    font-weight: 650;
}

.notes-page-header p {
    margin: 6px 0 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.notes-app .fw-nav-item[data-id="settings"] {
    margin-top: auto;
}

.notes-app .fw-sidebar,
.notes-app .fw-nav {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

.notes-list {
    min-height: 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 2px 2px 86px;
}

.notes-row {
    width: 100%;
    min-height: 74px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    padding: 12px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.46);
    text-align: left;
    cursor: pointer;
    transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.dark-mode .notes-row {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.07);
}

.notes-row:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.68);
    border-color: rgba(var(--accent-rgb, 0, 120, 212), 0.24);
}

.dark-mode .notes-row:hover {
    background: rgba(255, 255, 255, 0.12);
}

.notes-row-icon,
.notes-row-action {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--accent-rgb, 0, 120, 212), 0.12);
}

.notes-row-icon img,
.notes-row-action img {
    width: 20px;
    height: 20px;
}

.notes-row-action {
    width: 24px;
    height: 24px;
    opacity: 0.65;
    background: transparent;
}

.notes-row-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notes-row-title {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notes-row-star {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    filter: sepia(1) saturate(5) hue-rotate(342deg);
}

.notes-row-meta,
.notes-row-preview {
    min-width: 0;
    color: var(--text-secondary);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notes-row-preview {
    color: var(--text-tertiary);
}

.notes-empty {
    flex: 1;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-secondary);
    gap: 8px;
}

.notes-empty img {
    width: 48px;
    height: 48px;
    opacity: 0.64;
}

.notes-empty h2 {
    margin: 8px 0 0;
    color: var(--text-primary);
    font-size: 18px;
}

.notes-empty p {
    margin: 0;
    font-size: 13px;
}

.notes-fab {
    position: absolute;
    right: 28px;
    bottom: 28px;
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgb(var(--accent-rgb, 0, 120, 212)) !important;
    background-color: rgb(var(--accent-rgb, 0, 120, 212)) !important;
    box-shadow: 0 14px 32px rgba(var(--accent-rgb, 0, 120, 212), 0.34);
    cursor: pointer;
    transform: none;
    transition: filter 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.notes-fab:hover {
    filter: brightness(1.05);
    background: var(--accent-hover) !important;
    background-color: var(--accent-hover) !important;
    box-shadow: 0 16px 36px rgba(var(--accent-rgb, 0, 120, 212), 0.42);
}

body.button-glow-enabled .notes-fab.button-glow-target,
body.button-glow-enabled .notes-fab.button-glow-hover {
    position: absolute !important;
    right: 28px !important;
    bottom: 28px !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
}

.notes-fab img {
    width: 26px;
    height: 26px;
    filter: brightness(0) invert(1);
    position: relative;
    z-index: 5;
}

.notes-fab-launching {
    opacity: 0;
    pointer-events: none;
}

.notes-new-note-reveal-clip {
    position: absolute;
    z-index: 30;
    overflow: hidden;
    pointer-events: none;
}

.notes-new-note-reveal {
    position: absolute;
    border-radius: 999px;
    background: rgb(var(--accent-rgb, 0, 120, 212));
    box-shadow: 0 18px 48px rgba(var(--accent-rgb, 0, 120, 212), 0.32);
    pointer-events: none;
    transform: translate(-50%, -50%) scale(1);
    transform-origin: center;
    will-change: transform, opacity, border-radius;
}

.notes-new-note-reveal-hide {
    opacity: 0;
    transition: opacity 220ms ease;
}

.notes-quick-panel {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.52);
}

.dark-mode .notes-quick-panel {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.07);
}

.notes-quick-textarea {
    flex: 1;
    min-height: 0;
    width: 100%;
    resize: none;
    border: 0;
    outline: 0;
    padding: 20px;
    box-sizing: border-box;
    color: var(--text-primary);
    background: transparent;
    font: 15px/1.65 "Segoe UI", system-ui, sans-serif;
}

.notes-quick-footer {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    color: var(--text-secondary);
    font-size: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.dark-mode .notes-quick-footer {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.notes-settings-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notes-setting-row {
    min-height: 64px;
    padding: 12px 14px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.dark-mode .notes-setting-row {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.08);
}

.notes-setting-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
}

.notes-setting-main small {
    color: var(--text-secondary);
    font-size: 12px;
}

.notes-setting-control {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
}

.notes-settings-select.fluent-select-wrapper {
    width: 180px;
    min-width: 180px;
    z-index: 12;
}

.notes-settings-toggle.fluent-toggle-wrapper {
    flex: 0 0 auto;
}

.notes-editor-page {
    padding: 16px 18px 14px;
    gap: 10px;
}

.notes-editor-topbar {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.notes-icon-button,
.notes-secondary-button,
.notes-primary-button,
.notes-editor-toolbar button {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
}

.dark-mode .notes-icon-button,
.dark-mode .notes-secondary-button,
.dark-mode .notes-primary-button,
.dark-mode .notes-editor-toolbar button {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.08);
}

.notes-icon-button {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notes-icon-button img,
.notes-secondary-button img,
.notes-primary-button img,
.notes-editor-toolbar img {
    width: 18px;
    height: 18px;
}

.notes-editor-title {
    min-width: 0;
    font-size: 18px;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notes-primary-button {
    height: 38px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notes-secondary-button {
    min-height: 36px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
}

.notes-header-actions,
.notes-editor-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

.notes-format-export {
    width: 42px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
}

.notes-primary-button:not(:disabled):hover,
.notes-secondary-button:hover,
.notes-icon-button:hover,
.notes-editor-toolbar button:hover {
    background: rgba(var(--accent-rgb, 0, 120, 212), 0.14);
}

.notes-primary-button:disabled {
    opacity: 0.7;
    cursor: default;
}

.notes-editor-toolbar {
    flex: 0 0 auto;
    min-height: 42px;
    display: flex;
    align-items: flex-start;
    align-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.42);
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: visible;
}

.dark-mode .notes-editor-toolbar {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
}

.notes-editor-toolbar button {
    width: 32px;
    min-width: 32px;
    flex: 0 0 32px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-family: "Segoe UI", system-ui, sans-serif;
    font-weight: 600;
    line-height: 1;
}

.notes-editor-toolbar button.is-active {
    color: #fff;
    background: rgb(var(--accent-rgb, 0, 120, 212));
    border-color: rgba(var(--accent-rgb, 0, 120, 212), 0.7);
}

.notes-toolbar-group {
    min-width: max-content;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    flex-wrap: nowrap;
    gap: 4px;
}

.notes-toolbar-group > * {
    flex-shrink: 0;
}

.notes-select-host {
    display: inline-flex;
    min-width: max-content;
    flex: 0 0 auto;
}

.notes-toolbar-select.fluent-select-wrapper {
    height: 30px;
    min-width: 70px;
    max-width: none;
    flex: 0 0 auto;
    z-index: 11;
}

.notes-toolbar-select.fluent-select-wrapper.active {
    z-index: 40;
}

.notes-toolbar-select .fluent-select-trigger {
    min-height: 30px;
    height: 30px;
    min-width: 0;
    padding: 0 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.58);
    color: var(--text-primary);
    font: 13px/1.2 "Segoe UI", system-ui, sans-serif;
}

body.fluent-v2 .notes-toolbar-select .fluent-select-trigger {
    min-width: 0;
    min-height: 30px;
    height: 30px;
    padding: 0 8px;
    border-radius: 7px;
    box-sizing: border-box;
}

.notes-toolbar-select .fluent-select-value {
    margin-right: 6px;
}

.notes-toolbar-select .fluent-select-arrow {
    width: 11px;
    height: 11px;
}

.notes-font-family {
    width: 140px;
    min-width: 140px;
}

.notes-font-size {
    width: 64px;
    min-width: 64px;
}

.notes-format-block {
    width: 118px;
    min-width: 118px;
}

.notes-line-height {
    width: 72px;
    min-width: 72px;
}

.dark-mode .notes-toolbar-select .fluent-select-trigger {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.08);
}

.notes-color-tool {
    position: relative;
    width: 32px;
    min-width: 32px;
    flex: 0 0 32px;
    height: 30px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
    overflow: hidden;
}

.dark-mode .notes-color-tool {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.08);
}

.notes-color-tool:hover {
    background: rgba(var(--accent-rgb, 0, 120, 212), 0.14);
}

.notes-color-tool img {
    width: 17px;
    height: 17px;
}

.notes-color-symbol {
    position: relative;
    font-size: 15px;
    font-weight: 700;
}

.notes-color-symbol::after {
    content: '';
    position: absolute;
    left: -1px;
    right: -1px;
    bottom: -4px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
}

.notes-color-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.notes-toolbar-divider {
    width: 1px;
    flex: 0 0 1px;
    align-self: center;
    height: 22px;
    margin: 0 4px;
    background: rgba(0, 0, 0, 0.12);
}

.dark-mode .notes-toolbar-divider {
    background: rgba(255, 255, 255, 0.14);
}

.notes-editor-surface {
    flex: 1;
    min-height: 0;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    background: rgba(255, 255, 255, 0.66);
    overflow: auto;
}

.dark-mode .notes-editor-surface {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.07);
}

.notes-rich-editor {
    min-height: 100%;
    outline: 0;
    padding: 24px;
    box-sizing: border-box;
    font: 15px/1.7 "Segoe UI", system-ui, sans-serif;
    color: var(--text-primary);
}

.notes-rich-editor:empty::before {
    content: attr(data-placeholder);
    color: var(--text-tertiary);
}

.notes-editor-status {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    color: var(--text-secondary);
    font-size: 12px;
    padding: 0 4px;
}

body.animations-enabled .notes-page-elements-enter .notes-editor-topbar,
body.animations-enabled .notes-page-elements-enter .notes-editor-toolbar,
body.animations-enabled .notes-page-elements-enter .notes-editor-surface,
body.animations-enabled .notes-page-elements-enter .notes-editor-status,
body.animations-enabled .notes-page-elements-enter .notes-page-header,
body.animations-enabled .notes-page-elements-enter .notes-list,
body.animations-enabled .notes-page-elements-enter .notes-fab,
body.animations-enabled .notes-page-elements-enter .notes-quick-panel,
body.animations-enabled .notes-page-elements-enter .notes-settings-list {
    animation: notesPageElementEnter 320ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

body.animations-enabled .notes-page-elements-enter .notes-editor-toolbar {
    animation-delay: 32ms;
}

body.animations-enabled .notes-page-elements-enter .notes-editor-surface {
    animation-delay: 64ms;
}

body.animations-enabled .notes-page-elements-enter .notes-editor-status,
body.animations-enabled .notes-page-elements-enter .notes-fab {
    animation-delay: 96ms;
}

body.animations-enabled .notes-page-elements-enter .notes-list,
body.animations-enabled .notes-page-elements-enter .notes-quick-panel,
body.animations-enabled .notes-page-elements-enter .notes-settings-list {
    animation-delay: 48ms;
}

@keyframes notesPageElementEnter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 680px) {
    .notes-page,
    .notes-editor-page {
        padding: 16px;
    }

    .notes-page-header h1 {
        font-size: 22px;
    }

    .notes-row {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .notes-row-action {
        display: none;
    }

    .notes-editor-topbar {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .notes-editor-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .notes-primary-button {
        justify-content: center;
    }

    .notes-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .notes-page-header {
        flex-direction: column;
    }

    .notes-setting-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .notes-setting-control {
        justify-content: flex-start;
    }

    .notes-settings-select.fluent-select-wrapper {
        width: min(220px, 100%);
        min-width: 0;
    }

    .notes-toolbar-divider {
        margin: 0 2px;
    }

    .notes-font-family {
        width: 116px;
        min-width: 116px;
    }

    .notes-format-block {
        width: 108px;
        min-width: 108px;
    }

    .notes-line-height {
        width: 68px;
        min-width: 68px;
    }

    .notes-editor-status {
        grid-template-columns: minmax(0, 1fr);
        gap: 3px;
    }
}
