* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ========================================
   CSS 变量  主题颜色体系
   由 theme-shared.js 通过 data-theme 属性切换
   ======================================== */
:root, [data-theme="dark"] {
    --bg-body: #0a0a0a;
    --bg-panel: rgba(18, 18, 18, 0.96);
    --bg-panel-solid: #1a1a1a;
    --bg-panel-alt: rgba(28, 28, 28, 0.96);
    --bg-glass: rgba(30, 30, 30, 0.8);
    --bg-glass-strong: rgba(30, 30, 30, 0.95);
    --bg-glass-hover: rgba(50, 50, 50, 0.9);
    --bg-glass-active: rgba(40, 40, 40, 0.9);
    --bg-tooltip: rgba(40, 40, 40, 0.92);
    --bg-tooltip-hover: rgba(40, 40, 40, 0.85);
    --bg-toast: rgba(0, 0, 0, 0.85);
    --bg-overlay: rgba(0, 0, 0, 0.5);
    --bg-overlay-light: rgba(0, 0, 0, 0.4);
    --bg-hover-weak: rgba(255, 255, 255, 0.05);
    --bg-hover: rgba(255, 255, 255, 0.08);
    --bg-hover-strong: rgba(255, 255, 255, 0.1);
    --bg-active: rgba(255, 255, 255, 0.12);
    --bg-active-strong: rgba(255, 255, 255, 0.14);
    --bg-input: rgba(255, 255, 255, 0.05);
    --bg-input-focus: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-primary-alt: #f5f5f5;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-weak: rgba(255, 255, 255, 0.6);
    --text-dim: rgba(255, 255, 255, 0.45);
    --text-tertiary: rgba(255, 255, 255, 0.4);
    --text-muted: rgba(255, 255, 255, 0.3);
    --text-strong: rgba(255, 255, 255, 0.85);
    --border-primary: rgba(255, 255, 255, 0.08);
    --border-secondary: rgba(255, 255, 255, 0.06);
    --border-input: rgba(255, 255, 255, 0.08);
    --border-input-focus: rgba(255, 255, 255, 0.25);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 6px 16px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 12px 40px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.5);
    --accent: #60A5FA;
    --accent-bg: rgba(59, 130, 246, 0.2);
    --accent-bg-light: rgba(96, 165, 250, 0.12);
    --accent-border: rgba(59, 130, 246, 0.3);
    --danger: #ff453a;
    --danger-bg: rgba(255, 69, 58, 0.12);
    --danger-bg-hover: rgba(255, 69, 58, 0.18);
    --danger-text: rgba(255, 69, 58, 0.7);
    --canvas-bg: #0a0a0a;
    --canvas-grid: rgba(255, 255, 255, 0.03);
    --scrollbar-thumb: rgba(255, 255, 255, 0.06);
    --scrollbar-thumb-hover: rgba(255, 255, 255, 0.12);
    --gold: #ffd700;
    --gold-bg: rgba(255, 215, 0, 0.15);
    --upgrade-badge-bg: linear-gradient(135deg, #ff4444, #ff6b35);
}

[data-theme="dark"] .float-btn,
[data-theme="dark"] .zoom-btn {
    border: none;
}

[data-theme="light"] {
    --bg-body: rgba(25, 32, 41, 0.04);
    --bg-panel: #ffffff;
    --bg-panel-solid: #ffffff;
    --bg-panel-alt: #ffffff;
    --bg-glass: #ffffff;
    --bg-glass-strong: #ffffff;
    --bg-glass-hover: #ffffff;
    --bg-glass-active: #f5f5f7;
    --bg-tooltip: #f2f2f5;
    --bg-tooltip-hover: #ececf0;
    --bg-toast: rgba(30, 30, 30, 0.9);
    --bg-overlay: rgba(25, 32, 41, 0.35);
    --bg-overlay-light: rgba(25, 32, 41, 0.2);
    --bg-hover-weak: rgba(25, 32, 41, 0.08);
    --bg-hover: rgba(25, 32, 41, 0.12);
    --bg-hover-strong: rgba(25, 32, 41, 0.16);
    --bg-active: rgba(25, 32, 41, 0.14);
    --bg-active-strong: rgba(25, 32, 41, 0.18);
    --bg-input: rgba(25, 32, 41, 0.06);
    --bg-input-focus: rgba(25, 32, 41, 0.09);
    --text-primary: #192029;
    --text-primary-alt: #192029;
    --text-secondary: rgba(25, 32, 41, 0.7);
    --text-weak: rgba(25, 32, 41, 0.6);
    --text-dim: rgba(25, 32, 41, 0.55);
    --text-tertiary: rgba(25, 32, 41, 0.45);
    --text-muted: rgba(25, 32, 41, 0.3);
    --text-strong: rgba(25, 32, 41, 0.85);
    --border-primary: rgba(25, 32, 41, 0.15);
    --border-secondary: rgba(25, 32, 41, 0.08);
    --border-input: rgba(25, 32, 41, 0.14);
    --border-input-focus: rgba(25, 32, 41, 0.25);
    --shadow-sm: 0 1px 3px rgba(25, 32, 41, 0.08), 0 2px 8px rgba(25, 32, 41, 0.06);
    --shadow-hover: 0 2px 6px rgba(25, 32, 41, 0.12), 0 6px 20px rgba(25, 32, 41, 0.1);
    --shadow-md: 0 8px 30px rgba(25, 32, 41, 0.14);
    --shadow-lg: 0 12px 40px rgba(25, 32, 41, 0.14);
    --shadow-xl: 0 16px 48px rgba(25, 32, 41, 0.1);
    --accent: #3b82f6;
    --accent-bg: rgba(59, 130, 246, 0.12);
    --accent-bg-light: rgba(59, 130, 246, 0.08);
    --accent-border: rgba(59, 130, 246, 0.22);
    --danger: #dc2626;
    --danger-bg: rgba(220, 38, 38, 0.08);
    --danger-bg-hover: rgba(220, 38, 38, 0.14);
    --danger-text: rgba(220, 38, 38, 0.65);
    --canvas-bg: #ffffff;
    --canvas-grid: rgba(25, 32, 41, 0.05);
    --scrollbar-thumb: rgba(25, 32, 41, 0.1);
    --scrollbar-thumb-hover: rgba(25, 32, 41, 0.2);
    --gold: #b8860b;
    --gold-bg: rgba(184, 134, 11, 0.1);
    --upgrade-badge-bg: linear-gradient(135deg, #dc2626, #ea580c);
}


html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: auto;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

.tooltip {
    position: fixed;
    padding: 6px 12px;
    background: var(--bg-tooltip);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-primary);
    border-radius: 10px;
    font-size: 12px;
    color: var(--text-strong);
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transform: translateY(6px) scale(0.92);
    transition: opacity 0.18s cubic-bezier(0.16,1,0.3,1), transform 0.18s cubic-bezier(0.16,1,0.3,1);
    white-space: nowrap;
    font-weight: 500;
    letter-spacing: 0.2px;
}
.tooltip.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.app-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 左上角漂浮区�?*/
.floating-header {
    position: fixed;
    top: 16px;
    left: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 9999;
}

