/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 颜色变量已在 unified-colors.css 中统一定义 */

body {
    font-family: 'Inter', 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
}

/* ==================== 容器 ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== 标题区域 ==================== */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    animation: slideDown 0.6s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    animation: slideDown 0.6s ease 0.1s both;
}

/* ==================== 桌面端/移动端显示控制 ==================== */
.desktop-only {
    display: flex !important;
}

.mobile-only {
    display: none !important;
}

/* 移动端媒体查询 */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }
}

/* ==================== 右上角按钮组 ==================== */
.top-buttons {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex !important;
    /* 确保显示 */
    gap: 12px;
    z-index: 1000;
    /* 防止乱跳 */
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.top-btn {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--gradient-primary);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 防止乱跳 */
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.top-btn:hover {
    transform: translateZ(0) scale(1.1);
    box-shadow: var(--shadow-xl);
}

.top-btn.theme-btn:hover {
    transform: translateZ(0) translateY(-3px) scale(1.1);
}

.top-btn.settings-btn:hover {
    transform: translateZ(0) rotate(90deg) scale(1.1);
}

.top-btn.history-btn:hover {
    transform: translateZ(0) translateY(-3px) scale(1.1);
}


/* ==================== 侧边栏面板（通用） ==================== */
.side-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    height: 100vh;
    background: var(--bg-secondary);
    box-shadow: var(--shadow-xl);
    transition: right var(--transition-normal), visibility 0s var(--transition-normal), opacity var(--transition-normal);
    z-index: 999;
    overflow-y: auto;
    border-left: 1px solid var(--border-color);
    visibility: hidden;
    /* 初始隐藏 */
    opacity: 0;
    /* 初始透明 */
}

.side-panel.active {
    right: 0;
    visibility: visible;
    /* 激活时可见 */
    opacity: 1;
    /* 激活时不透明 */
    transition: right var(--transition-normal), visibility 0s 0s, opacity var(--transition-normal);
}

.panel-content {
    padding: 80px 30px 30px;
}

.panel-content h3 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.setting-item {
    margin-bottom: 25px;
}

.setting-item label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
}

.setting-item input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.setting-item input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.setting-item small {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.panel-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

/* ==================== 历史记录面板内容 ==================== */
.history-panel .history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.history-panel .history-item {
    padding: 14px 18px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.95rem;
    word-break: break-all;
}

.history-panel .history-item:hover {
    background: var(--bg-primary);
    border-color: var(--primary-color);
    color: var(--primary-light);
    transform: translateX(-4px);
    box-shadow: var(--shadow-md);
}

.history-panel .history-item .history-time {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.history-panel .history-item .history-project {
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: 4px;
}

/* ==================== 模式选择 ==================== */
.mode-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.mode-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.mode-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: all var(--transition-normal);
}

.mode-btn:hover::before {
    left: 0;
    opacity: 0.1;
}

.mode-btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.mode-btn.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.mode-btn.active::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    color: white;
}

.mode-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.mode-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.mode-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
}

/* ==================== 输入区域 ==================== */
.input-section {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 10;
}

.input-mode {
    display: none;
    animation: fadeIn 0.3s ease;
}

.input-mode.active {
    display: block;
    position: relative;
}

.input-mode label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1rem;
}

.input-mode input[type="text"],
.input-mode textarea {
    width: 100%;
    padding: 12px 16px;
    /* 与搜索框一致 */
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-fast);
    margin-bottom: 16px;
}

.input-mode input[type="text"]:focus,
.input-mode textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.input-mode textarea {
    resize: vertical;
    min-height: 150px;
}

.hint {
    display: block;
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-style: italic;
}

/* 分隔线 */
.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    text-align: center;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider span {
    padding: 0 16px;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.manual-actions {
    display: flex;
    gap: 12px;
}

/* ==================== 按钮样式 ==================== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-loading .btn-text {
    display: none;
}

.btn-loading .btn-loading {
    display: inline;
}

.btn .btn-loading {
    display: none;
}

/* ==================== 历史记录 ==================== */
.history-section {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
}

.history-section h3 {
    font-size: 1.3rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.history-list {
    display: flex;
    flex-direction: column;
    /* 改为单列显示 */
    gap: 12px;
    max-height: 500px;
    /* 限制最大高度 */
    overflow-y: auto;
    /* 添加滚动条 */
    padding-right: 8px;
    /* 为滚动条留空间 */
}

/* 自定义滚动条样式 */
.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

.history-item {
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.9rem;
    flex-shrink: 0;
    /* 防止被压缩 */
}

.history-item:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--primary-light);
    transform: translateY(-2px);
}

