* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ===== 配色变量 =====
   亮橙色: #FF8C00 / #FFA500
   淡蓝色: #5BA8D8 / #87CEEB
   淡灰色(替代黑色): #E8E8E8 / #F0F0F0 / #D5D5D5
*/
:root {
    --orange: #FF8C00;
    --orange-light: #FFA500;
    --blue: #5BA8D8;
    --blue-light: #87CEEB;
    --gray-bg: #E8E8E8;
    --gray-card: #F0F0F0;
    --gray-border: #D5D5D5;
    --gray-text: #555;
    --gray-text-light: #888;
    --glass-bg: rgba(240, 240, 240, 0.25);
    --glass-border: rgba(255, 255, 255, 0.4);
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--blue-light) 0%, var(--gray-bg) 50%, var(--orange-light) 100%);
    overflow-x: hidden;
}

body.has-background {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ===== 设置图标 ===== */
.settings-icon {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
}

.settings-icon:hover {
    background: rgba(255, 140, 0, 0.3);
    transform: rotate(90deg);
}

/* ===== 主内容区 ===== */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: calc(50vh - 150px);
    min-height: calc(100vh - 200px);
}

/* ===== 标语 ===== */
.slogan {
    font-size: 42px;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow:
        1px 1px 0 #fff,
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        0 0 4px rgba(0, 0,0,0.3),
        0 2px 8px rgba(0,0,0,0.2);
    background: linear-gradient(90deg, var(--orange), var(--blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* ===== 搜索框 ===== */
.search-container {
    width: 100%;
    max-width: 600px;
    position: relative;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 8px 8px 8px 16px;
    border: 2px solid var(--glass-border);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.3),
        0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: rgba(255, 140, 0, 0.7);
    box-shadow:
        0 0 0 2px rgba(255, 140, 0, 0.2),
        0 0 25px rgba(255, 140, 0, 0.3),
        0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ===== 引擎切换器 ===== */
.engine-switcher {
    position: relative;
    cursor: pointer;
    padding: 6px 10px;
    border-right: 1px solid rgba(255, 255, 255, 0.4);
    margin-right: 10px;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--orange);
}

.engine-current {
    font-size: 28px;
    line-height: 1;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.engine-current img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.engine-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: rgba(240, 240, 240, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 4px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--gray-border);
    min-width: 140px;
    max-width: 200px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 2000;
}

.engine-dropdown.show {
    display: block;
}

.engine-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
}

.engine-option:hover {
    background-color: rgba(255, 140, 0, 0.15);
}

.engine-option.active {
    background-color: rgba(255, 140, 0, 0.25);
}

/* ===== 搜索输入 ===== */
.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #333;
    font-size: 16px;
    padding: 12px 0;
}

.search-input::placeholder {
    color: rgba(80, 80, 80, 0.5);
}

.search-btn {
    background: linear-gradient(90deg, var(--orange), var(--blue));
    border: none;
    color: #fff;
    padding: 10px 16px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    transform: scale(1.05);
}

/* ===== 搜索建议 ===== */
.suggestions {
    position: absolute;
    top: calc(100% + 12px);
    left: 5%;
    right: 5%;
    width: 90%;
    background: rgba(240, 240, 240, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    max-height: 45vh;
    overflow-y: auto;
    visibility: hidden;
    z-index: 1000;
    border: 1px solid var(--gray-border);
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}

.suggestions.show {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear;
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    color: #333;
}

.suggestion-item:hover {
    background-color: rgba(255, 140, 0, 0.1);
}

.suggestion-item.active {
    background-color: rgba(255, 140, 0, 0.25);
}

.suggestion-icon {
    margin-right: 10px;
}

.suggestion-match {
    color: var(--orange);
    font-weight: 500;
}

/* ===== Dock 栏（毛玻璃圆角矩形，单行自适应宽度） ===== */
.dock-container {
    position: fixed;
    bottom: 36px; /* 给底栏留空间 */
    left: 0;
    right: 0;
    padding: 12px 20px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 50;
    display: flex;
    justify-content: center;
}

.dock {
    background: rgba(240, 240, 240, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    padding: 15px;
    /* 宽度自适应内容，不留白 */
    width: fit-content;
    max-width: calc(100vw - 40px);
    margin: 0 auto;
}

.dock-items {
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    justify-content: center;
    align-items: flex-start;
    overflow: hidden;
}

.dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    position: relative;
    flex-shrink: 0;
    width: 60px;
}

.dock-item:hover {
    transform: translateY(-5px);
}

.dock-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.dock-icon.text {
    background: linear-gradient(135deg, var(--orange), var(--blue));
}

.dock-icon.image {
    background-size: cover;
    background-position: center;
}

/* 程序坞图标（显示所有应用） */
.dock-item.dock-all-item .dock-icon {
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.6), rgba(91, 168, 216, 0.6));
    border: 2px dashed rgba(255, 255, 255, 0.6);
}