.app-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.product-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 44px;
    padding: 0 12px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: none;
    border-radius: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4,0,0.2,1);
    box-shadow: none;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: -0.2px;
    flex-shrink: 0;
    line-height: 1;
}
.product-selector svg {
    display: block;
}
.product-selector:hover {
    background: var(--bg-glass-hover);
    box-shadow: none;
    transform: scale(1.04);
}
.product-selector:active {
    background: var(--bg-glass-active);
    transform: scale(0.96);
}
.product-selector .product-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.product-selector .product-name {
    flex: 1;
    white-space: nowrap;
}
.product-selector .product-chevron {
    flex-shrink: 0;
    opacity: 0.4;
    transition: transform 0.2s ease;
}
.product-selector:hover .product-chevron {
    opacity: 0.7;
}
.product-selector.active .product-chevron {
    transform: rotate(180deg);
}
.product-dropdown {
    position: fixed;
    min-width: 180px;
    max-width: 240px;
    background: var(--bg-panel);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: none;
    border-radius: 10px;
    padding: 6px;
    z-index: 9999;
    display: none;
    box-shadow: var(--shadow-xl);
}
.product-dropdown.show {
    display: block;
}
.product-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-weak);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.12s ease;
    text-decoration: none;
}
.product-dropdown-item:hover {
    color: var(--text-primary);
}
.product-dropdown-item.active {
    color: var(--text-primary);
    font-weight: 600;
    background: var(--accent-bg-light);
}
.product-dropdown-item .product-item-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    opacity: 0.5;
}
.product-dropdown-item:hover .product-item-icon {
    opacity: 0.9;
}
.product-dropdown-item.active .product-item-icon {
    opacity: 1;
}
.product-dropdown-item .product-item-check {
    margin-left: auto;
    opacity: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    color: var(--accent);
}
.product-dropdown-item.active .product-item-check {
    opacity: 1;
}

.app-home-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: inherit;
    text-decoration: none;
}

.app-title svg {
    flex-shrink: 0;
}

.float-buttons-left {
    display: flex;
    gap: 8px;
}

.float-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 0.5px solid var(--border-primary);
    border-radius: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    padding: 0;
    margin: 0;
}

.float-btn:hover {
    background: var(--bg-glass-hover);
    box-shadow: none;
    transform: scale(1.06);
}
.zoom-btn:hover {
    background: var(--bg-glass-hover);
    box-shadow: none;
    transform: scale(1.06);
}

.float-btn:active {
    transform: scale(0.96);
}

/* 右上角漂浮按�?*/
.float-buttons-right {
    position: fixed;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 100;
}

.main-content {
    flex: 1;
    display: flex;
    position: relative;
    overflow: hidden;
}

.canvas-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: var(--canvas-bg);
}

#mindmap-canvas {
    width: 100%;
    height: 100%;
    cursor: grab;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

#mindmap-canvas:active {
    cursor: grabbing;
}

.zoom-controls {
    position: absolute;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: transparent;
    padding: 0;
}

.zoom-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 0.5px solid var(--border-primary);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
}

.zoom-btn:active {
    transform: scale(0.96);
}

.undo-controls {
    position: absolute;
    bottom: 24px;
    left: 16px;
    display: flex;
    gap: 8px;
    background: transparent;
    padding: 0;
    z-index: 50;
}

.undo-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: none;
    border-radius: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
}

.undo-btn:hover {
    background: var(--bg-glass-hover);
    box-shadow: none;
    transform: scale(1.06);
}

.undo-btn:active {
    transform: scale(0.96);
}

.undo-btn svg {
    width: 16px;
    height: 16px;
}

.hint-text {
    position: absolute;
    bottom: 24px;
    right: 90px;
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
}

.hint-text .shortcuts {
    color: var(--text-tertiary);
}

