/* ===== 基础重置 ===== */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html,
        body {
            height: 100%;
            width: 100%;
            overflow: hidden;
        }

        body {
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            align-items: center;
            padding-top: 15vh;
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            background-attachment: fixed;
            font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
            transition: background-color 0.5s ease;
            -webkit-tap-highlight-color: transparent;
        }

        /* ===== 深色 / 浅色 模式变量 ===== */
        body.dark-mode {
            background-color: #0d0d0d;
            --bg-primary: rgba(255, 255, 255, 0.15);
            --bg-hover: rgba(255, 255, 255, 0.25);
            --bg-active: rgba(255, 255, 255, 0.35);
            --text-primary: rgba(255, 255, 255, 0.95);
            --text-secondary: rgba(255, 255, 255, 0.6);
            --text-muted: rgba(255, 255, 255, 0.35);
            --border-color: rgba(255, 255, 255, 0.15);
            --shadow-color: rgba(0, 0, 0, 0.3);
            --shadow-inset: rgba(255, 255, 255, 0.1);
            --scrollbar-thumb: rgba(255, 255, 255, 0.2);
            --scrollbar-hover: rgba(255, 255, 255, 0.35);
            --footer-color: rgba(221, 146, 228, 1);
            --dock-bg: rgba(255, 255, 255, 0.15);
            --dock-border: rgba(255, 255, 255, 0.2);
            --dock-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
            --icon-bg: rgba(255, 255, 255, 0.15);
            --icon-hover: rgba(255, 255, 255, 0.25);
            --label-bg: rgba(255, 255, 255, 0.2);
            --divider-color: rgba(255, 255, 255, 0.2);
            --modal-bg: rgba(30, 30, 30, 0.65);
            --modal-border: rgba(255, 255, 255, 0.1);
            --modal-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
            --title-color: rgba(255, 255, 255, 0.9);
            --close-color: rgba(255, 255, 255, 0.6);
            --close-hover: rgba(255, 255, 255, 0.9);
            --category-color: rgba(255, 255, 255, 0.5);
            --link-bg: rgba(255, 255, 255, 0.1);
            --link-border: rgba(255, 255, 255, 0.1);
            --link-color: rgba(255, 255, 255, 0.85);
            --link-hover-bg: rgba(255, 255, 255, 0.2);
            --link-hover-border: rgba(255, 255, 255, 0.25);
            --link-hover-color: white;
            --history-bg: rgba(255, 255, 255, 0.12);
            --history-border: rgba(255, 255, 255, 0.1);
            --history-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
            --history-item-color: rgba(255, 255, 255, 0.8);
            --history-item-hover: rgba(255, 255, 255, 0.12);
            --history-del-color: rgba(255, 255, 255, 0.4);
            --history-del-hover: #ff6b6b;
            --history-clear-color: rgba(255, 255, 255, 0.5);
            --history-clear-hover: #ff6b6b;
            --history-empty-color: rgba(255, 255, 255, 0.35);
            --history-icon-color: rgba(255, 255, 255, 0.3);
            --engine-dropdown-bg: rgba(255, 255, 255, 0.2);
            --engine-dropdown-border: rgba(255, 255, 255, 0.15);
            --engine-dropdown-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
            --engine-option-color: rgba(255, 255, 255, 0.75);
            --engine-option-hover: rgba(255, 255, 255, 0.15);
            --engine-option-active: rgba(255, 255, 255, 0.25);
            --engine-check-bg: rgba(255, 255, 255, 0.9);
            --engine-check-color: #333;
            --search-box-bg: rgba(255, 255, 255, 0.15);
            --search-box-color: white;
            --search-box-placeholder: rgba(255, 255, 255, 0.6);
            --search-box-focus: rgba(255, 255, 255, 0.25);
            --search-box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
            --search-box-focus-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
            --btn-bg: rgba(255, 255, 255, 0.2);
            --btn-hover: rgba(255, 255, 255, 0.35);
            --btn-color: white;
        }

        body.light-mode {
            background-color: #f5f5f7;
            --bg-primary: rgba(0, 0, 0, 0.08);
            --bg-hover: rgba(0, 0, 0, 0.12);
            --bg-active: rgba(0, 0, 0, 0.18);
            --text-primary: rgba(0, 0, 0, 0.85);
            --text-secondary: rgba(0, 0, 0, 0.4);
            --text-muted: rgba(0, 0, 0, 0.3);
            --border-color: rgba(0, 0, 0, 0.08);
            --shadow-color: rgba(0, 0, 0, 0.1);
            --shadow-inset: rgba(255, 255, 255, 0.5);
            --scrollbar-thumb: rgba(0, 0, 0, 0.15);
            --scrollbar-hover: rgba(0, 0, 0, 0.3);
            --footer-color: rgba(235, 171, 255, 0.51);
            --dock-bg: rgba(255, 255, 255, 0.7);
            --dock-border: rgba(0, 0, 0, 0.08);
            --dock-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
            --icon-bg: rgba(0, 0, 0, 0.06);
            --icon-hover: rgba(0, 0, 0, 0.1);
            --label-bg: rgba(0, 0, 0, 0.7);
            --divider-color: rgba(0, 0, 0, 0.15);
            --modal-bg: rgba(255, 255, 255, 0.75);
            --modal-border: rgba(0, 0, 0, 0.08);
            --modal-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
            --title-color: rgba(0, 0, 0, 0.85);
            --close-color: rgba(0, 0, 0, 0.5);
            --close-hover: rgba(0, 0, 0, 0.85);
            --category-color: rgba(0, 0, 0, 0.4);
            --link-bg: rgba(0, 0, 0, 0.04);
            --link-border: rgba(0, 0, 0, 0.06);
            --link-color: rgba(0, 0, 0, 0.75);
            --link-hover-bg: rgba(0, 0, 0, 0.08);
            --link-hover-border: rgba(0, 0, 0, 0.12);
            --link-hover-color: #000;
            --history-bg: rgba(255, 255, 255, 0.75);
            --history-border: rgba(0, 0, 0, 0.08);
            --history-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
            --history-item-color: rgba(0, 0, 0, 0.7);
            --history-item-hover: rgba(0, 0, 0, 0.05);
            --history-del-color: rgba(0, 0, 0, 0.3);
            --history-del-hover: #e74c3c;
            --history-clear-color: rgba(0, 0, 0, 0.4);
            --history-clear-hover: #e74c3c;
            --history-empty-color: rgba(0, 0, 0, 0.3);
            --history-icon-color: rgba(0, 0, 0, 0.2);
            --engine-dropdown-bg: rgba(255, 255, 255, 0.85);
            --engine-dropdown-border: rgba(0, 0, 0, 0.08);
            --engine-dropdown-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.5);
            --engine-option-color: rgba(0, 0, 0, 0.7);
            --engine-option-hover: rgba(0, 0, 0, 0.05);
            --engine-option-active: rgba(0, 0, 0, 0.08);
            --engine-check-bg: rgba(0, 0, 0, 0.8);
            --engine-check-color: #fff;
            --search-box-bg: rgba(0, 0, 0, 0.08);
            --search-box-color: #333;
            --search-box-placeholder: rgba(0, 0, 0, 0.4);
            --search-box-focus: rgba(0, 0, 0, 0.12);
            --search-box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
            --search-box-focus-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
            --btn-bg: rgba(0, 0, 0, 0.08);
            --btn-hover: rgba(0, 0, 0, 0.15);
            --btn-color: #333;
        }

        /* ===== 时间 ===== */
        .time-display {
            font-family: 'Comic Sans MS', 'Segoe UI', cursive;
            font-size: clamp(48px, 12vw, 80px);
            font-weight: 200;
            letter-spacing: 2px;
            margin-bottom: clamp(20px, 5vh, 40px);
            font-variant-numeric: tabular-nums;
            transition: all 0.3s ease;
            color: var(--text-primary);
            text-shadow: 0 2px 20px var(--shadow-color);
            user-select: none;
            line-height: 1.2;
        }

        /* ===== 搜索容器 ===== */
        .search-wrapper {
            position: relative;
            width: min(520px, 92vw);
            max-width: 92vw;
            transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
            flex-shrink: 0;
        }

        .search-wrapper.focused {
            transform: scale(1.02);
        }

        /* 搜索框 */
        .search-box {
            width: 100%;
            height: clamp(44px, 6.5vh, 56px);
            border: none;
            border-radius: 28px;
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            font-size: clamp(14px, 1.6vw, 17px);
            padding: 0 clamp(16px, 3vw, 24px);
            outline: none;
            transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
            text-align: center;
            background: var(--search-box-bg);
            color: var(--search-box-color);
            box-shadow: var(--search-box-shadow);
        }

        .search-box::placeholder {
            font-size: clamp(13px, 1.4vw, 16px);
            color: var(--search-box-placeholder);
        }

        .search-box:focus {
            background: var(--search-box-focus);
            box-shadow: var(--search-box-focus-shadow);
        }

        .search-box.has-content,
        .search-box:focus {
            padding-left: clamp(72px, 12vw, 110px);
            padding-right: clamp(46px, 7vw, 66px);
            text-align: left;
        }

        /* 引擎切换按钮 */
        .engine-btn {
            position: absolute;
            left: clamp(6px, 1.2vw, 10px);
            top: 50%;
            transform: translateY(-50%) scale(0);
            opacity: 0;
            height: clamp(30px, 4.5vh, 38px);
            padding: 0 clamp(8px, 1.2vw, 14px);
            min-width: clamp(48px, 9vw, 68px);
            border: none;
            border-radius: 100px;
            font-size: clamp(11px, 1.2vw, 14px);
            font-weight: 500;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 2px;
            transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
            z-index: 10;
            letter-spacing: 0.3px;
            background: var(--btn-bg);
            color: var(--btn-color);
            white-space: nowrap;
        }

        .search-wrapper.focused .engine-btn,
        .search-wrapper.dropdown-open .engine-btn {
            transform: translateY(-50%) scale(1);
            opacity: 1;
        }

        .engine-btn:hover {
            background: var(--btn-hover);
        }

        .engine-btn:active {
            transform: translateY(-50%) scale(0.92) !important;
        }

        .engine-btn .arrow {
            font-size: 9px;
            opacity: 0.7;
            transition: transform 0.3s ease;
            margin-left: 1px;
        }

        .search-wrapper.dropdown-open .engine-btn .arrow {
            transform: rotate(180deg);
        }

        /* 搜索按钮 */
        .search-btn {
            position: absolute;
            right: clamp(6px, 1.2vw, 10px);
            top: 50%;
            transform: translateY(-50%) scale(0);
            opacity: 0;
            width: clamp(32px, 5vh, 40px);
            height: clamp(32px, 5vh, 40px);
            border: none;
            border-radius: 50%;
            font-size: clamp(15px, 1.8vw, 19px);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
            z-index: 10;
            background: var(--btn-bg);
            color: var(--btn-color);
        }

        .search-wrapper.focused .search-btn,
        .search-wrapper.dropdown-open .search-btn {
            transform: translateY(-50%) scale(1);
            opacity: 1;
        }

        .search-btn:hover {
            transform: translateY(-50%) scale(1.1) !important;
        }

        .search-btn:active {
            transform: translateY(-50%) scale(0.9) !important;
        }

        .search-wrapper.dropdown-open .search-box {
            padding-left: clamp(72px, 12vw, 110px);
            padding-right: clamp(46px, 7vw, 66px);
            text-align: left;
            box-shadow: var(--search-box-focus-shadow);
        }

        /* ===== 引擎下拉 ===== */
        .engine-dropdown {
            position: absolute;
            top: calc(100% + 10px);
            left: clamp(2px, 0.5vw, 6px);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-radius: 18px;
            padding: 6px;
            min-width: clamp(80px, 16vw, 120px);
            opacity: 0;
            transform: translateY(-8px) scale(0.96);
            pointer-events: none;
            transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
            z-index: 100;
            background: var(--engine-dropdown-bg);
            border: 1px solid var(--engine-dropdown-border);
            box-shadow: var(--engine-dropdown-shadow);
        }

        .engine-dropdown.show {
            opacity: 1;
            transform: translateY(0) scale(1);
            pointer-events: all;
        }

        .engine-option {
            padding: clamp(8px, 1.2vh, 12px) clamp(10px, 1.5vw, 16px);
            border-radius: 14px;
            font-size: clamp(13px, 1.2vw, 15px);
            cursor: pointer;
            transition: all 0.25s ease;
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 2px;
            color: var(--engine-option-color);
        }

        .engine-option:last-child {
            margin-bottom: 0;
        }

        .engine-option:hover {
            background: var(--engine-option-hover);
            transform: translateX(2px);
        }

        .engine-option.active {
            font-weight: 600;
            background: var(--engine-option-active);
            color: var(--text-primary);
        }

        .engine-name {
            flex: 1;
        }

        .engine-check {
            width: 18px;
            height: 18px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            opacity: 0;
            transform: scale(0);
            transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
            background: var(--engine-check-bg);
            color: var(--engine-check-color);
            flex-shrink: 0;
        }

        .engine-option.active .engine-check {
            opacity: 1;
            transform: scale(1);
        }

        /* ===== 历史记录下拉 ===== */
        .history-dropdown {
            position: absolute;
            top: calc(100% + 6px);
            left: 0;
            width: 100%;
            border-radius: 18px;
            backdrop-filter: blur(24px);
            -webkit-backdrop-filter: blur(24px);
            padding: 6px 8px;
            max-height: min(220px, 40vh);
            overflow-y: auto;
            opacity: 0;
            transform: translateY(-6px) scale(0.97);
            pointer-events: none;
            transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
            z-index: 90;
            scrollbar-width: thin;
            background: var(--history-bg);
            border: 1px solid var(--history-border);
            box-shadow: var(--history-shadow);
        }

        .history-dropdown::-webkit-scrollbar {
            width: 4px;
        }
        .history-dropdown::-webkit-scrollbar-track {
            background: transparent;
        }
        .history-dropdown::-webkit-scrollbar-thumb {
            border-radius: 4px;
            background: var(--scrollbar-thumb);
        }
        .history-dropdown::-webkit-scrollbar-thumb:hover {
            background: var(--scrollbar-hover);
        }

        .history-dropdown.show {
            opacity: 1;
            transform: translateY(0) scale(1);
            pointer-events: all;
        }

        .history-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: clamp(8px, 1.2vh, 11px) clamp(10px, 1.5vw, 16px);
            border-radius: 14px;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: clamp(13px, 1.2vw, 15px);
            user-select: none;
            color: var(--history-item-color);
        }

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

        .history-item .history-icon {
            font-size: 14px;
            flex-shrink: 0;
            opacity: 0.5;
            color: var(--history-icon-color);
        }

        .history-item .history-text {
            flex: 1;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .history-item .del-btn {
            width: clamp(26px, 3.5vh, 32px);
            height: clamp(26px, 3.5vh, 32px);
            border: none;
            border-radius: 50%;
            background: transparent;
            font-size: 13px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            transition: all 0.2s ease;
            opacity: 0;
            color: var(--history-del-color);
        }

        .history-item:hover .del-btn {
            opacity: 0.6;
        }
        .history-item .del-btn:hover {
            opacity: 1 !important;
            color: var(--history-del-hover);
            background: rgba(255, 107, 107, 0.15);
        }
        /* 触摸设备常显删除按钮 */
        @media (hover: none) and (pointer: coarse) {
            .history-item .del-btn {
                opacity: 0.5;
            }
        }

        .history-divider {
            height: 1px;
            margin: 4px 12px;
            opacity: 0.1;
            background: var(--divider-color);
        }

        .history-footer {
            display: flex;
            justify-content: flex-end;
            padding: 4px 6px 2px;
        }

        .history-clear {
            padding: 4px 12px;
            border: none;
            border-radius: 100px;
            font-size: 12px;
            cursor: pointer;
            background: transparent;
            transition: all 0.2s ease;
            font-weight: 500;
            letter-spacing: 0.3px;
            color: var(--history-clear-color);
        }

        .history-clear:hover {
            color: var(--history-clear-hover);
            background: rgba(255, 107, 107, 0.08);
        }

        .history-empty {
            text-align: center;
            padding: 18px 0 14px;
            font-size: 13px;
            letter-spacing: 0.5px;
            color: var(--history-empty-color);
        }

        /* ===== 底部 ===== */
        .footer {
            position: fixed;
            bottom: clamp(4px, 1vh, 10px);
            left: 50%;
            transform: translateX(-50%);
            font-size: clamp(10px, 1.1vw, 13px);
            letter-spacing: 1px;
            z-index: 50;
            opacity: 0.7;
            color: var(--footer-color);
            user-select: none;
            white-space: nowrap;
        }

        /* ===== Dock栏 ===== */
        .dock-container {
            position: fixed;
            bottom: clamp(18px, 3.5vh, 36px);
            left: 50%;
            transform: translateX(-50%);
            z-index: 200;
            display: flex;
            flex-direction: column;
            align-items: center;
            pointer-events: none;
        }

        .dock {
            display: flex;
            align-items: center;
            gap: clamp(6px, 1.2vw, 12px);
            padding: clamp(6px, 1.2vh, 10px) clamp(10px, 2vw, 18px);
            border-radius: clamp(16px, 2.5vw, 24px);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
            background: var(--dock-bg);
            border: 1px solid var(--dock-border);
            box-shadow: var(--dock-shadow);
            pointer-events: all;
        }

        .dock-item {
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .dock-icon {
            width: clamp(34px, 5.5vh, 46px);
            height: clamp(34px, 5.5vh, 46px);
            border-radius: clamp(10px, 1.5vw, 14px);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: clamp(16px, 2.2vw, 22px);
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            position: relative;
            overflow: hidden;
            background: var(--icon-bg);
            color: var(--text-primary);
            box-shadow: 0 4px 15px var(--shadow-color);
        }

        .dock-icon:hover {
            transform: scale(1.12) translateY(-3px);
            background: var(--icon-hover);
            box-shadow: 0 6px 20px var(--shadow-color);
        }

        .dock-icon:active {
            transform: scale(0.92) !important;
            transition: all 0.08s ease;
        }

        .dock-icon::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.25);
            transform: translate(-50%, -50%);
            transition: width 0.4s ease, height 0.4s ease, opacity 0.4s ease;
            opacity: 0;
            pointer-events: none;
        }

        .dock-icon:active::after {
            width: 100%;
            height: 100%;
            opacity: 1;
            transition: width 0.1s ease, height 0.1s ease, opacity 0.1s ease;
        }

        .dock-icon img.link-icon {
            width: 60%;
            height: 60%;
            object-fit: contain;
            border-radius: 0;
            background: transparent;
            margin: 0;
            transition: transform 0.3s ease;
        }

        .dock-icon:hover img.link-icon {
            transform: scale(1.1);
        }

        .dock-label {
            position: absolute;
            bottom: calc(100% + 8px);
            left: 50%;
            transform: translateX(-50%) translateY(4px);
            padding: clamp(4px, 0.8vh, 6px) clamp(10px, 1.5vw, 16px);
            border-radius: 8px;
            font-size: clamp(11px, 1.1vw, 13px);
            font-weight: 500;
            white-space: nowrap;
            opacity: 0;
            pointer-events: none;
            transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            background: var(--label-bg);
            color: var(--text-primary);
            box-shadow: 0 4px 12px var(--shadow-color);
        }

        .dock-item:hover .dock-label {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }

        .dock-divider {
            width: 1px;
            height: clamp(18px, 3vh, 28px);
            opacity: 0.2;
            transition: opacity 0.3s ease;
            background: var(--divider-color);
            flex-shrink: 0;
        }

        /* ===== 弹出窗口 ===== */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            z-index: 300;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease;
            backdrop-filter: blur(15px) saturate(1.2);
            -webkit-backdrop-filter: blur(15px) saturate(1.2);
            background: rgba(0, 0, 0, 0.2);
        }

        .modal-overlay.show {
            opacity: 1;
            pointer-events: all;
        }

        .modal-content {
            width: min(750px, 94vw);
            max-width: 94vw;
            max-height: min(75vh, 600px);
            border-radius: clamp(20px, 3vw, 28px);
            padding: 0;
            backdrop-filter: blur(40px) saturate(1.5);
            -webkit-backdrop-filter: blur(40px) saturate(1.5);
            transform: translateY(20px) scale(0.95);
            transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            background: var(--modal-bg);
            border: 1px solid var(--modal-border);
            box-shadow: var(--modal-shadow);
        }

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

        .modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: clamp(14px, 2.5vh, 22px) clamp(16px, 3vw, 28px) clamp(10px, 1.5vh, 16px);
            flex-shrink: 0;
        }

        .modal-title {
            font-size: clamp(16px, 2vw, 20px);
            font-weight: 600;
            letter-spacing: 0.5px;
            color: var(--title-color);
        }

        .modal-close {
            width: clamp(28px, 4vh, 34px);
            height: clamp(28px, 4vh, 34px);
            border: none;
            border-radius: 50%;
            background: transparent;
            font-size: clamp(15px, 1.8vw, 18px);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            color: var(--close-color);
        }

        .modal-close:hover {
            color: var(--close-hover);
            background: var(--bg-hover);
        }

        .modal-scroll {
            overflow-y: auto;
            padding: 0 clamp(14px, 2.5vw, 28px) clamp(16px, 2.5vh, 24px);
            flex: 1;
            scrollbar-width: none;
            -ms-overflow-style: none;
        }

        .modal-scroll::-webkit-scrollbar {
            width: 0;
            height: 0;
            display: none;
        }

        .category-section {
            margin-bottom: clamp(14px, 2vh, 22px);
        }

        .category-section:last-child {
            margin-bottom: 0;
        }

        .category-title {
            font-size: clamp(11px, 1.1vw, 13px);
            font-weight: 600;
            letter-spacing: 1.5px;
            text-transform: uppercase;
            margin-bottom: clamp(8px, 1.2vh, 12px);
            padding-left: 4px;
            color: var(--category-color);
        }

        .links-grid {
            display: grid;
            grid-template-columns: repeat(6, 1fr);
            gap: clamp(6px, 1vw, 12px);
        }

        .link-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: clamp(10px, 1.5vh, 16px) clamp(4px, 0.6vw, 10px);
            border-radius: clamp(12px, 1.5vw, 16px);
            text-decoration: none;
            transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            cursor: pointer;
            background: var(--link-bg);
            border: 1px solid var(--link-border);
            color: var(--link-color);
            min-height: clamp(60px, 10vh, 80px);
        }

        .link-item:hover {
            transform: translateY(-3px);
            background: var(--link-hover-bg);
            border-color: var(--link-hover-border);
            color: var(--link-hover-color);
        }

        .link-item:active {
            transform: scale(0.95);
            transition: all 0.08s ease;
        }

        .link-icon {
            width: clamp(28px, 4vh, 40px);
            height: clamp(28px, 4vh, 40px);
            border-radius: clamp(8px, 1vw, 12px);
            object-fit: contain;
            margin-bottom: clamp(4px, 0.6vh, 8px);
            transition: transform 0.3s ease;
            background: transparent;
            flex-shrink: 0;
        }

        .link-item:hover .link-icon {
            transform: scale(1.08);
        }

        .link-name {
            font-size: clamp(10px, 1vw, 12px);
            font-weight: 500;
            text-align: center;
            line-height: 1.3;
            max-width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            transition: color 0.3s ease;
            color: var(--link-color);
        }

        .link-item:hover .link-name {
            color: var(--link-hover-color);
        }

        .fallback {
            display: none;
            width: clamp(28px, 4vh, 40px);
            height: clamp(28px, 4vh, 40px);
            border-radius: clamp(8px, 1vw, 12px);
            align-items: center;
            justify-content: center;
            font-size: clamp(16px, 2vw, 22px);
            margin-bottom: clamp(4px, 0.6vh, 8px);
            background: rgba(255, 255, 255, 0.08);
            flex-shrink: 0;
        }

        /* ============================================================
                   自适应响应式 — 移动端优先
                   ============================================================ */

        /* ---- 小屏手机 ( < 400px ) ---- */
        @media (max-width: 400px) {
            .time-display {
                font-size: 36px;
                margin-bottom: 14px;
            }
            .search-wrapper {
                width: 94vw;
            }
            .search-box {
                height: 42px;
                font-size: 13px;
                border-radius: 21px;
                padding: 0 14px;
            }
            .search-box.has-content,
            .search-box:focus {
                padding-left: 62px;
                padding-right: 42px;
            }
            .engine-btn {
                height: 26px;
                min-width: 42px;
                font-size: 10px;
                left: 4px;
                padding: 0 6px;
            }
            .search-btn {
                width: 28px;
                height: 28px;
                font-size: 13px;
                right: 4px;
            }
            .search-wrapper.dropdown-open .search-box {
                padding-left: 62px;
                padding-right: 42px;
            }
            .engine-dropdown {
                min-width: 70px;
                top: calc(100% + 6px);
                padding: 4px;
            }
            .engine-option {
                padding: 6px 10px;
                font-size: 12px;
                gap: 6px;
            }
            .engine-check {
                width: 16px;
                height: 16px;
                font-size: 10px;
            }
            .history-dropdown {
                max-height: 140px;
                padding: 4px 6px;
                top: calc(100% + 4px);
            }
            .history-item {
                padding: 6px 10px;
                font-size: 12px;
                gap: 8px;
            }
            .history-item .del-btn {
                width: 24px;
                height: 24px;
                font-size: 11px;
            }
            .links-grid {
                grid-template-columns: repeat(3, 1fr);
                gap: 6px;
            }
            .link-item {
                padding: 8px 4px;
                min-height: 52px;
                border-radius: 10px;
            }
            .link-icon {
                width: 24px;
                height: 24px;
                border-radius: 6px;
            }
            .link-name {
                font-size: 9px;
            }
            .dock {
                gap: 4px;
                padding: 5px 8px;
                border-radius: 14px;
            }
            .dock-icon {
                width: 30px;
                height: 30px;
                font-size: 13px;
                border-radius: 8px;
            }
            .dock-divider {
                height: 16px;
            }
            .dock-label {
                font-size: 10px;
                padding: 3px 8px;
                bottom: calc(100% + 6px);
            }
            .modal-content {
                max-height: 70vh;
                border-radius: 18px;
            }
            .modal-header {
                padding: 12px 14px 8px;
            }
            .modal-title {
                font-size: 15px;
            }
            .modal-close {
                width: 26px;
                height: 26px;
                font-size: 14px;
            }
            .modal-scroll {
                padding: 0 12px 14px;
            }
            .category-title {
                font-size: 10px;
            }
            .footer {
                font-size: 9px;
                bottom: 3px;
            }
            .dock-container {
                bottom: 14px;
            }
        }

        /* ---- 手机 ( 400px - 600px ) ---- */
        @media (min-width: 401px) and (max-width: 600px) {
            .time-display {
                font-size: 42px;
                margin-bottom: 18px;
            }
            .search-wrapper {
                width: 90vw;
            }
            .search-box {
                height: 44px;
                font-size: 14px;
                border-radius: 22px;
            }
            .search-box.has-content,
            .search-box:focus {
                padding-left: 76px;
                padding-right: 48px;
            }
            .engine-btn {
                height: 28px;
                min-width: 48px;
                font-size: 11px;
                left: 5px;
                padding: 0 8px;
            }
            .search-btn {
                width: 30px;
                height: 30px;
                font-size: 14px;
                right: 5px;
            }
            .search-wrapper.dropdown-open .search-box {
                padding-left: 76px;
                padding-right: 48px;
            }
            .links-grid {
                grid-template-columns: repeat(3, 1fr);
                gap: 8px;
            }
            .link-item {
                padding: 10px 4px;
                min-height: 58px;
            }
            .link-icon {
                width: 28px;
                height: 28px;
            }
            .link-name {
                font-size: 10px;
            }
            .dock {
                gap: 6px;
                padding: 6px 10px;
                border-radius: 16px;
            }
            .dock-icon {
                width: 34px;
                height: 34px;
                font-size: 15px;
                border-radius: 9px;
            }
            .dock-divider {
                height: 20px;
            }
            .dock-label {
                font-size: 11px;
                padding: 4px 10px;
            }
            .modal-content {
                max-height: 72vh;
                border-radius: 20px;
            }
            .modal-header {
                padding: 14px 18px 10px;
            }
            .modal-title {
                font-size: 16px;
            }
            .modal-scroll {
                padding: 0 16px 16px;
            }
            .category-title {
                font-size: 11px;
            }
            .footer {
                font-size: 10px;
                bottom: 4px;
            }
            .dock-container {
                bottom: 18px;
            }
        }

        /* ---- 平板 ( 600px - 1024px ) ---- */
        @media (min-width: 601px) and (max-width: 1024px) {
            .time-display {
                font-size: clamp(56px, 10vw, 72px);
            }
            .search-wrapper {
                width: min(480px, 80vw);
            }
            .search-box {
                height: 50px;
                font-size: 16px;
            }
            .links-grid {
                grid-template-columns: repeat(4, 1fr);
                gap: 10px;
            }
            .link-item {
                padding: 14px 8px;
                min-height: 72px;
            }
            .link-icon {
                width: 34px;
                height: 34px;
            }
            .link-name {
                font-size: 11px;
            }
            .dock {
                gap: 8px;
                padding: 8px 14px;
                border-radius: 20px;
            }
            .dock-icon {
                width: 40px;
                height: 40px;
                font-size: 18px;
                border-radius: 11px;
            }
            .dock-divider {
                height: 24px;
            }
            .modal-content {
                max-height: 70vh;
                width: min(680px, 88vw);
            }
            .modal-scroll {
                padding: 0 20px 18px;
            }
            .category-title {
                font-size: 12px;
            }
            .footer {
                font-size: 11px;
            }
            .dock-container {
                bottom: 24px;
            }
        }

        /* ---- 桌面 ( > 1024px ) ---- */
        @media (min-width: 1025px) {
            .time-display {
                font-size: 80px;
            }
            .search-wrapper {
                width: 520px;
            }
            .search-box {
                height: 56px;
                font-size: 17px;
            }
            .links-grid {
                grid-template-columns: repeat(6, 1fr);
                gap: 12px;
            }
            .link-item {
                padding: 16px 10px;
                min-height: 80px;
            }
            .link-icon {
                width: 40px;
                height: 40px;
            }
            .link-name {
                font-size: 12px;
            }
            .dock {
                gap: 10px;
                padding: 10px 18px;
                border-radius: 24px;
            }
            .dock-icon {
                width: 46px;
                height: 46px;
                font-size: 22px;
                border-radius: 14px;
            }
            .dock-divider {
                height: 28px;
            }
            .dock-label {
                font-size: 13px;
                padding: 5px 14px;
            }
            .modal-content {
                max-height: 75vh;
                width: 750px;
            }
            .modal-scroll {
                padding: 0 24px 20px;
            }
            .category-title {
                font-size: 13px;
            }
            .footer {
                font-size: 12px;
                bottom: 10px;
            }
            .dock-container {
                bottom: 32px;
            }
        }

        /* ---- 超大屏 ( > 1600px ) ---- */
        @media (min-width: 1600px) {
            .time-display {
                font-size: 96px;
            }
            .search-wrapper {
                width: 580px;
            }
            .search-box {
                height: 60px;
                font-size: 18px;
                border-radius: 30px;
            }
            .links-grid {
                gap: 14px;
            }
            .dock-icon {
                width: 52px;
                height: 52px;
                font-size: 24px;
                border-radius: 16px;
            }
            .dock {
                gap: 12px;
                padding: 12px 22px;
                border-radius: 28px;
            }
            .modal-content {
                max-height: 70vh;
                width: 820px;
            }
        }

        /* ============================================================
                   辅助工具
                   ============================================================ */
        /* 禁用滚动 */
        .no-scroll {
            overflow: hidden !important;
        }

        /* 触摸设备优化：增大点击区域 */
        @media (hover: none) and (pointer: coarse) {
            .engine-btn,
            .search-btn,
            .dock-icon,
            .link-item,
            .history-item,
            .modal-close,
            .history-clear {
                min-height: 44px;
                min-width: 44px;
            }
            .engine-btn {
                min-height: 32px;
                min-width: 50px;
            }
            .search-btn {
                min-height: 36px;
                min-width: 36px;
            }
            .dock-icon {
                min-height: 40px;
                min-width: 40px;
            }
            .link-item {
                min-height: 64px;
            }
            .history-item {
                min-height: 40px;
            }
            .modal-close {
                min-height: 36px;
                min-width: 36px;
            }
            /* 触摸设备上 label 不显示 hover */
            .dock-item .dock-label {
                display: none;
            }
            /* 触摸设备上删除按钮常显 */
            .history-item .del-btn {
                opacity: 0.4;
            }
        }

        /* 横屏手机优化 */
        @media (max-height: 500px) and (orientation: landscape) {
            body {
                padding-top: 6vh;
            }
            .time-display {
                font-size: clamp(28px, 6vh, 40px);
                margin-bottom: 10px;
            }
            .search-box {
                height: 38px;
                font-size: 13px;
            }
            .search-wrapper {
                width: min(420px, 70vw);
            }
            .dock-container {
                bottom: 12px;
            }
            .dock-icon {
                width: 30px;
                height: 30px;
                font-size: 13px;
            }
            .dock {
                padding: 4px 8px;
                gap: 4px;
                border-radius: 14px;
            }
            .dock-divider {
                height: 14px;
            }
            .footer {
                font-size: 9px;
                bottom: 3px;
            }
            .modal-content {
                max-height: 80vh;
            }
            .links-grid {
                grid-template-columns: repeat(4, 1fr);
                gap: 6px;
            }
            .link-item {
                min-height: 48px;
                padding: 6px 4px;
            }
            .link-icon {
                width: 22px;
                height: 22px;
            }
            .link-name {
                font-size: 9px;
            }
        }

        /* 暗色模式下的滚动条适配（已通过变量实现） */
        /* 浅色模式下的滚动条适配（已通过变量实现） */