.dock-label {
    font-size: 11px;
    color: #333;
    text-align: center;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

/* ===== 上滑提示（手机端） ===== */
.swipe-up-hint {
    display: none;
    position: fixed;
    bottom: calc(110px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 11px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 20px;
    z-index: 55;
    animation: swipeHint 2s ease-in-out infinite;
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

@keyframes swipeHint {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.7; }
    50% { transform: translateX(-50%) translateY(-8px); opacity: 1; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading-spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
    font-size: 24px;
}

.swipe-up-hint.fade-out {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
    animation: none;
}

/* ===== 所有应用模态框 ===== */
.all-apps-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(200, 200, 200, 0);
    backdrop-filter: blur(0);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 250;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, background-color 0.3s ease, backdrop-filter 0.3s ease, visibility 0s linear 0.3s;
}

.all-apps-modal.show {
    opacity: 1;
    visibility: visible;
    background: rgba(200, 200, 200, 0.7);
    backdrop-filter: blur(8px);
    transition: opacity 0.3s ease, background-color 0.3s ease, backdrop-filter 0.3s ease, visibility 0s linear;
}

.all-apps-content {
    background: rgba(240, 240, 240, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.all-apps-modal.show .all-apps-content {
    opacity: 1;
    transform: translateY(0);
}

.all-apps-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 20px;
    border-bottom: none;
    background: transparent;
    flex-shrink: 0;
}

.all-apps-header h2 {
    color: var(--orange);
    font-size: 18px;
}

.all-apps-header .close-btn {
    display: none;
}

.all-apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 20px;
    padding: 20px;
    overflow-y: auto;
}

.all-apps-grid .dock-item {
    width: auto;
}

/* ===== 底栏（黑底白字备案号） ===== */
.footer-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a1a;
    color: #fff;
    text-align: center;
    padding: 8px 16px;
    font-size: 12px;
    z-index: 60;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== 模态框通用 ===== */
.settings-modal,
.add-dock-modal,
.add-engine-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(200, 200, 200, 0);
    backdrop-filter: blur(0);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease, background-color 0.3s ease, backdrop-filter 0.3s ease;
}

.settings-modal.show,
.add-dock-modal.show,
.add-engine-modal.show {
    display: flex;
    opacity: 1;
    background: rgba(200, 200, 200, 0.6);
    backdrop-filter: blur(5px);
}

/* ===== 设置模态框新布局 ===== */
.settings-layout {
    background: #FAFAFA;
    border-radius: 16px;
    width: 100%;
    max-width: 800px;
    height: 60vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--gray-border);
    box-shadow: 0 10px 50px rgba(0,0,0,0.15);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.settings-modal.show .settings-layout {
    opacity: 1;
    transform: translateY(0);
}

/* 顶栏 */
.settings-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #fff;
    border-bottom: 1px solid var(--gray-border);
    flex-shrink: 0;
}

.settings-topbar h2 {
    color: var(--orange);
    font-size: 18px;
    font-weight: 700;
}

.topbar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.topbar-btn {
    background: var(--gray-card);
    border: 1px solid var(--gray-border);
    color: var(--gray-text);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.topbar-btn:hover {
    background: var(--orange);
    color: #fff;
    border-color: var(--orange);
}

/* 密码验证区 */
.password-section {
    padding: 30px 20px;
    text-align: center;
    flex-shrink: 0;
}

.password-hint {
    color: var(--gray-text);
    font-size: 14px;
    margin-bottom: 15px;
}

.password-input-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
    align-items: center;
}

.password-input-container input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-border);
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-size: 14px;
}

.password-input-container input::placeholder {
    color: #aaa;
}

.verify-btn {
    padding: 10px 20px;
    background: var(--orange);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
}