.hint-text .copyright {
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

.hint-text .copyright:hover {
    color: var(--text-tertiary);
}

.hint-text .copyright a {
    color: var(--text-tertiary);
    text-decoration: none;
}

.hint-text .copyright:hover a {
    color: var(--text-weak);
}

/* 中心节点气泡提示 */
.tab-hint-bubble {
    position: absolute;
    left: 50%;
    top: 34%;
    transform: translateX(-50%);
    z-index: 100;
    pointer-events: auto;
    animation: tabHintFadeIn 0.5s cubic-bezier(0.32,0.94,0.6,1);
    transition: transform 0.25s cubic-bezier(0.32,0.94,0.6,1), opacity 0.25s ease;
}
.tab-hint-bubble:hover {
    transform: translateX(-50%) scale(1.04);
}
.tab-hint-bubble .tab-hint-inner {
    position: relative;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: none;
    border-radius: 14px;
    padding: 6px 14px 6px 18px;
    font-size: 13px;
    color: var(--text-weak);
    white-space: nowrap;
    box-shadow: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease;
}
.tab-hint-bubble:hover .tab-hint-inner {
    background: var(--bg-tooltip-hover);
}
.tab-hint-bubble .tab-hint-inner::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 6px solid var(--bg-glass);
    transition: border-top-color 0.2s ease;
}
.tab-hint-bubble:hover .tab-hint-inner::after {
    border-top-color: var(--bg-tooltip-hover);
}
.tab-hint-bubble .tab-hint-inner kbd {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    background: var(--bg-active);
    box-shadow: 0 1px 0 rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
    margin: 0 1px;
    line-height: 1.6;
}
.tab-hint-bubble .tab-hint-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4,0,0.2,1);
    padding: 0;
    flex-shrink: 0;
}
.tab-hint-bubble .tab-hint-close:hover {
    background: var(--bg-hover);
    color: var(--text-weak);
}
.tab-hint-bubble .tab-hint-close:active {
    transform: scale(0.92);
}
.tab-hint-bubble .tab-hint-close svg {
    width: 12px;
    height: 12px;
    display: block;
}
@keyframes tabHintFadeIn {
    0% { opacity: 0; transform: translateX(-50%) translateY(8px) scale(0.94); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.author-popup {
    position: absolute;
    bottom: 70px;
    right: 90px;
    background: var(--bg-glass-strong);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    padding: 20px;
    min-width: 280px;
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.author-popup.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.author-popup-content .author-popup-title {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.author-popup-content p {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.author-popup-content .author-contact {
    color: var(--text-weak);
    font-size: 12px;
}

.author-popup-content .author-policy-links {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.author-popup-content .author-policy-link {
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 11px;
    transition: color 0.2s;
}

.author-popup-content .author-policy-link:hover {
    color: var(--text-secondary);
}

.author-popup-content .author-policy-sep {
    color: var(--text-muted);
    font-size: 11px;
}

.context-menu {
    position: fixed;
    background: var(--bg-panel-solid);
    border: 1px solid var(--border-primary);
    border-radius: 14px;
    padding: 6px;
    min-width: 180px;
    z-index: 1000;
    display: none;
}

.context-menu.show {
    display: block;
    animation: menuFadeIn 0.12s ease;
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.menu-item {
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.12s ease;
}

.menu-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.menu-item svg {
    flex-shrink: 0;
    opacity: 0.5;
    transition: opacity 0.12s ease;
}

.menu-item:hover svg {
    opacity: 0.9;
}

.menu-divider {
    height: 1px;
    background: var(--border-secondary);
    margin: 4px 8px;
}

.menu-danger {
    color: var(--danger-text);
}

.menu-danger:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

.menu-danger:hover svg {
    opacity: 1;
}

.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-toast);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 14px 24px;
    font-size: 14px;
    color: var(--text-primary);
    opacity: 0;
    pointer-events: none;
    z-index: 2000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 未登录主题推荐条 */
.theme-suggest {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: none;
    border-radius: 14px;
    padding: 6px 8px;
    z-index: 1500;
    transition: opacity 0.4s ease, transform 0.4s ease;
    box-shadow: var(--shadow-sm);
    user-select: none;
}
.theme-suggest.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(16px);
    pointer-events: none;
}
.theme-suggest-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    border-radius: 10px;
    padding: 6px 8px;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.theme-suggest-btn:hover {
    background: var(--bg-hover);
    transform: scale(1.06);
}
.theme-suggest-btn:active {
    transform: scale(0.96);
}
.theme-suggest-settings {
    padding: 6px;
    color: var(--text-tertiary);
    margin-right: 2px;
    position: relative;
}
.theme-suggest-settings:hover {
    color: var(--text-secondary);
    background: var(--bg-hover-weak);
}
.theme-suggest-settings::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 18px;
    background: var(--border-primary);
}
.theme-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}
.theme-suggest-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.theme-suggest-close:hover {
    background: var(--bg-hover);
    color: var(--text-weak);
}

@media (max-width: 768px) {
    .floating-header {
        top: 10px;
        left: 10px;
        gap: 8px;
    }

    .product-selector {
        height: 38px;
        padding: 0 10px;
        font-size: 13px;
        border-radius: 10px;
    }

    .float-buttons-left {
        gap: 4px;
    }

    .float-btn {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .float-buttons-right {
        top: 10px;
        right: 10px;
        gap: 4px;
    }

    .upgrade-btn {
        padding: 0 10px;
        font-size: 11px;
        gap: 4px;
    }

    .upgrade-btn .btn-text {
        display: none;
    }

    .upgrade-btn-badge {
        font-size: 8px;
        padding: 1px 5px;
        top: -5px;
        right: -5px;
    }

    .zoom-controls {
        bottom: 16px;
        right: 16px;
        gap: 6px;
    }

    .zoom-btn {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        font-size: 16px;
    }

    .undo-controls {
        bottom: 16px;
        left: 8px;
        gap: 6px;
    }

    .undo-btn {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .hint-text {
        display: none;
    }

    .list-panel {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 2000;
        border-radius: 0;
        border-right: none;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .list-panel:not(.collapsed) {
        transform: translateX(0);
    }

    .list-panel.collapsed {
        transform: translateX(-100%);
    }

    .list-panel-header {
        padding: 14px 16px;
    }

    .list-panel-body {
        padding: 12px;
    }

    .color-panel {
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        border-radius: 20px 20px 0 0;
        max-height: 80vh;
        overflow-y: auto;
    }

    .color-panel-body {
        padding: 0 16px 20px;
    }

    .upgrade-modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 100%;
        border-radius: 20px 20px 0 0;
        padding: 28px 20px 24px;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        animation: modalSlideUp 0.3s ease;
    }

    @keyframes modalSlideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    .upgrade-plans {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .upgrade-plan {
        padding: 16px;
    }

    .upgrade-plan-price {
        font-size: 26px;
    }

    .upgrade-header h2 {
        font-size: 20px;
    }

    .auth-modal-content {
        width: 100%;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        padding: 24px 20px 20px;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 85vh;
        animation: modalSlideUp 0.3s ease;
    }

    .auth-header h2 {
        font-size: 20px;
    }

    .auth-icon {
        width: 48px;
        height: 48px;
    }

    .context-menu {
        min-width: 180px;
    }

    .context-menu-item {
        padding: 12px 16px;
        font-size: 14px;
    }

    .toast {
        max-width: 90vw;
        font-size: 13px;
        padding: 12px 20px;
    }

    .node-edit-input {
        font-size: 16px;
        min-width: 80px;
    }

    .author-popup {
        right: 16px;
        bottom: 80px;
        min-width: 240px;
    }

    .confirm-dialog {
        width: 90vw;
        max-width: 320px;
    }

    .theme-suggest {
        bottom: 16px;
        padding: 4px 6px;
        gap: 4px;
        border-radius: 12px;
    }
    .theme-suggest-btn {
        padding: 5px 6px;
    }
    .theme-swatch {
        width: 10px;
        height: 10px;
    }
    .theme-suggest-close {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .floating-header {
        top: 8px;
        left: 8px;
        gap: 4px;
    }

    .product-selector {
        height: 34px;
        padding: 0 8px;
        font-size: 12px;
        border-radius: 8px;
    }
    .product-selector .product-chevron {
        display: none;
    }

    .float-btn {
        width: 34px;
        height: 34px;
        border-radius: 8px;
    }

    .float-buttons-right {
        top: 8px;
        right: 8px;
        gap: 3px;
    }

    .zoom-btn {
        width: 34px;
        height: 34px;
        border-radius: 8px;
    }

    .undo-btn {
        width: 34px;
        height: 34px;
        border-radius: 8px;
    }

    .zoom-controls {
        bottom: 12px;
        right: 12px;
        gap: 4px;
    }

    .undo-controls {
        bottom: 12px;
        left: 6px;
        gap: 4px;
    }

    .upgrade-plan-price {
        font-size: 22px;
    }

    .upgrade-header h2 {
        font-size: 18px;
    }

    .auth-header h2 {
        font-size: 18px;
    }

    .tab-hint-bubble {
        top: 28%;
    }
    .tab-hint-bubble .tab-hint-inner {
        padding: 5px 10px;
        font-size: 12px;
        border-radius: 12px;
    }
    .tab-hint-bubble .tab-hint-inner::after {
        bottom: -4px;
        border-left-width: 6px;
        border-right-width: 6px;
        border-top-width: 5px;
    }
}

.color-panel {
    position: fixed;
    top: 80px;
    right: 24px;
    background: var(--bg-panel-alt);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--border-primary);
    border-radius: 24px;
    z-index: 900;
    width: 290px;
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.color-panel.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.color-panel-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 14px 16px 10px;
    position: relative;
}

.color-panel-header span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary-alt);
    letter-spacing: -0.3px;
}

.color-panel-close {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border: none;
    border-radius: 50%;
    color: var(--text-dim);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
}

.color-panel-close:hover {
    background: var(--danger-bg-hover);
    color: var(--danger);
    transform: scale(1.06);
}

.color-panel-close:active {
    transform: translateY(-50%) scale(0.95);
}

.color-panel-body {
    padding: 0 12px 12px;
}

.color-mode-section {
    margin-bottom: 12px;
}

.color-mode-section label {
    display: block;
    font-size: 11px;
    color: var(--text-dim);
    margin-bottom: 8px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.color-mode-toggle {
    display: flex;
    gap: 6px;
}

.mode-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    background: var(--bg-hover-weak);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.mode-btn:hover {
    background: var(--bg-hover-strong);
    color: var(--text-secondary);
}

.mode-btn:active {
    background: var(--bg-active);
}

.mode-btn.active {
    background: var(--accent-bg);
    color: var(--accent);
    border-color: var(--accent-border);
}

.mode-btn svg {
    flex-shrink: 0;
}

.layout-section {
    margin-bottom: 12px;
}

.layout-section label {
    display: block;
    font-size: 11px;
    color: var(--text-dim);
    margin-bottom: 8px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.layout-toggle {
    display: flex;
    gap: 6px;
}

.layout-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 6px;
    background: var(--bg-hover-weak);
    border: 1px solid var(--border-secondary);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-secondary);
    font-size: 12px;
    transform-origin: center;
}

.layout-btn:hover {
    background: var(--bg-hover-strong);
    border-color: var(--border-primary);
    box-shadow: var(--shadow-sm);
    transform: scale(1.06);
}

.layout-btn:active {
    transform: scale(0.96);
}

.layout-btn.active {
    background: var(--accent-bg);
    color: var(--accent);
    border-color: var(--accent-border);
}

.layout-btn svg {
    flex-shrink: 0;
}

.theme-section {
    margin-bottom: 12px;
}

.theme-section label {
    display: block;
    font-size: 11px;
    color: var(--text-dim);
    margin-bottom: 8px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.theme-preset {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.theme-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    background: var(--bg-hover-weak);
    border: 1px solid var(--border-secondary);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.theme-btn:hover {
    background: var(--bg-hover-strong);
    border-color: var(--border-primary);
    box-shadow: var(--shadow-md);
    transform: scale(1.06);
}

.theme-btn:active {
    transform: translateY(0) scale(0.96);
    background: var(--bg-active);
}

.theme-colors {
    display: flex;
    gap: 3px;
}

.theme-colors span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.theme-name {
    font-size: 11px;
    color: var(--text-weak);
    font-weight: 500;
}

.color-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    transition: all 0.2s ease;
    margin: 0 -6px;
    padding-left: 10px;
    padding-right: 10px;
    border-radius: 10px;
}

.color-item:hover {
    background: var(--bg-hover-weak);
}

.color-item:last-child {
    border-bottom: none;
}

.color-item label {
    font-size: 13px;
    color: var(--text-weak);
    font-weight: 500;
    letter-spacing: 0.01em;
}

.color-item input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    width: 42px;
    height: 42px;
    border: 1.5px solid var(--border-primary);
    border-radius: 50%;
    cursor: pointer;
    background: transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm), inset 0 1px 2px rgba(255, 255, 255, 0.04);
    padding: 0;
    outline: none;
}

.color-item input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 3px;
}

.color-item input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

.color-item input[type="color"]:hover {
    box-shadow: var(--shadow-hover), 0 0 0 3px var(--accent-bg);
    border-color: var(--border-input-focus);
    transform: scale(1.06);
}

.color-item input[type="color"]:focus-visible {
    box-shadow: var(--shadow-hover), 0 0 0 3px var(--accent-bg);
    border-color: var(--accent-border);
}

.color-item input[type="color"]:active {
    transform: scale(0.95);
}

.transparent-btn {
    width: 34px;
    height: 34px;
    border: 1.5px solid var(--border-primary);
    border-radius: 50%;
    background: var(--bg-hover-weak);
    color: var(--text-tertiary);
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.transparent-btn:hover {
    background: var(--bg-hover-strong);
    color: var(--text-secondary);
    border-color: var(--border-input-focus);
    transform: scale(1.06);
}

.transparent-btn:active {
    transform: scale(0.95);
}

.lang-section {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--border-secondary);
}

.lang-section label {
    display: block;
    font-size: 11px;
    color: var(--text-dim);
    margin-bottom: 8px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.lang-toggle {
    display: flex;
    gap: 6px;
}

.lang-btn {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg-hover-weak);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-btn:hover {
    background: var(--bg-hover-strong);
    color: var(--text-secondary);
}

.lang-btn.active {
    background: var(--accent-bg);
    color: var(--accent);
    border-color: var(--accent-border);
}

.theme-toggle-section {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--border-secondary);
}

.theme-toggle-section label {
    display: block;
    font-size: 11px;
    color: var(--text-dim);
    margin-bottom: 8px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.theme-toggle {
    display: flex;
    gap: 6px;
}

.theme-toggle-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 8px;
    background: var(--bg-hover-weak);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle-btn svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.theme-toggle-btn:hover {
    background: var(--bg-hover-strong);
    color: var(--text-secondary);
}

.theme-toggle-btn:hover svg {
    opacity: 1;
}

.theme-toggle-btn.active {
    background: var(--accent-bg);
    color: var(--accent);
    border-color: var(--accent-border);
}

.theme-toggle-btn.active svg {
    opacity: 1;
}

.theme-toggle-btn:active {
    transform: scale(0.96);
}

[data-theme="dark"] .theme-toggle-btn {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.45);
}
[data-theme="dark"] .theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.8);
}
[data-theme="dark"] .theme-toggle-btn:hover svg {
    opacity: 1;
}
[data-theme="dark"] .theme-toggle-btn.active {
    background: rgba(59, 130, 246, 0.2);
    color: #60A5FA;
    border-color: rgba(59, 130, 246, 0.35);
}

