/* ========== 全局重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fb;
    color: #0f172a;
    line-height: 1.5;
    min-height: 100vh;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

/* ========== 顶部白色区域 ========== */
.top-white-section {
    background: white;
    border-radius: 0 0 2rem 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    padding: 1.2rem 1.5rem 1.5rem;
    margin-bottom: 1rem;
}

.header-stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 12px rgba(102,126,234,0.2);
}

.logo-icon i {
    font-size: 24px;
    color: white;
}

.site-name {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1e293b, #334155);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.3px;
}

.stats-inline {
    display: flex;
    gap: 0.8rem;
    background: #f8fafc;
    padding: 0.4rem 0.9rem;
    border-radius: 60px;
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #475569;
}

.stat-badge i {
    font-size: 0.85rem;
}

.stat-badge strong {
    font-size: 0.9rem;
    font-weight: 800;
    color: #0f172a;
    margin-left: 2px;
}

/* ========== 搜索区域 ========== */
.search-actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.search-wrapper {
    flex: 1;
    min-width: 200px;
    background: #f1f5f9;
    border-radius: 48px;
}

.search-box {
    display: flex;
    align-items: center;
    padding: 0.2rem 0.2rem 0.2rem 1.2rem;
    background: #f1f5f9;
    border-radius: 48px;
}

.search-box input {
    flex: 1;
    padding: 0.7rem 0.5rem;
    font-size: 0.9rem;
    border: none;
    background: transparent;
    outline: none;
    font-weight: 500;
}

.search-box input::placeholder {
    color: #94a3b8;
    font-size: 0.85rem;
}

.search-box button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 42px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.search-box button:hover {
    transform: scale(0.96);
}

.action-buttons {
    display: flex;
    gap: 0.6rem;
    flex-shrink: 0;
}

.group-button {
    background: #f1f5f9;
    border: none;
    padding: 0.55rem 1.2rem;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.8rem;
    color: #1e293b;
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.group-button:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

/* ========== 网盘筛选器 ========== */
.pan-filter-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
}

.pan-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.pan-radio {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.pan-radio input {
    display: none;
}

.pan-radio-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.4rem 1rem;
    background: #f1f5f9;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #475569;
    transition: all 0.2s;
    cursor: pointer;
}

.pan-radio input:checked + .pan-radio-button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.platform-icon {
    width: 18px;
    height: 18px;
    border-radius: 4px;
}

/* ========== 主内容区域 ========== */
.main-content {
    padding: 0 1rem;
}

/* ========== 搜索结果卡片 ========== */
.listBox {
    background: white;
    border-radius: 1.5rem;
    padding: 1.2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.Qbtn .btn {
    background: linear-gradient(135deg, #f8fafc, #ffffff);
    padding: 0.8rem 1rem;
    border-radius: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #eef2ff;
}

.Qbtn .btn p {
    font-size: 0.9rem;
    color: #475569;
}

.Qbtn .btn p span {
    font-weight: 700;
    color: #667eea;
}

.search-status {
    padding: 0.8rem 1rem;
    background: #fef3c7;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #b45309;
}

/* ========== 结果列表 ========== */
.list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.item {
    background: #fafcff;
    border: 1px solid #eef2ff;
    border-radius: 1rem;
    padding: 1rem;
    transition: all 0.2s;
}

.item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.title-section {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    flex: 1;
}

.pan-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #475569;
    white-space: nowrap;
}

.item-title-text {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.9rem;
    word-break: break-word;
}

.link-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    background: #f1f5f9;
}

.status-valid {
    background: #dcfce7;
    color: #15803d;
}

.status-invalid {
    background: #fee2e2;
    color: #b91c1c;
}

.status-checking {
    background: #fef9c3;
    color: #a16207;
}

.check-time {
    font-size: 0.65rem;
    color: #64748b;
}

.file-info {
    color: #ff5767;
    font-weight: 500;
}

.action-buttons {
    display: flex;
    gap: 0.8rem;
    flex-shrink: 0;
}

.btns2 {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btns2:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.4);
}

.btns2:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.file-tree-btn {
    background: #f1f5f9;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.file-tree-btn:hover {
    background: #e2e8f0;
}

/* ========== 文件树样式 ========== */
.file-tree-container {
    margin-top: 0.8rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.75rem;
}