.verify-btn:hover {
    background: var(--orange-light);
}

.password-status {
    margin-top: 10px;
    font-size: 12px;
}

/* 设置主体（左侧+右侧） */
.settings-body {
    flex: 1;
    display: flex;
    overflow: hidden;
    min-height: 0;
}

/* 左侧分类导航（占 1/3） */
.settings-sidebar {
    flex: 0 0 33.33%;
    background: #F5F5F5;
    border-right: 1px solid var(--gray-border);
    overflow-y: auto;
    padding: 10px 0;
}

.sidebar-item {
    padding: 14px 20px;
    color: var(--gray-text);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-item:hover {
    background: rgba(255, 140, 0, 0.08);
    color: var(--orange);
}

.sidebar-item.active {
    background: rgba(255, 140, 0, 0.12);
    color: var(--orange);
    border-left-color: var(--orange);
    font-weight: 600;
}

/* 右侧内容（占 2/3） */
.settings-main {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.settings-panel {
    display: none;
}

.settings-panel.active {
    display: block;
}

.save-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(90deg, var(--orange), var(--orange-light));
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.4);
}

/* ===== 设置内容样式 ===== */
.setting-group {
    margin-bottom: 25px;
}

.setting-group h3 {
    color: var(--orange);
    font-size: 15px;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--gray-border);
}

.setting-item {
    margin-bottom: 15px;
}

.setting-item label {
    display: block;
    color: var(--gray-text);
    font-size: 13px;
    margin-bottom: 5px;
}

.setting-item input,
.setting-item select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--gray-border);
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-size: 14px;
}

.setting-item input::placeholder {
    color: #aaa;
}

.setting-item select {
    cursor: pointer;
}

.color-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.color-row input[type="color"] {
    width: 50px;
    height: 38px;
    padding: 2px;
    border: 1px solid var(--gray-border);
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
}

.color-row input[type="text"] {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--gray-border);
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-size: 14px;
    font-family: monospace;
}

/* ===== 小弹窗（Dock/Engine编辑） ===== */
.modal-content {
    background: #FAFAFA;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid var(--gray-border);
    box-shadow: 0 10px 50px rgba(0,0,0,0.15);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-border);
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h2 {
    color: var(--orange);
    font-size: 18px;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--gray-text-light);
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: var(--orange);
}

/* ===== 表单 ===== */
.form-group {
    margin-bottom: 15px;
    padding: 0 20px;
}

.form-group label {
    display: block;
    color: var(--gray-text);
    font-size: 13px;
    margin-bottom: 5px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--gray-border);
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-size: 14px;
}

.form-group input::placeholder {
    color: #aaa;
}

.form-group select option {
    background: #fff;
    color: #333;
}

.modal-content > .save-btn {
    margin: 20px;
    width: calc(100% - 40px);
}

/* ===== Dock/Engine 列表 ===== */
.preview-btn {
    padding: 8px 14px;
    background: var(--gray-card);
    color: var(--gray-text);
    border: 1px solid var(--gray-border);
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preview-btn:hover {
    background: var(--orange);
    color: #fff;
    border-color: var(--orange);
}

.add-dock-btn,
.add-engine-btn {
    width: 100%;
    padding: 10px;
    background: var(--gray-card);
    color: var(--gray-text);
    border: 1px dashed var(--gray-border);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-dock-btn:hover,
.add-engine-btn:hover {
    background: rgba(255, 140, 0, 0.1);
    color: var(--orange);
    border-color: var(--orange);
}

.dock-list,
.engine-list {
    margin-bottom: 15px;
}

.dock-list-item,
.engine-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid var(--gray-border);
    border-radius: 8px;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.icon-list {
}

.icon-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--gray-border);
    border-radius: 10px;
    margin-bottom: 10px;
    color: #333;
    font-size: 14px;
}

.icon-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-left: 12px;
    flex: 1;
}

.icon-info span {
    font-size: 12px;
    color: #888;
}

.icon-usage {
    margin-right: 12px;
    font-size: 12px;
    font-weight: 500;
}

.delete-btn.disabled {
    background: #ccc !important;
    color: #999 !important;
    cursor: not-allowed !important;
}

.dock-list-item.dragging-item {
    opacity: 0.4;
    transform: scale(0.98);
}

.drag-hint {
    color: var(--gray-text-light);
    font-size: 12px;
    margin-bottom: 10px;
}