[data-theme="light"] .theme-toggle-btn {
    background: rgba(25, 32, 41, 0.05);
    border-color: transparent;
    color: rgba(25, 32, 41, 0.55);
}
[data-theme="light"] .theme-toggle-btn:hover {
    background: rgba(25, 32, 41, 0.1);
    color: rgba(25, 32, 41, 0.75);
}
[data-theme="light"] .theme-toggle-btn:hover svg {
    opacity: 1;
}
[data-theme="light"] .theme-toggle-btn.active {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    border-color: rgba(37, 99, 235, 0.25);
}

[data-theme="light"] .mode-btn,
[data-theme="light"] .layout-btn,
[data-theme="light"] .theme-btn,
[data-theme="light"] .lang-btn {
    border-color: transparent;
}
[data-theme="light"] .theme-btn:hover,
[data-theme="light"] .layout-btn:hover {
    box-shadow: none;
}
[data-theme="light"] .list-panel {
    box-shadow: none;
}
[data-theme="light"] .float-btn,
[data-theme="light"] .zoom-btn {
    border: none;
}
[data-theme="light"] .theme-suggest {
    box-shadow: none;
}
[data-theme="light"] .toast {
    background: rgba(30, 30, 30, 0.92);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.navbar-right .nav-btn.color-btn {
    background: var(--bg-hover);
    border-radius: 10px;
    padding: 8px 12px;
}

.navbar-right .nav-btn.color-btn:hover {
    background: rgba(7, 193, 96, 0.25);
}

.list-panel {
    position: absolute;
    left: 16px;
    top: 80px;
    bottom: 92px;
    width: 320px;
    background: var(--bg-panel);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease, opacity 0.2s ease;
    transform: translateX(0);
    z-index: 900;
    box-shadow: var(--shadow-md);
}

.list-panel.collapsed {
    transform: translateX(-120%);
    opacity: 0;
    pointer-events: none;
}

.list-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px 8px;
}