/* ==================== 状态提示 ==================== */
.status-message {
    margin: 20px 0;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    display: none;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.status-message.info {
    display: block;
    background: var(--color-info-bg);
    border-left: 4px solid var(--color-info);
    color: var(--color-info-light);
}

.status-message.success {
    display: block;
    background: var(--color-success-bg);
    border-left: 4px solid var(--color-success);
    color: var(--color-success-light);
}

.status-message.error {
    display: block;
    background: var(--color-error-bg);
    border-left: 4px solid var(--color-error);
    color: var(--color-error-light);
}

.status-message.warning {
    display: block;
    background: var(--color-warning-bg);
    border-left: 4px solid var(--color-warning);
    color: var(--color-warning-light);
}

/* ==================== 结果区域 ==================== */
.results-section {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-md);
    animation: fadeIn 0.5s ease;
    position: relative;
    z-index: 1;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.results-header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.results-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ==================== 筛选区域 ==================== */
.filter-section {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.filter-group select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.filter-group input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

/* ==================== 链接容器 ==================== */
.links-container {
    display: grid;
    gap: 12px;
}

.link-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    animation: fadeIn 0.3s ease;
}

.link-item:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.link-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.link-icon svg {
    width: 100%;
    height: 100%;
}

.link-info {
    flex: 1;
    min-width: 0;
}

.link-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    word-break: break-all;
}

.link-url {
    font-size: 0.875rem;
    color: var(--text-muted);
    word-break: break-all;
}

.link-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.link-tag {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.link-tag.windows {
    background: rgba(0, 120, 212, 0.2);
    color: #60a5fa;
}

.link-tag.macos {
    background: rgba(128, 128, 128, 0.2);
    color: #d1d5db;
}

.link-tag.linux {
    background: rgba(255, 193, 7, 0.2);
    color: #fbbf24;
}

.link-tag.android {
    background: rgba(61, 220, 132, 0.2);
    color: #4ade80;
}

.link-tag.ios {
    background: rgba(0, 122, 255, 0.2);
    color: #60a5fa;
}

.link-tag.openwrt {
    background: rgba(0, 176, 240, 0.2);
    color: #38bdf8;
}

.link-tag.source {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

.link-tag.debian {
    background: rgba(215, 0, 64, 0.2);
    color: #f87171;
}

.link-actions {
    display: flex;
    gap: 8px;
}

.link-action-btn {
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.875rem;
}

.link-action-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* ==================== Toast 提示 ==================== */
.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 16px 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    color: var(--text-primary);
    font-weight: 500;
    z-index: 9999;
    transition: bottom var(--transition-normal);
    max-width: 90%;
}

.toast.show {
    bottom: 30px;
}

.toast.success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.9) 0%, rgba(22, 163, 74, 0.9) 100%);
    border-color: #22c55e;
}

.toast.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9) 0%, rgba(220, 38, 38, 0.9) 100%);
    border-color: #ef4444;
}

.toast.info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9) 0%, rgba(37, 99, 235, 0.9) 100%);
    border-color: #3b82f6;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .mode-selector {
        grid-template-columns: 1fr;
    }

    .settings-panel {
        width: 100%;
        right: -100%;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .results-actions {
        width: 100%;
    }

    .results-actions .btn {
        flex: 1;
    }

    .filter-section {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .link-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .link-actions {
        width: 100%;
    }

    .link-action-btn {
        flex: 1;
    }

    .manual-actions {
        flex-direction: column;
    }

    .manual-actions .btn {
        width: 100%;
    }
}

/* ==================== 滚动条样式 ==================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* ==================== 加载动画 ==================== */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading {
    display: inline-block;
    animation: spin 1s linear infinite;
}

/* ==================== 设备自动补全 ==================== */
.device-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    max-height: 400px;
    overflow-y: auto;
    z-index: 10000;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: all var(--transition-fast);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.highlighted {
    background: var(--bg-tertiary);
    border-left: 3px solid var(--primary-color);
    padding-left: 13px;
}

.suggestion-item .device-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.suggestion-item .device-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.suggestion-item:hover .device-name {
    color: var(--primary-light);
}

/* 自动补全滚动条样式 */
.device-suggestions::-webkit-scrollbar {
    width: 6px;
}

.device-suggestions::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.device-suggestions::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.device-suggestions::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* ==================== 链接预览弹窗 ==================== */
.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity var(--transition-normal);
    padding: 20px;
}