.file-tree {
    list-style: none;
    padding-left: 1.2rem;
}

.file-tree li {
    margin: 0.3rem 0;
}

.file-tree .folder {
    cursor: pointer;
    color: #667eea;
    font-weight: 500;
}

.file-tree .file {
    color: #475569;
    font-size: 0.8rem;
}

.file-size {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-left: 6px;
}

/* ========== 分页 ========== */
.el-pagination {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.5rem 0;
}

.btn-prev, .btn-next {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-prev.disabled, .btn-next.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.el-pager {
    display: flex;
    gap: 0.3rem;
    list-style: none;
}

.el-pager .number {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    background: #f1f5f9;
    font-size: 0.8rem;
}

.el-pager .number.is-active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.pagination-info {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: #64748b;
    text-align: center;
}

.loading, .no-results {
    text-align: center;
    padding: 2rem;
    color: #94a3b8;
}

/* ========== 底部 ========== */
.footerBox {
    margin-top: 2rem;
    text-align: center;
    padding: 1.2rem 1rem;
    border-top: 1px solid rgba(0,0,0,0.05);
    font-size: 0.7rem;
    color: #64748b;
    background: white;
}

/* ========== 加群二维码弹窗 ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 1200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 2rem;
    max-width: 450px;
    width: 90%;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.3);
    animation: modalZoom 0.2s ease;
}

.modal-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid #f0f2f5;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.close {
    font-size: 28px;
    cursor: pointer;
    color: #94a3b8;
}

.modal-body {
    padding: 1.5rem;
}

.qrcode-image img {
    max-width: 200px;
    border-radius: 1rem;
}

/* ========== 网盘链接弹窗 ========== */
.pan-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    font-family: 'Inter', sans-serif;
}

.pan-modal-content {
    background: #fff;
    border-radius: 24px;
    width: 90%;
    max-width: 460px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.25s ease;
    overflow: hidden;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes modalZoom {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.pan-modal-header {
    padding: 18px 20px;
    border-bottom: 1px solid #eef2ff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.pan-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.pan-modal-header h3 i {
    color: #3b82f6;
    margin-right: 8px;
}

.pan-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.pan-close:hover {
    background: #f5f5f5;
    color: #333;
}

.pan-modal-body {
    padding: 24px;
}

/* 加载状态 */
.pan-loading {
    text-align: center;
    padding: 30px 20px;
}

.pan-loading i {
    font-size: 40px;
    color: #3b82f6;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.pan-loading p {
    margin: 12px 0 0;
    color: #666;
    font-size: 14px;
}

/* 提示条 */
.notice-bar {
    background: #fefce8;
    border-left: 3px solid #eab308;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.notice-bar p {
    margin: 0;
    font-size: 12px;
    color: #854d0e;
    line-height: 1.5;
}

/* 链接区域 */
.link-container {
    margin-bottom: 16px;
}

.link-container input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 13px;
    font-family: monospace;
    background: #f9fafb;
    box-sizing: border-box;
    transition: all 0.2s;
}

.link-container input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #fff;
}

/* 按钮组 */
.button-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.button-group button,
.button-group .direct-link {
    flex: 1;
    padding: 0;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 42px;
    line-height: 1;
    text-align: center;
    box-sizing: border-box;
}

.button-group button:hover,
.button-group .direct-link:hover {
    background: #2563eb;
    transform: translateY(-1px);
    gap: 8px;
    text-decoration: none;
}

/* 错误状态 */
.pan-error {
    text-align: center;
    padding: 30px 20px;
}

.pan-error i {
    font-size: 48px;
    color: #ef4444;
    margin-bottom: 12px;
}

.pan-error p {
    color: #666;
    font-size: 14px;
    margin: 0 0 20px;
}