.list-panel-header span {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    letter-spacing: -0.3px;
}

.list-panel-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.list-panel-header-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover-weak);
    border: none;
    border-radius: 10px;
    color: var(--text-weak);
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.list-panel-header-btn:hover {
    background: var(--bg-hover-strong);
    color: var(--text-primary);
    transform: scale(1.06);
}

.list-panel-header-btn:active {
    background: var(--bg-hover);
    transform: scale(0.94);
}

.list-panel-header-btn svg {
    opacity: 0.6;
    transition: opacity 0.15s ease;
}

.list-panel-header-btn:hover svg {
    opacity: 1;
}

.list-panel-toggle {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover-weak);
    border: none;
    border-radius: 10px;
    color: var(--text-weak);
    cursor: pointer;
    transition: all 0.15s ease;
}

.list-panel-toggle:hover {
    background: var(--bg-hover-strong);
    color: var(--text-primary);
}

.list-panel-toggle:active {
    background: var(--bg-hover);
}

.list-panel-body {
    flex: 1;
    padding: 8px 16px 16px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
}

.list-panel-body::-webkit-scrollbar {
    width: 4px;
}

.list-panel-body::-webkit-scrollbar-track {
    background: transparent;
}

.list-panel-body::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 2px;
    transition: background 0.2s ease;
}

.list-panel-body:hover::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb-hover);
}

.list-panel-body::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

.list-actions {
    display: flex;
    gap: 6px;
    margin-top: 4px;
    margin-bottom: 12px;
}

.list-action-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 6px;
    background: var(--bg-hover);
    border: none;
    border-radius: 12px;
    color: var(--text-weak);
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.2px;
    line-height: 1.2;
}

.list-action-btn:hover {
    background: var(--bg-hover-strong);
    color: var(--text-strong);
    transform: translateY(-1px);
}

.list-action-btn:active {
    background: var(--bg-hover);
    transform: scale(0.96);
}

.list-action-btn svg {
    opacity: 0.6;
    transition: opacity 0.15s ease;
}

.list-action-btn:hover svg {
    opacity: 1;
}

.list-action-btn-primary {
    color: var(--text-secondary);
}

.list-action-btn-primary:hover {
    color: var(--text-primary);
}

.list-action-btn-primary svg {
    opacity: 0.7;
}

.list-action-btn-primary:hover svg {
    opacity: 1;
}

.mindmap-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
}

.mindmap-list::-webkit-scrollbar {
    width: 4px;
}

.mindmap-list::-webkit-scrollbar-track {
    background: transparent;
}

.mindmap-list::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 2px;
    transition: background 0.2s ease;
}

.mindmap-list:hover::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb-hover);
}

.mindmap-list::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

.mindmap-list-empty {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 14px;
    padding: 20px 0;
}

/* ====== iOS 风格文件夹树形结构 ====== */

.folder-tree {
    margin-bottom: 2px;
}

.folder-item {
    display: flex;
    align-items: center;
    padding: 6px 8px 6px 6px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.12s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    position: relative;
    gap: 4px;
    margin: 1px 0;
}

.folder-item:hover {
    background: var(--bg-hover-weak);
}

.folder-item:active {
    transform: scale(0.98);
    background: var(--bg-hover-weak);
}