.dock-list-item .item-info,
.engine-list-item .item-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.dock-list-item .item-info img,
.engine-list-item .item-info img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    flex-shrink: 0;
}

.dock-list-item .item-info span,
.engine-list-item .item-info span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dock-list-item .item-actions,
.engine-list-item .item-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.dock-list-item button,
.engine-list-item button {
    background: var(--gray-card);
    border: 1px solid var(--gray-border);
    color: var(--gray-text);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dock-list-item button.edit-btn:hover,
.engine-list-item button.edit-btn:hover {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}

.dock-list-item button.default-btn:hover,
.engine-list-item button.default-btn:hover {
    background: var(--orange);
    color: #fff;
    border-color: var(--orange);
}

.dock-list-item button.delete-btn:hover,
.engine-list-item button.delete-btn:hover {
    background: #f44336;
    color: #fff;
    border-color: #f44336;
}

/* ===== 编辑模式 ===== */
.dock-item.editing {
    background: rgba(255, 140, 0, 0.2);
    border-radius: 12px;
}

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

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .main-content {
        padding-top: calc(40vh - 100px);
    }

    .slogan {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .search-container {
        padding: 0 15px;
    }

    .search-box {
        padding: 6px 6px 6px 8px;
    }

    .engine-current {
        font-size: 22px;
        width: 28px;
        height: 28px;
    }
    
    .engine-current img {
        width: 24px;
        height: 24px;
    }

    .search-input {
        font-size: 14px;
        padding: 10px 0;
    }

    .dock-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .dock-label {
        font-size: 10px;
        max-width: 50px;
    }

    .dock-items {
        gap: 10px;
    }

    .dock-item {
        width: 50px;
    }

    /* 手机端隐藏程序坞图标，显示上滑提示 */
    .dock-all-item {
        display: none !important;
    }

    .swipe-up-hint {
        display: block;
    }

    /* 设置模态框移动端：侧边栏变成顶部横向 */
    .settings-body {
        flex-direction: column;
    }

    .settings-sidebar {
        flex: 0 0 auto;
        display: flex;
        border-right: none;
        border-bottom: 1px solid var(--gray-border);
        overflow-x: auto;
        padding: 0;
    }

    .sidebar-item {
        padding: 12px 16px;
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
    }

    .sidebar-item.active {
        border-left: none;
        border-bottom-color: var(--orange);
    }

    .settings-layout {
        max-width: 100%;
        max-height: 95vh;
    }
}

@media (max-width: 480px) {
    .settings-icon {
        width: 35px;
        height: 35px;
        font-size: 18px;
        top: 15px;
        left: 15px;
    }

    .slogan {
        font-size: 18px;
    }

    .dock-icon {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .dock-label {
        font-size: 9px;
        max-width: 45px;
    }

    .topbar-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
}

/* ===== 自定义模态框（z-index: 300，在所有其他模态框之上） ===== */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(200, 200, 200, 0);
    backdrop-filter: blur(0);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 300;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease, background-color 0.3s ease, backdrop-filter 0.3s ease;
}

.custom-modal.show {
    display: flex;
    opacity: 1;
    background: rgba(200, 200, 200, 0.7);
    backdrop-filter: blur(5px);
}

.custom-modal-content {
    background: #FAFAFA;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--gray-border);
    box-shadow: 0 10px 50px rgba(0,0,0,0.2);
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-modal.show .custom-modal-content {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.custom-modal-title {
    padding: 16px 20px;
    background: linear-gradient(90deg, var(--orange), var(--orange-light));
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.custom-modal-message {
    padding: 24px 20px;
    color: var(--gray-text);
    font-size: 14px;
    text-align: center;
    line-height: 1.6;
}

.custom-modal-actions {
    display: flex;
    border-top: 1px solid var(--gray-border);
}

.custom-modal-btn {
    flex: 1;
    padding: 14px;
    border: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-modal-btn.cancel {
    background: var(--gray-card);
    color: var(--gray-text);
    border-right: 1px solid var(--gray-border);
}

.custom-modal-btn.cancel:hover {
    background: var(--gray-bg);
}

.custom-modal-btn.confirm {
    background: var(--orange);
    color: #fff;
}

.custom-modal-btn.confirm:hover {
    background: var(--orange-light);
}
