/* 性能优化：减少重绘和回流 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        :root {
            --primary: #ff4757;
            --primary-dark: #ff3838;
            --secondary: #3742fa;
            --accent: #ff9f43;
            --light: #f8f9fa;
            --dark: #2d3436;
            --success: #2ed573;
            --warning: #ffa502;
            --danger: #ff4757;
            --gray: #a4b0be;
            --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.15);
            --radius: 16px;
            --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            
            /* 响应式变量 */
            --container-max-width: 800px;
            --container-padding: clamp(20px, 5vw, 40px);
            --title-font-size: clamp(2rem, 5vw, 3.5rem);
            --subtitle-font-size: clamp(0.9rem, 2vw, 1.2rem);
            --content-font-size: clamp(14px, 1.1vw, 18px);
            --button-font-size: clamp(1rem, 1.2vw, 1.1rem);
            --input-font-size: clamp(1rem, 1.1vw, 1.1rem);
            --input-padding: clamp(14px, 2vw, 18px);
            --gap-size: clamp(15px, 2vw, 20px);
        }
        
        body {
            font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: clamp(10px, 2vw, 20px);
            position: relative;
            overflow-x: hidden;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            will-change: auto;
        }
        
        /* 固定侧边按钮 */
        .daily-button {
            position: fixed;
            right: clamp(15px, 2vw, 25px);
            bottom: clamp(20px, 3vw, 30px);
            width: clamp(50px, 8vw, 65px);
            height: clamp(50px, 8vw, 65px);
            background: linear-gradient(135deg, var(--primary), var(--accent));
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: clamp(1.5rem, 3vw, 2rem);
            cursor: pointer;
            box-shadow: 0 6px 20px rgba(255, 71, 87, 0.4);
            z-index: 999;
            transition: var(--transition);
            border: 3px solid white;
            user-select: none;
        }
        
        .daily-button:hover {
            transform: scale(1.15) rotate(15deg);
            box-shadow: 0 10px 30px rgba(255, 71, 87, 0.6);
        }
        
        .daily-button:active {
            transform: scale(0.95) rotate(-15deg);
        }
        
        /* 一言弹窗容器 - 修复点：空容器不拦截点击 */
        .popup-container {
            position: fixed;
            top: clamp(20px, 3vw, 30px);
            right: clamp(20px, 3vw, 30px);
            bottom: clamp(85px, 12vw, 100px);
            z-index: 9998;
            display: flex;
            flex-direction: column;
            gap: clamp(10px, 1.5vw, 15px);
            overflow-y: auto;
            padding-right: 5px;
            width: clamp(280px, 35vw, 350px);
            max-width: 95vw;
            pointer-events: none; /* 新增：空容器不拦截点击 */
        }
        
        /* 滚动条美化 */
        .popup-container::-webkit-scrollbar {
            width: 6px;
        }
        
        .popup-container::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 3px;
        }
        
        .popup-container::-webkit-scrollbar-thumb {
            background: rgba(255, 71, 87, 0.3);
            border-radius: 3px;
        }
        
        .popup-container::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 71, 87, 0.5);
        }
        
        /* 单个弹窗样式 - 修复点：弹窗本身可点击 */
        .daily-popup {
            width: 100%;
            background: rgba(255, 255, 255, 0.98);
            backdrop-filter: blur(20px);
            border-radius: var(--radius);
            padding: clamp(15px, 2vw, 20px);
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
            border: 3px solid var(--primary);
            opacity: 0;
            transform: translateX(50px);
            animation: popupSlideIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
            position: relative;
            will-change: transform, opacity;
            pointer-events: auto; /* 新增：弹窗本身可点击 */
        }
        
        @keyframes popupSlideIn {
            0% {
                opacity: 0;
                transform: translateX(50px);
            }
            100% {
                opacity: 1;
                transform: translateX(0);
            }
        }
        
        .daily-popup.closing {
            animation: popupSlideOut 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
        }
        
        @keyframes popupSlideOut {
            0% {
                opacity: 1;
                transform: translateX(0);
            }
            100% {
                opacity: 0;
                transform: translateX(50px);
            }
        }
        
        .popup-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: clamp(10px, 1.5vw, 15px);
            padding-bottom: clamp(8px, 1vw, 12px);
            border-bottom: 2px solid rgba(255, 71, 87, 0.2);
        }
        
        .popup-title {
            font-size: clamp(1.1rem, 1.5vw, 1.3rem);
            font-weight: 700;
            color: var(--primary);
            display: flex;
            align-items: center;
            gap: clamp(6px, 1vw, 10px);
        }
        
        .popup-close {
            background: none;
            border: none;
            font-size: clamp(1.4rem, 1.8vw, 1.6rem);
            color: var(--gray);
            cursor: pointer;
            transition: var(--transition);
            width: clamp(28px, 3vw, 32px);
            height: clamp(28px, 3vw, 32px);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            will-change: transform;
            flex-shrink: 0;
        }
        
        .popup-close:hover {
            background: rgba(255, 71, 87, 0.15);
            color: var(--primary);
            transform: scale(1.2) rotate(90deg);
        }
        
        .popup-content {
            font-size: clamp(1rem, 1.3vw, 1.15rem);
            line-height: 1.6;
            color: var(--dark);
            text-align: center;
            padding: clamp(12px, 1.5vw, 15px) clamp(10px, 1.2vw, 12px);
            margin-bottom: clamp(12px, 1.5vw, 15px);
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.9));
            border-radius: 10px;
            border: 2px solid rgba(255, 71, 87, 0.15);
            min-height: clamp(45px, 6vw, 50px);
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
            font-weight: 500;
            word-break: break-word;
        }
        
        .popup-timer-container {
            background: rgba(255, 255, 255, 0.3);
            border-radius: 8px;
            padding: clamp(6px, 1vw, 8px);
            margin-top: clamp(8px, 1vw, 10px);
        }
        
        .popup-timer {
            width: 100%;
            height: clamp(6px, 0.8vw, 8px);
            background: rgba(255, 255, 255, 0.5);
            border-radius: 4px;
            overflow: hidden;
            position: relative;
            margin-bottom: clamp(6px, 0.8vw, 8px);
        }
        
        .timer-bar {
            height: 100%;
            width: 100%;
            background: linear-gradient(90deg, var(--primary), var(--accent));
            border-radius: 4px;
            will-change: width;
            box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3);
            transition: width 0.1s linear;
        }
        
        .timer-text {
            text-align: center;
            font-size: clamp(0.85rem, 1vw, 0.95rem);
            color: var(--primary);
            font-weight: 600;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: clamp(4px, 0.8vw, 6px);
        }
        
        .time-number {
            font-size: clamp(1rem, 1.2vw, 1.1rem);
            font-weight: 700;
            color: var(--primary-dark);
            min-width: clamp(18px, 2vw, 20px);
            text-align: center;
        }
        
        /* 主容器优化 */
        .container {
            background: rgba(255, 255, 255, 0.92);
            backdrop-filter: blur(15px);
            border-radius: var(--radius);
            padding: var(--container-padding);
            width: 100%;
            max-width: var(--container-max-width);
            box-shadow: var(--shadow);
            position: relative;
            overflow: hidden;
            opacity: 0;
            transform: translateY(20px);
            will-change: transform, opacity;
            border: 1px solid rgba(255, 255, 255, 0.15);
        }
        
        .container.loaded {
            animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
        }
        
        @keyframes slideUp {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .decoration {
            position: absolute;
            top: 0;
            right: 0;
            width: clamp(120px, 20vw, 200px);
            height: clamp(120px, 20vw, 200px);
            background: linear-gradient(45deg, var(--primary), var(--accent));
            border-radius: 0 0 0 100%;
            opacity: 0.08;
            pointer-events: none;
        }
        
        .header {
            text-align: center;
            margin-bottom: clamp(25px, 4vw, 45px);
            position: relative;
        }
        
        .title {
            font-size: var(--title-font-size);
            font-weight: 800;
            background: linear-gradient(45deg, var(--primary), var(--accent));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: clamp(8px, 1vw, 12px);
            position: relative;
            display: inline-block;
            will-change: transform;
        }
        
        .title::after {
            content: '';
            position: absolute;
            bottom: clamp(-8px, -1vw, -10px);
            left: 50%;
            transform: translateX(-50%);
            width: clamp(60px, 8vw, 90px);
            height: clamp(3px, 0.4vw, 5px);
            background: linear-gradient(45deg, var(--primary), var(--accent));
            border-radius: 2px;
            will-change: width;
            pointer-events: none;
        }
        
        .subtitle {
            color: var(--dark);
            font-size: var(--subtitle-font-size);
            opacity: 0.8;
            margin-top: clamp(15px, 2vw, 22px);
            line-height: 1.5;
        }
        
        .input-section {
            margin-bottom: clamp(30px, 4vw, 45px);
        }
        
        .input-label {
            display: block;
            font-size: clamp(1rem, 1.3vw, 1.2rem);
            font-weight: 600;
            color: var(--dark);
            margin-bottom: clamp(12px, 1.5vw, 18px);
            display: flex;
            align-items: center;
            gap: clamp(8px, 1vw, 10px);
        }
        
        .input-label i {
            color: var(--primary);
            font-size: clamp(1.1rem, 1.4vw, 1.3rem);
        }
        
        .input-wrapper {
            position: relative;
            margin-bottom: clamp(15px, 2vw, 20px);
        }
        
        .input-field {
            width: 100%;
            padding: var(--input-padding) clamp(16px, 2vw, 22px);
            font-size: var(--input-font-size);
            border: 2px solid #e0e0e0;
            border-radius: clamp(10px, 1.2vw, 12px);
            background: var(--light);
            transition: var(--transition);
            outline: none;
            color: var(--dark);
            will-change: transform, border-color;
        }
        
        .input-field:focus {
            border-color: var(--primary);
            background: white;
            box-shadow: 0 0 0 4px rgba(255, 71, 87, 0.1);
            transform: translateY(-2px);
        }
        
        .input-field::placeholder {
            color: var(--gray);
            font-size: clamp(0.9rem, 1vw, 1rem);
        }
        
        .input-hint {
            display: flex;
            align-items: center;
            gap: clamp(6px, 1vw, 10px);
            color: var(--gray);
            font-size: clamp(0.8rem, 1vw, 0.9rem);
            margin-top: clamp(6px, 0.8vw, 8px);
            padding-left: 5px;
        }
        
        .button-group {
            display: flex;
            gap: var(--gap-size);
            margin-bottom: clamp(25px, 3vw, 35px);
            flex-wrap: wrap;
        }
        
        .btn {
            flex: 1;
            min-width: clamp(140px, 15vw, 180px);
            padding: clamp(15px, 2vw, 18px);
            font-size: var(--button-font-size);
            font-weight: 600;
            border: none;
            border-radius: clamp(10px, 1.2vw, 12px);
            cursor: pointer;
            transition: var(--transition);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: clamp(8px, 1vw, 10px);
            position: relative;
            overflow: hidden;
            will-change: transform;
        }
        
        .btn::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.2);
            transform: translate(-50%, -50%);
            transition: width 0.5s, height 0.5s;
            pointer-events: none;
        }
        
        .btn:hover::before {
            width: 300px;
            height: 300px;
        }
        
        .btn-primary {
            background: linear-gradient(45deg, var(--primary), var(--primary-dark));
            color: white;
        }
        
        .btn-primary:hover {
            transform: translateY(-3px) scale(1.02);
            box-shadow: var(--shadow-hover);
        }
        
        .btn-secondary {
            background: linear-gradient(45deg, var(--secondary), #4834d4);
            color: white;
        }
        
        .btn-secondary:hover {
            transform: translateY(-3px) scale(1.02);
            box-shadow: var(--shadow-hover);
        }

        .btn-danger {
            background: linear-gradient(45deg, #ff6b6b, #ee5a24);
            color: white;
        }

        .btn-danger:hover {
            transform: translateY(-3px) scale(1.02);
            box-shadow: var(--shadow-hover);
        }

        .range-row {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            margin-top: 12px;
            align-items: center;
            width: 100%;
        }

        .range-item {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.9rem;
            color: var(--gray);
        }

        .range-input {
            width: 88px;
            padding: 8px 10px;
            border: 1px solid rgba(0,0,0,0.08);
            border-radius: 8px;
            background: var(--card-bg, #fff);
            color: inherit;
        }

        .range-check {
            user-select: none;
        }

        .node-status {
            margin-top: 10px;
            font-size: 0.85rem;
            color: var(--gray);
            padding: 8px 10px;
            border-radius: 8px;
            background: rgba(108, 92, 231, 0.06);
        }

        .downgrade-btn {
            display: inline-block;
            margin-top: clamp(12px, 1.5vw, 15px);
            padding: clamp(12px, 1.5vw, 15px) clamp(20px, 2.5vw, 25px);
            background: linear-gradient(45deg, var(--warning), #ff9f43);
            color: white;
            text-decoration: none;
            border-radius: clamp(8px, 1vw, 10px);
            font-weight: 600;
            transition: var(--transition);
            box-shadow: 0 5px 15px rgba(255, 165, 2, 0.3);
            border: none;
            cursor: pointer;
            font-size: clamp(0.9rem, 1.1vw, 1rem);
            will-change: transform;
        }
        
        .downgrade-btn:hover {
            transform: translateY(-2px) scale(1.05);
            box-shadow: 0 8px 25px rgba(255, 165, 2, 0.4);
        }
        
        .loading-section {
            text-align: center;
            margin: clamp(30px, 4vw, 45px) 0;
            display: none;
        }
        
        .loading-spinner {
            width: clamp(50px, 8vw, 80px);
            height: clamp(50px, 8vw, 80px);
            margin: 0 auto clamp(15px, 2vw, 20px);
            position: relative;
        }
        
        .spinner-ring {
            position: absolute;
            width: 100%;
            height: 100%;
            border: clamp(4px, 0.8vw, 6px) solid transparent;
            border-radius: 50%;
            animation: spin 1.2s linear infinite;
            will-change: transform;
            pointer-events: none;
        }
        
        .spinner-ring:nth-child(1) {
            border-top-color: var(--primary);
            animation-delay: 0s;
        }
        
        .spinner-ring:nth-child(2) {
            border-right-color: var(--accent);
            animation-delay: 0.15s;
        }
        
        .spinner-ring:nth-child(3) {
            border-bottom-color: var(--secondary);
            animation-delay: 0.3s;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        .loading-text {
            font-size: clamp(1rem, 1.3vw, 1.2rem);
            color: var(--dark);
            font-weight: 500;
            margin-bottom: clamp(15px, 2vw, 20px);
        }
        
        .progress-container {
            width: 100%;
            height: clamp(8px, 1vw, 10px);
            background: var(--light);
            border-radius: 5px;
            overflow: hidden;
            margin: clamp(15px, 2vw, 20px) 0;
            display: none;
        }
        
        .progress-bar {
            height: 100%;
            background: linear-gradient(90deg, var(--primary), var(--accent));
            width: 0%;
            border-radius: 5px;
            transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
            will-change: width;
        }
        
        .progress-bar::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, 
                transparent, 
                rgba(255, 255, 255, 0.4), 
                transparent);
            animation: shimmer 1.5s infinite;
            pointer-events: none;
        }
        
        @keyframes shimmer {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }
        
        .result-section {
            margin: clamp(25px, 3vw, 35px) 0;
            display: none;
        }
        
        .result-section.show {
            animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
        }
        
        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateX(-15px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }
        
        .result-card {
            background: linear-gradient(135deg, var(--light), white);
            border-radius: clamp(10px, 1.2vw, 12px);
            padding: clamp(18px, 2.2vw, 24px);
            border-left: 5px solid var(--primary);
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
            will-change: transform;
        }
        
        .result-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
        }
        
        .result-title {
            font-size: clamp(1.1rem, 1.4vw, 1.3rem);
            font-weight: 600;
            color: var(--dark);
            margin-bottom: clamp(10px, 1.2vw, 14px);
            display: flex;
            align-items: center;
            gap: clamp(8px, 1vw, 10px);
        }
        
        .result-message {
            font-size: clamp(1rem, 1.2vw, 1.1rem);
            line-height: 1.6;
            color: var(--dark);
        }
        
        .result-success {
            border-left-color: var(--success);
        }
        
        .result-error {
            border-left-color: var(--danger);
        }
        
        .result-warning {
            border-left-color: var(--warning);
        }
        
        .download-link {
            display: inline-block;
            margin-top: clamp(12px, 1.5vw, 15px);
            padding: clamp(12px, 1.5vw, 15px) clamp(22px, 2.8vw, 30px);
            background: linear-gradient(45deg, var(--success), #1dd1a1);
            color: white;
            text-decoration: none;
            border-radius: clamp(8px, 1vw, 10px);
            font-weight: 600;
            transition: var(--transition);
            box-shadow: 0 5px 15px rgba(46, 213, 115, 0.3);
            will-change: transform;
        }
        
        .download-link:hover {
            transform: translateY(-2px) scale(1.05);
            box-shadow: 0 8px 25px rgba(46, 213, 115, 0.4);
        }
        
        .manual-download-hint {
            display: block;
            margin-top: clamp(10px, 1.2vw, 12px);
            font-size: clamp(0.85rem, 1vw, 0.95rem);
            color: var(--gray);
            font-style: italic;
        }

        .search-results {
            display: none;
            flex-direction: column;
            margin-top: clamp(16px, 2vw, 22px);
            max-height: min(62vh, 560px);
            overflow: hidden;
            border-radius: clamp(10px, 1.2vw, 12px);
            background: #fff;
            border: 1px solid rgba(255, 71, 87, 0.12);
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
        }

        .search-toolbar {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 8px 10px;
            padding: 10px 12px;
            border-bottom: 1px solid rgba(0, 0, 0, 0.08);
            background: #fff;
            flex-shrink: 0;
            z-index: 3;
            position: relative;
            box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
        }

        .search-toolbar-count {
            font-size: 0.85rem;
            color: var(--gray);
            margin-right: auto;
            white-space: nowrap;
        }

        .search-toolbar .btn {
            min-width: auto !important;
            padding: 8px 12px !important;
            font-size: 0.88rem !important;
        }

        .search-check-all {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 0.88rem;
            color: var(--dark);
            cursor: pointer;
            user-select: none;
            white-space: nowrap;
        }

        .search-list {
            flex: 1 1 auto;
            min-height: 0;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            background: #fff;
        }

        .search-item {
            display: grid;
            grid-template-columns: 28px minmax(0, 1fr) auto;
            gap: 10px;
            padding: 12px 12px;
            border-bottom: 1px solid rgba(0, 0, 0, 0.06);
            transition: background 0.15s ease;
            align-items: center;
            text-align: left;
            background: #fff;
        }

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

        .search-item:hover {
            background: rgba(255, 71, 87, 0.05);
        }

        .search-item.is-selected {
            background: rgba(55, 66, 250, 0.06);
        }

        .search-item-check {
            flex-shrink: 0;
            width: 18px;
            height: 18px;
            margin: 0 auto;
            cursor: pointer;
            accent-color: #ff4757;
        }

        .search-item-main {
            display: flex;
            gap: 12px;
            min-width: 0;
            width: 100%;
            cursor: pointer;
            align-items: flex-start;
            border: 0;
            background: transparent;
            padding: 0;
            text-align: left;
            font: inherit;
            color: inherit;
        }

        .search-item-main:focus-visible {
            outline: 2px solid rgba(55, 66, 250, 0.45);
            outline-offset: 2px;
            border-radius: 8px;
        }

        .search-item-actions {
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .search-item-dl {
            border: 1px solid rgba(255, 71, 87, 0.35);
            background: rgba(255, 71, 87, 0.08);
            color: var(--dark);
            border-radius: 8px;
            padding: 8px 12px;
            font-size: 0.82rem;
            cursor: pointer;
            font-family: inherit;
            white-space: nowrap;
            line-height: 1.2;
        }

        .search-item-dl:hover {
            background: rgba(255, 71, 87, 0.16);
        }

        .search-more-wrap {
            padding: 10px 12px 12px;
            border-top: 1px solid rgba(0, 0, 0, 0.06);
            background: #fafafa;
            flex-shrink: 0;
            text-align: center;
        }

        .search-more-btn {
            width: 100%;
            border: 1px dashed rgba(255, 71, 87, 0.35);
            background: #fff;
            border-radius: 10px;
            padding: 10px 12px;
            font-size: 0.92rem;
            cursor: pointer;
            font-family: inherit;
            color: var(--dark);
        }

        .search-more-btn:hover:not(:disabled) {
            background: rgba(255, 71, 87, 0.06);
        }

        .search-more-btn:disabled {
            opacity: 0.55;
            cursor: default;
        }

        /* 预览弹层 */
        .book-preview-mask {
            position: fixed;
            inset: 0;
            z-index: 1200;
            background: rgba(15, 23, 42, 0.55);
            display: flex;
            align-items: flex-end;
            justify-content: center;
            padding: 0;
            box-sizing: border-box;
        }

        @media (min-width: 560px) {
            .book-preview-mask {
                align-items: center;
                padding: 20px;
            }
        }

        .book-preview-mask[hidden] {
            display: none !important;
        }

        .book-preview {
            position: relative;
            width: 100%;
            max-width: 440px;
            max-height: min(90vh, 640px);
            overflow-x: hidden;
            overflow-y: auto;
            background: #fff;
            border-radius: 18px 18px 0 0;
            padding: 14px 16px 18px;
            box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.22);
            box-sizing: border-box;
            display: flex;
            flex-direction: column;
        }

        @media (min-width: 560px) {
            .book-preview {
                border-radius: 16px;
                box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
                padding: 20px 20px 18px;
            }
        }

        .book-preview-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            margin-bottom: 14px;
            flex-shrink: 0;
        }

        .book-preview-head-title {
            margin: 0;
            font-size: 0.85rem;
            color: var(--gray);
            font-weight: 500;
            line-height: 1.2;
        }

        .book-preview-close {
            flex-shrink: 0;
            width: 34px;
            height: 34px;
            border: 0;
            border-radius: 50%;
            background: rgba(0, 0, 0, 0.06);
            font-size: 1.3rem;
            line-height: 1;
            cursor: pointer;
            color: #444;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0;
        }

        .book-preview-close:hover {
            background: rgba(0, 0, 0, 0.1);
        }

        .book-preview-main {
            display: grid;
            grid-template-columns: 96px minmax(0, 1fr);
            gap: 12px 14px;
            align-items: start;
        }

        .book-preview-cover-wrap {
            grid-column: 1;
            grid-row: 1;
            width: 96px;
            height: 128px;
            border-radius: 10px;
            overflow: hidden;
            flex-shrink: 0;
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
            background: linear-gradient(145deg, #f1f2f6, #dfe4ea);
            position: relative;
        }

        .book-preview-cover,
        .book-preview-cover-ph {
            width: 100%;
            height: 100%;
            border-radius: 10px;
            object-fit: cover;
            background: linear-gradient(145deg, #f1f2f6, #dfe4ea);
        }

        /* display:flex 会覆盖 [hidden] 默认 display:none，必须强制隐藏 */
        .book-preview-cover[hidden],
        .book-preview-cover-ph[hidden] {
            display: none !important;
        }

        .book-preview-cover-ph {
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2rem;
        }

        .book-preview-info {
            grid-column: 2;
            grid-row: 1;
            min-width: 0;
            align-self: center;
        }

        .book-preview-title {
            margin: 0 0 8px;
            font-size: 1.12rem;
            font-weight: 700;
            line-height: 1.35;
            color: var(--dark);
            overflow-wrap: anywhere;
            word-break: break-word;
        }

        .book-preview-meta {
            margin: 0 0 6px;
            font-size: 0.88rem;
            color: var(--gray);
            line-height: 1.45;
            overflow-wrap: anywhere;
        }

        .book-preview-id {
            margin: 0;
            font-size: 0.75rem;
            color: #999;
            line-height: 1.4;
            font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
            overflow-wrap: anywhere;
            word-break: break-all;
        }

        .book-preview-desc {
            grid-column: 1 / -1;
            grid-row: 2;
            margin: 2px 0 0;
            padding: 12px 12px;
            font-size: 0.9rem;
            color: #555;
            line-height: 1.6;
            white-space: pre-wrap;
            overflow-wrap: anywhere;
            word-break: break-word;
            max-height: min(32vh, 220px);
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            background: #f8f9fb;
            border-radius: 10px;
            border: 1px solid rgba(0, 0, 0, 0.05);
        }

        .book-preview-actions {
            display: grid;
            grid-template-columns: 1.4fr 1fr;
            gap: 10px;
            margin-top: 16px;
        }

        .book-preview-actions .btn {
            min-width: 0 !important;
            width: 100%;
            margin: 0;
        }

        .search-item img,
        .search-cover {
            width: 52px;
            height: 70px;
            object-fit: cover;
            border-radius: 8px;
            background: linear-gradient(145deg, #f1f2f6, #dfe4ea);
            flex-shrink: 0;
            display: block;
        }

        .search-cover-ph,
        .search-cover-fail {
            width: 52px;
            height: 70px;
            border-radius: 8px;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(145deg, rgba(255, 71, 87, 0.12), rgba(55, 66, 250, 0.12));
            color: #999;
            font-size: 1.2rem;
            object-fit: none;
        }

        .search-cover-fail {
            content: '';
            font-size: 0.7rem;
            color: #aaa;
        }

        .search-item-body {
            flex: 1;
            min-width: 0;
        }

        .search-item-title {
            font-weight: 600;
            color: var(--dark);
            font-size: clamp(0.95rem, 1.2vw, 1.05rem);
            margin-bottom: 4px;
            line-height: 1.35;
            word-break: break-word;
            overflow-wrap: anywhere;
        }

        .search-item-meta {
            font-size: clamp(0.8rem, 1vw, 0.88rem);
            color: var(--gray);
            margin-bottom: 4px;
            line-height: 1.35;
        }

        .search-item-desc {
            font-size: clamp(0.78rem, 0.95vw, 0.85rem);
            color: #666;
            line-height: 1.45;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            word-break: break-word;
        }

        .search-empty {
            padding: 18px;
            text-align: center;
            color: var(--gray);
            font-size: 0.95rem;
        }

        @media (max-width: 767px) {
            .search-results {
                max-height: min(48vh, 360px);
            }

            .search-results {
                max-height: min(58vh, 460px);
            }

            .search-item {
                grid-template-columns: 24px minmax(0, 1fr) auto;
                padding: 10px;
                gap: 8px;
            }

            .search-item img,
            .search-cover,
            .search-cover-ph,
            .search-cover-fail {
                width: 46px;
                height: 62px;
            }

            .search-item-dl {
                padding: 7px 10px;
                font-size: 0.78rem;
            }

            .book-preview-main {
                grid-template-columns: 76px minmax(0, 1fr);
                gap: 10px 12px;
            }

            .book-preview-cover-wrap {
                width: 76px;
                height: 102px;
            }

            .book-preview-title {
                font-size: 1.02rem;
            }

            .book-preview-actions {
                grid-template-columns: 1fr 1fr;
            }
        }
        
        .info-section {
            margin-top: clamp(30px, 4vw, 45px);
            padding: clamp(18px, 2.2vw, 24px);
            background: linear-gradient(135deg, rgba(255, 71, 87, 0.05), rgba(55, 66, 250, 0.05));
            border-radius: clamp(10px, 1.2vw, 12px);
            border: 1px solid rgba(255, 71, 87, 0.1);
            will-change: transform;
        }
        
        .info-section:hover {
            transform: translateY(-2px);
        }
        
        .info-title {
            font-size: clamp(1.1rem, 1.3vw, 1.2rem);
            font-weight: 600;
            color: var(--dark);
            margin-bottom: clamp(12px, 1.5vw, 16px);
            display: flex;
            align-items: center;
            gap: clamp(8px, 1vw, 10px);
        }
        
        .info-list {
            list-style: none;
        }
        
        .info-list li {
            padding: clamp(8px, 1vw, 10px) 0;
            color: var(--dark);
            display: flex;
            align-items: center;
            gap: clamp(8px, 1vw, 10px);
            border-bottom: 1px solid rgba(0, 0, 0, 0.03);
        }
        
        .info-list li:last-child {
            border-bottom: none;
        }
        
        .info-list i {
            color: var(--primary);
            font-size: clamp(1rem, 1.2vw, 1.1rem);
            flex-shrink: 0;
        }
        
        /* 分隔线 */
        hr {
            margin: clamp(30px, 4vw, 45px) 0;
            border: none;
            border-top: 1px solid rgba(0, 0, 0, 0.1);
        }
        
        /* 页脚 */
        .site-footer {
            text-align: center;
            padding: clamp(16px, 2vw, 22px) 0 clamp(8px, 1vw, 12px);
            color: #666;
            font-size: clamp(12px, 1vw, 14px);
        }

        .footer-meta {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            align-items: center;
            gap: 6px 8px;
            margin-bottom: 12px;
            line-height: 1.5;
        }

        .footer-dot {
            opacity: 0.45;
        }

        .github-link {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 10px 16px;
            border-radius: 999px;
            text-decoration: none;
            color: #24292f;
            background: rgba(36, 41, 47, 0.06);
            border: 1px solid rgba(36, 41, 47, 0.12);
            font-weight: 600;
            font-size: clamp(0.9rem, 1.1vw, 1rem);
            transition: var(--transition);
        }

        .github-link:hover {
            color: #fff;
            background: #24292f;
            border-color: #24292f;
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(36, 41, 47, 0.2);
        }

        .github-icon {
            flex-shrink: 0;
            display: block;
        }

        .footer-note {
            margin-top: 12px;
            font-size: clamp(11px, 0.95vw, 12px);
            color: #888;
            line-height: 1.5;
        }
        
        /* ========== 设备特定优化 ========== */
        
        /* 手机设备（小于768px） */
        @media (max-width: 767px) {
            :root {
                --container-max-width: 95vw;
                --gap-size: 12px;
            }
            
            body {
                padding: 10px;
                align-items: flex-start;
                padding-top: 20px;
            }
            
            .button-group {
                flex-direction: column;
            }
            
            .btn {
                width: 100%;
            }
            
            .popup-container {
                right: 10px;
                top: 15px;
                bottom: 75px;
                width: calc(100% - 20px);
                max-width: 300px;
                pointer-events: none; /* 确保移动端也生效 */
            }
            
            .daily-popup {
                width: 100%;
                pointer-events: auto; /* 确保移动端也生效 */
            }
            
            .info-list li {
                flex-wrap: wrap;
                line-height: 1.4;
                align-items: flex-start;
            }

            .range-row {
                flex-direction: column;
                align-items: stretch;
            }

            .range-item {
                width: 100%;
                justify-content: space-between;
            }

            .range-input {
                width: 120px;
            }

            .footer-meta {
                flex-direction: column;
                gap: 4px;
            }

            .footer-dot {
                display: none;
            }

            .github-link {
                width: min(100%, 260px);
            }
            
            .title::after {
                width: 60px;
            }
        }
        
        /* 平板设备（768px - 1024px） */
        @media (min-width: 768px) and (max-width: 1024px) {
            :root {
                --container-max-width: 90vw;
                --title-font-size: clamp(2.2rem, 4vw, 2.8rem);
            }
            
            body {
                padding: 15px;
            }
            
            .popup-container {
                width: clamp(280px, 40vw, 320px);
                right: clamp(15px, 2vw, 20px);
                pointer-events: none; /* 确保平板端也生效 */
            }
            
            .daily-popup {
                pointer-events: auto; /* 确保平板端也生效 */
            }
            
            .button-group {
                flex-wrap: nowrap;
            }
            
            .btn {
                min-width: auto;
            }
            
            .title::after {
                width: 70px;
            }
            
            .subtitle {
                padding: 0 10px;
            }
        }
        
        /* 电脑设备（大于1024px） */
        @media (min-width: 1025px) {
            :root {
                --container-max-width: min(900px, 85vw);
                --title-font-size: clamp(2.5rem, 4vw, 3.5rem);
            }
            
            .container {
                max-width: var(--container-max-width);
            }
            
            .button-group {
                justify-content: center;
            }
            
            .btn {
                flex: 0 1 auto;
                min-width: 200px;
            }
            
            .title::after {
                width: 80px;
            }
            
            .header::before {
                content: '📚';
                position: absolute;
                top: -10px;
                left: 10%;
                font-size: 2.5rem;
                opacity: 0.1;
                transform: rotate(-15deg);
                pointer-events: none;
            }
            
            .header::after {
                content: '🔥';
                position: absolute;
                bottom: -10px;
                right: 10%;
                font-size: 2.5rem;
                opacity: 0.1;
                transform: rotate(15deg);
                pointer-events: none;
            }
            
            .input-section::before {
                content: '';
                position: absolute;
                left: -20px;
                top: 50%;
                transform: translateY(-50%);
                width: 4px;
                height: 80%;
                background: linear-gradient(to bottom, var(--primary), var(--accent));
                border-radius: 2px;
                opacity: 0.3;
                pointer-events: none;
            }
        }
        
        /* 超大屏幕设备（大于1440px） */
        @media (min-width: 1440px) {
            :root {
                --container-max-width: 1000px;
                --container-padding: 45px;
                --title-font-size: 3.2rem;
            }
            
            body {
                padding: 30px;
            }
            
            .info-section {
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 30px;
            }
            
            .info-title {
                grid-column: 1 / -1;
            }
            
            .info-list {
                display: contents;
            }
            
            .info-list li:nth-child(odd) {
                grid-column: 1;
            }
            
            .info-list li:nth-child(even) {
                grid-column: 2;
            }
            
            .info-list li {
                border-bottom: none;
                padding: 12px 0;
            }
        }
        
        /* 横屏模式优化 */
        @media (orientation: landscape) and (max-height: 600px) {
            body {
                padding: 10px;
                align-items: flex-start;
            }
            
            .container {
                margin-top: 20px;
                margin-bottom: 20px;
            }
            
            .popup-container {
                bottom: 80px;
                max-height: 70vh;
                pointer-events: none; /* 确保横屏模式也生效 */
            }
            
            .daily-popup {
                pointer-events: auto; /* 确保横屏模式也生效 */
            }
            
            .button-group {
                flex-direction: row;
                flex-wrap: wrap;
            }
            
            .btn {
                flex: 1;
                min-width: 120px;
            }
        }
        
        /* 暗色模式支持 */
        @media (prefers-color-scheme: dark) {
            :root {
                --light: #2d3436;
                --dark: #f8f9fa;
                --gray: #a4b0be;
            }
            
            .container {
                background: rgba(45, 52, 54, 0.92);
                border: 1px solid rgba(255, 255, 255, 0.1);
            }
            
            .daily-popup {
                background: rgba(45, 52, 54, 0.98);
                color: var(--dark);
            }
            
            .popup-content {
                background: linear-gradient(135deg, rgba(45, 52, 54, 0.7), rgba(45, 52, 54, 0.9));
            }
            
            .input-field {
                background: rgba(255, 255, 255, 0.1);
                color: var(--dark);
                border-color: rgba(255, 255, 255, 0.2);
            }
            
            .input-field:focus {
                background: rgba(255, 255, 255, 0.15);
            }
            
            .info-section {
                background: linear-gradient(135deg, rgba(255, 71, 87, 0.1), rgba(55, 66, 250, 0.1));
            }
        }