.folder-item.drag-over {
    background: var(--bg-hover);
    box-shadow: inset 0 0 0 1.5px var(--border-primary);
}

.folder-item.dragging {
    opacity: 0.5;
}

.folder-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-muted);
    margin-right: 4px;
}

.folder-name {
    flex: 1;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-primary-alt);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    letter-spacing: -0.2px;
}

.folder-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
    transform: translateX(4px);
}

.folder-item:hover .folder-actions {
    opacity: 1;
    transform: translateX(0);
}

.folder-action-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
}

.folder-action-btn:hover {
    background: var(--bg-hover);
    color: var(--text-weak);
}

.folder-action-btn:active {
    transform: scale(0.92);
}

.folder-action-btn.delete:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

.folder-children {
    padding-left: 20px;
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.2s ease;
    opacity: 1;
}
.folder-children .folder-mindmap-item:first-child {
    margin-top: 0;
}
.folder-children .folder-mindmap-item:last-child {
    margin-bottom: 0;
}

.folder-children.collapsed {
    max-height: 0 !important;
    opacity: 0;
}

.folder-mindmap-item {
    display: flex;
    align-items: center;
    padding: 6px 8px 6px 6px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.12s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 1px 0;
    position: relative;
    gap: 4px;
}

.folder-mindmap-item:hover {
    background: var(--bg-hover-weak);
}

.folder-mindmap-item:active {
    transform: scale(0.98);
    background: var(--bg-hover-weak);
}

.folder-mindmap-item.active {
    background: var(--accent-bg-light);
}

.folder-mindmap-item.selected {
    background: var(--bg-hover);
}

.folder-mindmap-item.active.selected {
    background: var(--accent-bg-light);
}

.folder-mindmap-item.active .folder-mindmap-name {
    color: var(--text-primary);
    font-weight: 500;
}

.folder-mindmap-item.dragging {
    opacity: 0.4;
    transform: scale(0.95);
}

.folder-mindmap-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.folder-mindmap-item.active .folder-mindmap-icon {
    color: var(--text-secondary);
}

.folder-mindmap-name {
    flex: 1;
    font-size: 13.5px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    letter-spacing: -0.2px;
    transition: color 0.2s ease;
}

.folder-mindmap-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.15s ease;
    flex-shrink: 0;
}

.folder-mindmap-item:hover .folder-mindmap-actions {
    opacity: 1;
}

.folder-mindmap-action-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
}

.folder-mindmap-action-btn:hover {
    background: var(--bg-hover);
    color: var(--text-weak);
}

.folder-mindmap-action-btn:active {
    transform: scale(0.92);
}

.folder-mindmap-delete {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
    padding: 0;
}

.folder-mindmap-delete:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

.folder-mindmap-delete:active {
    transform: scale(0.92);
}

/* 根级别无文件夹的导图 */

/* 文件夹重命名输入框 */
.folder-rename-input {
    flex: 1;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-hover);
    border: 1px solid var(--border-input-focus);
    border-radius: 8px;
    padding: 3px 8px;
    outline: none;
    min-width: 0;
    font-family: inherit;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.folder-rename-input:focus {
    border-color: var(--accent-border);
    background: var(--bg-hover-strong);
    box-shadow: 0 0 0 3px var(--accent-bg);
}

/* 拖拽占位指示线 */
.drop-indicator {
    height: 3px;
    background: linear-gradient(90deg, var(--text-tertiary), var(--text-muted));
    border-radius: 2px;
    margin: 2px 8px;
    animation: dropIndicatorPulse 0.8s ease-in-out infinite alternate;
}

@keyframes dropIndicatorPulse {
    from { opacity: 0.6; transform: scaleY(1); }
    to { opacity: 1; transform: scaleY(1.3); }
}

/* 文件夹上下文菜单 */
.folder-context-menu {
    position: fixed;
    background: var(--bg-glass-strong);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--border-primary);
    border-radius: 14px;
    padding: 4px;
    min-width: 150px;
    z-index: 2000;
    display: none;
    box-shadow: var(--shadow-md);
    animation: contextMenuIn 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes contextMenuIn {
    from { opacity: 0; transform: scale(0.92) translateY(-4px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.folder-context-menu.show {
    display: block;
}

.folder-context-menu .menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: background 0.12s ease;
}

.folder-context-menu .menu-item:hover {
    background: var(--bg-hover);
}

.folder-context-menu .menu-item.danger {
    color: var(--danger);
}

.folder-context-menu .menu-item.danger:hover {
    background: var(--danger-bg);
}

.folder-context-menu .menu-divider {
    height: 1px;
    background: var(--border-secondary);
    margin: 4px 10px;
}

.node-edit-input {
    position: fixed;
    border: none;
    border-radius: 12px;
    outline: none;
    background: transparent;
    color: inherit;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
    padding: 0;
    margin: 0;
    z-index: 1000;
    display: none;
    caret-color: var(--text-primary);
    -webkit-user-select: text;
    user-select: text;
    word-break: keep-all;
}

.node-edit-input::selection {
    background: rgba(100, 150, 255, 0.5);
    color: var(--text-primary);
}

.node-edit-input::-moz-selection {
    background: rgba(100, 150, 255, 0.5);
    color: var(--text-primary);
}

/* ========== 反馈弹窗（独立） ========== */
.feedback-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.feedback-modal::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--bg-overlay);
}
.feedback-modal.active { opacity: 1; pointer-events: auto; }
.feedback-modal-content {
    position: relative;
    background: var(--bg-panel-solid);
    border: 1px solid var(--border-primary);
    border-radius: 20px;
    padding: 24px;
    width: 700px;
    max-width: 92vw;
    max-height: 80vh;
    overflow-y: auto;
    scrollbar-width: none;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.feedback-modal-content::-webkit-scrollbar { display: none; }
.feedback-modal.active .feedback-modal-content { transform: translateY(0) scale(1); }
.feedback-modal-header {
    position: relative;
    text-align: center;
    margin-bottom: 20px;
    padding-right: 32px;
}
.feedback-modal-header h2 { font-size: 20px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; letter-spacing: -0.3px; }
.feedback-subtitle { font-size: 13px; color: var(--text-dim); }
.feedback-modal-close {
    position: absolute;
    top: 0; right: 0;
    width: 32px; height: 32px;
    border: none; border-radius: 50%;
    background: transparent;
    color: var(--text-weak);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.feedback-modal-close:hover { background: var(--bg-hover); color: var(--text-secondary); }

.feedback-modal-body {
    display: flex;
    gap: 0;
    align-items: flex-start;
}

.feedback-form {
    flex: 0 0 280px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 20px;
    border-right: 1px solid var(--border-secondary, rgba(255,255,255,0.06));
}

.feedback-submit-btn {
    padding: 12px; border: none; border-radius: 10px;
    background: var(--bg-active); color: var(--text-primary);
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: all 0.2s; font-family: inherit;
}
.feedback-submit-btn:hover { background: var(--bg-active-strong); transform: translateY(-1px); }
.feedback-submit-btn:active { transform: scale(0.98); }
.feedback-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.feedback-input {
    padding: 14px 16px;
    border: none;
    border-radius: 12px;
    background: var(--bg-hover-weak, rgba(255,255,255,0.03));
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
}

.feedback-input:focus {
    background: var(--bg-hover, rgba(255,255,255,0.06));
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.15);
}

.feedback-input::placeholder {
    color: var(--text-muted, rgba(255,255,255,0.25));
}

.feedback-error {
    color: var(--danger);
    font-size: 13px;
    text-align: center;
    min-height: 20px;
    line-height: 20px;
}

.feedback-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    padding-left: 20px;
}

