/* 前端搜索页样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航 */
.header { padding: 15px 0; }
.nav-top { display: flex; justify-content: flex-end; gap: 10px; align-items: center; }
.btn-submit, .nav-extra-btn {
    padding: 6px 16px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.2); color: #fff; cursor: pointer; font-size: 14px;
    text-decoration: none; transition: all 0.3s;
}
.btn-submit:hover, .nav-extra-btn:hover { background: rgba(255,255,255,0.4); }

/* 主区域 */
.main { text-align: center; padding: 60px 0 40px; }

.site-title {
    font-size: 48px; color: #fff; margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2); font-weight: 700;
}

.banner-texts { margin-bottom: 30px; }
.banner-text { color: rgba(255,255,255,0.85); font-size: 16px; margin: 5px 0; }

/* 搜索框 */
.search-box { max-width: 600px; margin: 0 auto; }
.search-input-wrap {
    display: flex; background: #fff; border-radius: 30px;
    overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.search-input-wrap input {
    flex: 1; padding: 16px 24px; border: none; outline: none;
    font-size: 16px; background: transparent;
}
.btn-search {
    padding: 16px 32px; background: #667eea; color: #fff; border: none;
    cursor: pointer; font-size: 16px; font-weight: 600; transition: background 0.3s;
}
.btn-search:hover { background: #5a6fd6; }

/* 网盘类型选择 */
.search-pan-types {
    display: flex; justify-content: center; gap: 10px;
    margin-top: 15px; flex-wrap: wrap;
}
.pan-type-btn {
    padding: 6px 16px; border-radius: 20px; cursor: pointer;
    background: rgba(255,255,255,0.2); color: #fff;
    font-size: 14px; transition: all 0.3s; border: 1px solid transparent;
}
.pan-type-btn input { display: none; }
.pan-type-btn.active { background: rgba(255,255,255,0.9); color: #667eea; font-weight: 600; }
.pan-type-btn:hover { background: rgba(255,255,255,0.4); }

/* 搜索结果 */
.results { margin-top: 30px; text-align: left; }
.result-item {
    background: #fff; border-radius: 12px; padding: 16px 20px;
    margin-bottom: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}
.result-item:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.12); }

.result-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.result-badge {
    padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; color: #fff;
    white-space: nowrap;
}
.result-badge.baidu { background: #2196F3; }
.result-badge.quark { background: #FF6B35; }
.result-badge.xunlei { background: #00BFA5; }
.result-badge.uc { background: #9C27B0; }
.result-badge.local { background: #4CAF50; }
.result-badge.cache { background: #FF9800; }

.result-title { font-size: 16px; font-weight: 600; color: #333; flex: 1; }
.result-links { display: flex; gap: 10px; flex-wrap: wrap; }
.result-link {
    padding: 6px 16px; border-radius: 8px; font-size: 14px; text-decoration: none;
    color: #fff; transition: opacity 0.3s;
}
.result-link:hover { opacity: 0.85; }
.result-link.pan-baidu { background: #2196F3; }
.result-link.pan-quark { background: #FF6B35; }
.result-link.pan-xunlei { background: #00BFA5; }
.result-link.pan-uc { background: #9C27B0; }

/* Loading */
.loading { text-align: center; padding: 40px; color: #fff; }
.spinner {
    width: 40px; height: 40px; margin: 0 auto 15px;
    border: 4px solid rgba(255,255,255,0.3); border-top-color: #fff;
    border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.no-result {
    text-align: center; padding: 40px; background: rgba(255,255,255,0.9);
    border-radius: 12px; color: #999; font-size: 16px;
}

/* 弹窗 */
.popup-modal, .anti-red-modal, .captcha-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); display: flex; align-items: center;
    justify-content: center; z-index: 1000;
}
.popup-content, .anti-red-content, .captcha-content {
    background: #fff; border-radius: 16px; padding: 30px; max-width: 500px;
    width: 90%; max-height: 80vh; overflow-y: auto; position: relative;
    text-align: center;
}
.popup-close {
    position: absolute; top: 10px; right: 15px; border: none; background: none;
    font-size: 24px; cursor: pointer; color: #999;
}
.popup-image { max-width: 100%; border-radius: 8px; margin-bottom: 15px; }
.btn-agree, .btn-copy {
    margin-top: 15px; padding: 10px 30px; border: none; border-radius: 8px;
    background: #667eea; color: #fff; cursor: pointer; font-size: 15px;
}
.anti-red-icon { font-size: 48px; color: #FF9800; font-weight: bold; margin-bottom: 10px; }
.anti-red-url {
    margin: 15px 0; padding: 10px; background: #f5f5f5; border-radius: 8px;
    word-break: break-all; font-family: monospace;
}

/* 验证码 */
.captcha-img-wrap { margin: 15px 0; position: relative; display: inline-block; }
.captcha-img-wrap img { border: 1px solid #ddd; border-radius: 4px; }
.captcha-refresh {
    position: absolute; right: -50px; top: 50%; transform: translateY(-50%);
    color: #667eea; cursor: pointer; font-size: 14px;
}
#captcha-input {
    padding: 10px; font-size: 18px; text-align: center; letter-spacing: 8px;
    border: 2px solid #ddd; border-radius: 8px; width: 150px;
}
.btn-captcha {
    display: block; margin: 15px auto 0; padding: 10px 40px;
    border: none; border-radius: 8px; background: #667eea; color: #fff;
    cursor: pointer; font-size: 15px;
}

/* Footer */
.footer { text-align: center; padding: 30px 0; color: rgba(255,255,255,0.6); font-size: 13px; }

/* 响应式 */
@media (max-width: 768px) {
    .site-title { font-size: 32px; }
    .main { padding: 30px 0 20px; }
    .search-input-wrap input { padding: 12px 16px; font-size: 14px; }
    .btn-search { padding: 12px 20px; font-size: 14px; }
    .search-pan-types { gap: 6px; }
    .pan-type-btn { padding: 4px 12px; font-size: 13px; }
    .result-title { font-size: 14px; }
}
@media (max-width: 480px) {
    .site-title { font-size: 26px; }
    .banner-text { font-size: 14px; }
    .result-links { flex-direction: column; }
}
