/* public/css/style.css - 完整版本 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;700&display=swap');
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Noto Sans SC', sans-serif; color: #333; background-color: #f4f7f6; line-height: 1.6; display: flex; justify-content: center; align-items: flex-start; min-height: 100vh; padding: 20px; }
.main-container { width: 100%; max-width: 900px; background-color: rgba(255, 255, 255, 0.95); border-radius: 12px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); padding: 30px 40px; border: 1px solid rgba(0, 0, 0, 0.05); }
header { text-align: center; margin-bottom: 30px; border-bottom: 1px solid #ddd; padding-bottom: 20px; }
header h1 { font-size: 2.5rem; color: #2c3e50; }
header p { font-size: 1rem; color: #7f8c8d; }
.search-container { display: flex; flex-direction: column; }
.search-container label { font-size: 1.1rem; margin-bottom: 10px; font-weight: bold; }
#query-input { width: 100%; padding: 15px; border-radius: 8px; border: 1px solid #ccc; font-size: 1rem; font-family: inherit; resize: vertical; margin-bottom: 20px; }
#search-btn { padding: 15px 20px; border: none; background-color: #3498db; color: white; font-size: 1.1rem; font-weight: bold; border-radius: 8px; cursor: pointer; transition: background-color 0.3s ease; }
#search-btn:hover { background-color: #2980b9; }
#search-btn:disabled { background-color: #bdc3c7; cursor: not-allowed; }
.info-box { background-color: #eaf2f8; border-left: 5px solid #3498db; padding: 15px 20px; margin-top: 30px; border-radius: 5px; font-size: 0.95rem; }
.info-box p { margin: 0; }
.results-container { margin-top: 20px; }
.result-card { background-color: #ffffff; border: 1px solid #eee; border-radius: 8px; padding: 25px; margin-bottom: 25px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05); }
.result-card h2 { font-size: 1.8rem; color: #2c3e50; margin-bottom: 15px; }
.result-card .book-title { font-size: 1.5rem; font-weight: bold; color: #3498db; margin-top: 10px; margin-bottom: 10px; }
.result-card p { margin-bottom: 15px; }
.availability-section { margin-top: 15px; padding: 10px; background-color: #f8f9fa; border-radius: 5px; margin-bottom: 15px; }
.status-tag { display: inline-block; padding: 3px 8px; border-radius: 12px; color: #fff; font-size: 0.8rem; font-weight: bold; text-transform: uppercase; }
.status-tag.status-high { background-color: #28a745; }
.status-tag.status-medium { background-color: #ffc107; color: #333; }
.status-tag.status-low { background-color: #dc3545; }
.availability-note { font-size: 0.9rem; color: #555; margin-top: 8px; margin-bottom: 0; }
.links-container { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 15px; align-items: flex-start; }
.fallbacks-section { font-size: 0.9rem; }
.fallback-link { display: inline-block; margin-right: 10px; margin-bottom: 5px; text-decoration: none; color: #007bff; padding: 4px 8px; background-color: #e9ecef; border-radius: 4px; transition: background-color 0.2s; }
.fallback-link:hover { background-color: #dee2e6; text-decoration: underline; }
.loading-spinner { border: 5px solid #f3f3f3; border-top: 5px solid #3498db; border-radius: 50%; width: 50px; height: 50px; animation: spin 1s linear infinite; margin: 40px auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
footer { text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid #ddd; color: #95a5a6; font-size: 0.9rem; }
.error-message { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; border-radius: 8px; padding: 20px; text-align: center; }
.settings-btn { position: fixed; top: 20px; right: 20px; width: 50px; height: 50px; background-color: #fff; border: 1px solid #ddd; border-radius: 50%; font-size: 24px; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,0.1); display: flex; justify-content: center; align-items: center; z-index: 1000; }
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); display: flex; justify-content: center; align-items: center; z-index: 2000; }
.modal-content { background-color: #fff; padding: 30px; border-radius: 10px; width: 90%; max-width: 500px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.modal-content h2, .modal-content h3 { margin-top: 0; margin-bottom: 15px; }
.modal-content p { font-size: 0.9rem; color: #666; margin-bottom: 20px; }
.api-key-input-group { display: flex; gap: 10px; margin-bottom: 20px; }
#api-key-input { flex-grow: 1; padding: 10px; border: 1px solid #ccc; border-radius: 5px; }
#add-key-btn { padding: 10px 15px; background-color: #3498db; color: white; border: none; border-radius: 5px; cursor: pointer; }
#add-key-btn:hover { background-color: #2980b9; }
.api-key-list ul { list-style: none; padding: 0; max-height: 150px; overflow-y: auto; border: 1px solid #eee; padding: 10px; border-radius: 5px; }
.api-key-list li { display: flex; justify-content: space-between; align-items: center; padding: 8px; background-color: #f9f9f9; border-radius: 3px; margin-bottom: 5px; font-family: 'Courier New', Courier, monospace; }
.delete-key-btn { background: none; border: none; color: #e74c3c; cursor: pointer; font-size: 1.2rem; }
.close-modal-btn { margin-top: 20px; padding: 10px 20px; width: 100%; background-color: #7f8c8d; color: white; border: none; border-radius: 5px; cursor: pointer; }
.links-wrapper { position: relative; display: inline-block; }
.toggle-btn { padding: 10px 18px; color: white; border: none; border-radius: 5px; font-weight: bold; cursor: pointer; transition: background-color 0.3s ease; }
.toggle-btn[data-target^="anna-archive"] { background-color: #3498db; }
.toggle-btn[data-target^="anna-archive"]:hover { background-color: #2980b9; }
.toggle-btn[data-target^="z-library"] { background-color: #f39c12; }
.toggle-btn[data-target^="z-library"]:hover { background-color: #e67e22; }
.mirror-links-dropdown { position: absolute; bottom: 100%; left: 0; margin-bottom: 5px; background-color: #fff; border: 1px solid #ddd; border-radius: 5px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: 10; padding: 5px; min-width: 220px; }
.mirror-link, .mirror-link-error { display: block; padding: 8px 12px; color: #333; text-decoration: none; border-radius: 3px; }
.mirror-link:hover { background-color: #f0f0f0; }
.mirror-link-error { color: #999; font-style: italic; }
.official-link { font-weight: bold; background-color: #ecf0f1; }
.official-link::after { content: ' (Official)'; font-size: 0.8em; color: #27ae60; margin-left: 4px; }

/* 新增：中文网站搜索按钮样式 */
.chinese-sites-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.search-link-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 15px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    color: white;
}

.search-link-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.xiaolipan-btn {
    background-color: #3498db;
}

.book5678-btn {
    background-color: #e74c3c;
}

.ppt35-btn {
    background-color: #9b59b6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body { padding: 10px; }
    .main-container { padding: 20px; }
    header h1 { font-size: 2rem; }
    .chinese-sites-container {
        flex-direction: column;
    }
    .search-link-btn {
        width: 100%;
        justify-content: center;
    }
}