.feedback-list:empty {
    display: none;
}

.feedback-item {
    padding: 12px 14px;
    background: var(--bg-hover-weak, rgba(255,255,255,0.03));
    border-radius: 12px;
}

.feedback-item-message {
    font-size: 13px;
    color: var(--text-strong);
    line-height: 1.5;
    margin-bottom: 6px;
    word-break: break-word;
}

.feedback-item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
}

.feedback-item-status {
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.feedback-item-status.pending {
    background: var(--bg-hover);
    color: var(--text-tertiary);
}

.feedback-item-status.replied {
    background: var(--bg-hover-weak, rgba(255,255,255,0.04));
    color: var(--text-secondary, rgba(255,255,255,0.7));
}

.feedback-item-reply {
    margin-top: 8px;
    padding: 8px 10px;
    background: var(--bg-hover-weak, rgba(255,255,255,0.04));
    border-radius: 8px;
}

.feedback-item-reply-label {
    font-size: 10px;
    color: var(--text-weak, rgba(255,255,255,0.5));
    font-weight: 600;
    margin-bottom: 3px;
    letter-spacing: 0.3px;
}

.feedback-item-reply-text {
    font-size: 13px;
    color: var(--text-strong);
    line-height: 1.6;
    word-break: break-word;
}

.feedback-empty {
    text-align: center;
    padding: 24px 16px;
    color: var(--text-muted);
    font-size: 13px;
}

/* ========== Pro 升级按钮和徽�?========== */

.upgrade-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    width: auto;
    background: var(--gold-bg);
    border: 1px solid var(--accent-border);
    color: var(--gold);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.upgrade-btn:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 165, 0, 0.25));
    border-color: rgba(255, 215, 0, 0.4);
    color: var(--gold);
}

.upgrade-btn.is-pro {
    background: var(--gold-bg);
    border-color: rgba(255, 215, 0, 0.15);
    color: var(--gold);
    font-size: 12px;
    padding: 0 12px;
}

.upgrade-btn.is-pro:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 165, 0, 0.25));
    border-color: rgba(255, 215, 0, 0.4);
    color: var(--gold);
}

.upgrade-btn.is-pro:active {
    transform: scale(0.96);
}

.upgrade-btn-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--upgrade-badge-bg);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 8px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(255, 68, 68, 0.4);
    animation: badgePulse 2s ease-in-out infinite;
    z-index: 1;
}

.referral-entry-btn {
    position: relative;
    background: rgba(255, 214, 10, 0.1);
    border: 1px solid rgba(255, 214, 10, 0.3);
    color: #FFD60A;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.referral-entry-btn:hover {
    background: rgba(255, 214, 10, 0.18);
    border-color: rgba(255, 214, 10, 0.5);
    color: #FFD60A;
    transform: scale(1.05);
}
.referral-entry-btn:active {
    transform: scale(0.95);
}
.referral-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #FFD60A;
    color: #1a1a2e;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 8px;
    letter-spacing: 0.3px;
    line-height: 1.2;
    pointer-events: none;
    z-index: 1;
    box-shadow: 0 1px 4px rgba(255, 214, 10, 0.4);
}
.referral-entry-btn.hidden { display: none !important; }

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* ========== 确认弹窗 ========== */

.confirm-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10002;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.confirm-modal.active {
    opacity: 1;
    pointer-events: auto;
}
.confirm-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
}
.confirm-modal-content {
    position: relative;
    background: var(--bg-panel-solid);
    border: 1px solid var(--border-primary);
    border-radius: 20px;
    padding: 28px 24px 20px;
    width: 340px;
    max-width: 88vw;
    text-align: center;
    transform: translateY(-8px) scale(0.96);
    transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
    box-shadow: var(--shadow-lg);
}
.confirm-modal.active .confirm-modal-content {
    transform: translateY(0) scale(1);
}
.confirm-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    background: var(--danger-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--danger);
}
.confirm-msg {
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-strong);
    margin-bottom: 20px;
    font-weight: 500;
}
.confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.confirm-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}
.confirm-btn:active {
    transform: scale(0.96);
}
.confirm-cancel {
    background: var(--bg-hover);
    color: var(--text-secondary);
}
.confirm-cancel:hover {
    background: var(--bg-hover-strong);
    color: var(--text-primary);
}
.confirm-ok {
    background: var(--danger);
    color: #ffffff;
}
.confirm-ok:hover {
    background: #ff5a50;
}

/* ========== 升级弹窗 ========== */

.upgrade-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.upgrade-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
}

.upgrade-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.upgrade-modal-content {
    position: relative;
    width: 500px;
    max-width: calc(100% - 40px);
    max-height: calc(100% - 80px);
    overflow-y: auto;
    scrollbar-width: none;
    background: var(--bg-panel-solid);
    border-radius: 24px;
    padding: 40px 32px 32px;
    border: 1px solid var(--border-primary);
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.upgrade-modal-content::-webkit-scrollbar {
    display: none;
}

.upgrade-modal.active .upgrade-modal-content {
    transform: translateY(0) scale(1);
}

.upgrade-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--bg-hover);
    color: var(--text-weak);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.upgrade-modal-close:hover {
    background: var(--bg-hover-strong);
    color: var(--text-primary);
}