.preview-modal.show {
    opacity: 1;
}

.preview-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.preview-modal.show .preview-content {
    transform: scale(1);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.preview-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.preview-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.preview-close:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: rotate(90deg);
}

.preview-body {
    padding: 30px;
}

.preview-icon-large {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 16px;
}

.preview-icon-large svg {
    width: 100%;
    height: 100%;
}

.preview-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.preview-info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.preview-info-item.full-width {
    grid-column: 1 / -1;
}

.preview-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.preview-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    word-break: break-word;
}

.preview-url {
    font-size: 0.875rem;
    color: var(--primary-light);
    font-weight: 400;
    font-family: 'Courier New', monospace;
}

.preview-footer {
    display: flex;
    gap: 12px;
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    flex-wrap: wrap;
}

.preview-footer .btn {
    flex: 1;
    min-width: 120px;
}

/* 文件大小显示 */
.link-size {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* 预览按钮样式 */
.preview-btn {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    border-color: var(--primary-color);
}

.preview-btn:hover {
    background: var(--gradient-primary);
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .preview-content {
        max-width: 100%;
        margin: 10px;
    }

    .preview-info-grid {
        grid-template-columns: 1fr;
    }

    .preview-footer {
        flex-direction: column;
    }

    .preview-footer .btn {
        width: 100%;
    }
}

/* ==================== 批量下载功能 ==================== */
/* 复选框容器 */
.link-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}

.batch-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* 批量下载信息 */
.batch-download-info {
    text-align: center;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.batch-download-info p {
    margin: 8px 0;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.batch-download-info strong {
    color: var(--primary-light);
    font-size: 1.2rem;
}

/* 批量下载选项 */
.batch-download-options h4 {
    margin-bottom: 16px;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.batch-option-btn {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
}

.batch-option-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.batch-option-btn .option-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.batch-option-btn .option-title {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.batch-option-btn .option-desc {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* 批量下载按钮禁用状态 */
#batchDownloadBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#batchDownloadBtn:disabled:hover {
    transform: none;
}

/* 响应式 - 批量下载 */
@media (max-width: 768px) {
    .batch-option-btn {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .batch-option-btn .option-icon {
        font-size: 2.5rem;
    }
}

/* ==================== 统一搜索框和输入框布局 ==================== */
/* 确保 GitHub 快速搜索和 GitHub Release 链接的布局完全一致 */

/* 统一容器样式 */
.quick-search-section,
.input-section {
    background: var(--bg-card) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    padding: 30px !important;
    margin-bottom: 30px !important;
    box-shadow: var(--shadow-md) !important;
}

/* 统一 flex 容器 */
.quick-search-section .search-box,
.input-with-button {
    display: flex !important;
    gap: 12px !important;
    align-items: center !important;
}

/* 统一输入框样式 */
.quick-search-section .search-box input,
.input-with-button input {
    flex: 1 !important;
    min-width: 0 !important;
    padding: 12px 16px !important;
    border: 2px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    font-size: 1rem !important;
    margin-bottom: 0 !important;
    height: auto !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
}

/* 统一按钮样式 */
.quick-search-section .search-box button,
.input-with-button button,
.input-with-button .btn {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    padding: 12px 24px !important;
    font-size: 1rem !important;
    height: auto !important;
    line-height: 1.5 !important;
    align-self: stretch !important;
    min-height: 46px !important;
    box-sizing: border-box !important;
}

/* PC端响应式（确保桌面端一致） */
@media (min-width: 769px) {

    .quick-search-section .search-box,
    .input-with-button {
        flex-direction: row !important;
    }

    .quick-search-section .search-box input,
    .input-with-button input {
        width: auto !important;
    }
}