.pan-error button {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.pan-error button:hover {
    background: #2563eb;
}

/* ========== 动态省略号动画 ========== */
.loading-text::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* ========== 手机端优化 ========== */
@media (max-width: 768px) {
    .top-white-section {
        padding: 1rem;
    }
    
    .header-stats-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }
    
    .site-name {
        font-size: 1.2rem;
    }
    
    .logo-icon {
        width: 36px;
        height: 36px;
    }
    
    .logo-icon i {
        font-size: 18px;
    }
    
    .search-actions-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.7rem;
    }
    
    .search-wrapper {
        width: 100%;
    }
    
    .action-buttons {
        justify-content: center;
        gap: 0.8rem;
    }
    
    .group-button {
        padding: 0.45rem 1rem;
        font-size: 0.75rem;
    }
    
    .pan-filter-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }
    
    .pan-filter-options {
        gap: 0.5rem;
    }
    
    .pan-radio-button {
        padding: 0.3rem 0.8rem;
        font-size: 0.7rem;
    }
    
    .item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
    
    .action-buttons {
        width: 100%;
        justify-content: flex-end;
    }
    
    .title-section {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .listBox {
        padding: 0.8rem;
    }
    
    .Qbtn .btn p {
        font-size: 0.8rem;
    }
    
    .pan-modal-content {
        width: 92%;
        max-width: 92%;
    }
    
    .button-group button,
    .button-group .direct-link {
        font-size: 12px;
        height: 38px;
    }
}
/* ========== 搜索加载动画 ========== */

/* 旋转加载器 */
.spinner-ring {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 动态省略号 */
.loading-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.loading-dots span {
    width: 6px;
    height: 6px;
    background: #667eea;
    border-radius: 50%;
    animation: dot-bounce 1.2s infinite ease-in-out;
}

.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-8px); opacity: 1; }
}

/* 骨架屏卡片 */
.skeleton-card {
    background: #f1f5f9;
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 0.8rem;
    position: relative;
    overflow: hidden;
}

.skeleton-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: skeleton-loading 1.2s infinite;
}

@keyframes skeleton-loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 骨架屏内部元素 */
.skeleton-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.skeleton-icon {
    width: 24px;
    height: 24px;
    background: #e2e8f0;
    border-radius: 50%;
}

.skeleton-title {
    width: 60%;
    height: 18px;
    background: #e2e8f0;
    border-radius: 8px;
}

.skeleton-line {
    width: 100%;
    height: 14px;
    background: #e2e8f0;
    border-radius: 6px;
    margin-bottom: 8px;
}

.skeleton-line-short {
    width: 40%;
    height: 14px;
    background: #e2e8f0;
    border-radius: 6px;
}

/* 加载容器样式 */
.loading-animation-container {
    text-align: center;
    padding: 2rem;
}

.loading-text-row {
    margin-top: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 0.9rem;
}

/* ========== 文件树加载动画 ========== */

/* 文件树加载容器 */
.file-tree-loading {
    text-align: center;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 0.75rem;
}

/* 文件树旋转加载器（小号） */
.file-tree-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 2px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* 文件树加载文字 */
.file-tree-loading-text {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 0.8rem;
}

/* 文件树动态省略号 */
.file-tree-dots {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.file-tree-dots span {
    width: 4px;
    height: 4px;
    background: #667eea;
    border-radius: 50%;
    animation: dot-bounce 1.2s infinite ease-in-out;
}

.file-tree-dots span:nth-child(1) { animation-delay: 0s; }
.file-tree-dots span:nth-child(2) { animation-delay: 0.2s; }
.file-tree-dots span:nth-child(3) { animation-delay: 0.4s; }

/* 文件树骨架屏 */
.file-tree-skeleton {
    padding: 0.5rem 0;
}

.file-tree-skeleton-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin-bottom: 8px;
    background: #f1f5f9;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.file-tree-skeleton-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    animation: skeleton-loading 1.2s infinite;
}

.file-tree-skeleton-icon {
    width: 16px;
    height: 16px;
    background: #e2e8f0;
    border-radius: 3px;
}

.file-tree-skeleton-line {
    width: 60%;
    height: 12px;
    background: #e2e8f0;
    border-radius: 4px;
}

.file-tree-skeleton-line-short {
    width: 30%;
    height: 12px;
    background: #e2e8f0;
    border-radius: 4px;
    margin-left: auto;
}

/* 文件树展开/收起过渡动画 */
.file-tree-container {
    transition: all 0.2s ease;
}

.file-tree .folder i {
    transition: transform 0.2s ease;
    width: 14px;
    display: inline-block;
}

.file-tree .folder:hover {
    opacity: 0.8;
}

/* 文件列表项淡入动画 */
.file-tree li {
    animation: fadeIn 0.2s ease backwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-5px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}