.upgrade-header {
    text-align: center;
    margin-bottom: 28px;
}

.upgrade-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 165, 0, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    border: 1px solid rgba(255, 215, 0, 0.15);
}

.upgrade-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.upgrade-modal-badge {
    display: inline-block;
    vertical-align: middle;
    background: var(--upgrade-badge-bg);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 10px;
    letter-spacing: 0.3px;
    margin-left: 8px;
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.35);
    animation: badgePulse 2s ease-in-out infinite;
}

.upgrade-subtitle {
    font-size: 14px;
    color: var(--text-dim);
}

.upgrade-current-expiry {
    font-size: 13px;
    color: var(--gold);
    opacity: 0.7;
    margin-top: 4px;
    font-weight: 500;
}

.upgrade-region-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 8px 0 4px;
}

.upgrade-region-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-primary);
    background: transparent;
    color: var(--text-tertiary);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.upgrade-region-btn.active {
    background: var(--bg-hover-weak);
    border-color: var(--border-input);
    color: var(--text-secondary);
}

.upgrade-region-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.upgrade-plans {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.upgrade-plan {
    background: var(--bg-hover-weak);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    position: relative;
    transition: all 0.2s;
}

.upgrade-plan:hover {
    border-color: var(--border-input);
}

.upgrade-plan.featured {
    background: var(--gold-bg);
    border-color: rgba(255, 215, 0, 0.15);
}

.upgrade-plan-badge {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 12px;
    border-radius: 10px;
    letter-spacing: 0.3px;
}

.upgrade-plan-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
}

.upgrade-plan-price {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 2px;
}

.upgrade-plan-original {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-tertiary);
    text-decoration: line-through;
    margin-right: 6px;
    vertical-align: middle;
}

.upgrade-plan-price span {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-tertiary);
}

.upgrade-plan-save {
    font-size: 11px;
    color: var(--green);
    font-weight: 500;
    margin-bottom: 12px;
}

.upgrade-plan-save span {
    font-size: 11px;
    color: var(--text-tertiary);
    font-weight: 400;
}

.upgrade-plan-features {
    list-style: none;
    margin: 12px 0 16px;
    text-align: center;
}

.upgrade-plan-features li {
    padding: 5px 0;
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.upgrade-plan-features li::before {
    content: '✓';
    color: var(--green);
    font-weight: 700;
    font-size: 14px;
}

.upgrade-plan-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: var(--bg-hover);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.upgrade-plan-btn:hover {
    background: var(--bg-hover-strong);
}

.upgrade-plan-btn.featured-btn {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.15));
    color: var(--gold);
}

.upgrade-plan-btn.featured-btn:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 165, 0, 0.25));
}

.upgrade-footer {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

.upgrade-social-proof { display: none !important; }

.upgrade-discount {
    text-align: center;
    margin-top: 12px;
    font-size: 12px;
    color: rgba(255, 215, 0, 0.55);
}

.upgrade-discount strong {
    color: rgba(255, 215, 0, 0.75);
    font-weight: 700;
}

.undo-btn.pulse {
    animation: undoBtnPulse 2s ease-in-out infinite;
}

@keyframes undoBtnPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); }
}

.news-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.news-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
}

.news-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.news-modal-content {
    position: relative;
    width: 90vw;
    max-width: 600px;
    height: 85vh;
    max-height: 700px;
    background: var(--bg-panel-alt);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--border-secondary);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.news-modal.open .news-modal-content {
    transform: translateY(0) scale(1);
}

.news-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-hover);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    color: var(--text-weak);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    font-size: 16px;
    transition: all 0.2s ease;
}

.news-modal-close:hover {
    background: var(--bg-hover-strong);
    color: var(--text-primary);
}

.news-sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 24px 24px 0;
    color: var(--text-primary);
}

.news-sidebar-header h2 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.4px;
}

.news-sidebar-header svg {
    color: rgba(74, 222, 128, 0.8);
    flex-shrink: 0;
}

.news-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 24px;
    padding: 10px 14px;
    background: var(--bg-hover-weak);
    border: 0.5px solid var(--border-secondary);
    border-radius: 14px;
    transition: all 0.2s ease;
}

.news-search:focus-within {
    background: var(--bg-hover);
    border-color: var(--accent-border);
    box-shadow: 0 0 0 3px var(--accent-bg-light);
}

.news-search svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.news-search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
}

.news-search-input::placeholder {
    color: var(--text-muted);
}

.news-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 16px 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 12px, black calc(100% - 16px), transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 12px, black calc(100% - 16px), transparent 100%);
}

.news-list::-webkit-scrollbar {
    display: none;
}

.news-item {
    padding: 14px 14px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 2px;
    border: none;
    position: relative;
}

.news-item:hover {
    background: var(--bg-hover-weak);
}

.news-item-source {
    padding: 2px 8px;
    background: var(--bg-hover-weak);
    border-radius: 6px;
    font-size: 11px;
    color: var(--text-tertiary);
}

.news-item-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-strong);
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-item-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

.news-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    color: var(--text-muted);
    font-size: 14px;
    gap: 12px;
}

.news-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-primary);
    border-top-color: var(--accent-border);
    border-radius: 50%;
    animation: newsSpin 0.7s linear infinite;
}

@keyframes newsSpin {
    to { transform: rotate(360deg); }
}

.news-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    color: var(--text-muted);
    gap: 12px;
    text-align: center;
}

.news-empty svg {
    opacity: 0.3;
}

.news-empty p {
    font-size: 14px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .news-modal-content {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        flex-direction: column;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .news-modal-close {
        top: 12px;
        right: 12px;
    }
}

@media (max-width: 480px) {
    .news-sidebar-header {
        padding: 18px 18px 0;
    }

    .news-sidebar-header h2 {
        font-size: 17px;
    }

    .news-search {
        margin: 12px 18px;
    }

    .news-list {
        padding: 2px 10px 10px;
    }

    .news-item {
        padding: 12px 12px;
    }

    .news-item-title {
        font-size: 13px;
    }
}

.site-footer {
    text-align: center;
    padding: 20px 16px 10px;
    font-size: 12px;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 6px;
}

.footer-links a {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-secondary);
}

.footer-sep {
    color: var(--text-muted);
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 11px;
}
