/* 全局样式 */
body {
    font-family: "PingFang SC", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
    overflow-x: hidden;
    color: #202124;
}

/* 头部样式 */
.header {
    display: flex;
    width: 100%;
    padding: 12px 24px;
    background: #fff;
    border-bottom: 1px solid #e8eaed;
    position: sticky;
    top: 0;
    z-index: 100;
    box-sizing: border-box;
}

.header-content {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding-left: 0;
}

.logo-section {
    display: flex;
    align-items: center;
    margin-right: 24px;
    flex-shrink: 0;
    padding-left: 24px;
}

.logo-section a {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 0;
}

.logo-image {
    height: 32px;
    width: auto;
    object-fit: contain;
}

/* 搜索框样式 */
.search-container {
    flex: 1;
    max-width: 50%;
    position: relative;
}

.search-form {
    display: flex;
    width: 100%;
}

/* 收藏提示样式 */
.bookmark-tip {
    position: absolute;
    top: 0;
    right: -420px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 30px;
    padding: 8px 12px;
    font-size: 13px;
    color: #856404;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 10;
    max-width: 380px;
    animation: slideIn 0.3s ease-out;
    white-space: nowrap;
}

.bookmark-text {
    flex: 1;
    line-height: 1.4;
}

.bookmark-close {
    background: none;
    border: none;
    color: #856404;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
    flex-shrink: 0;
    min-width: 20px;
    min-height: 20px;
    position: relative;
    z-index: 1;
}

.bookmark-close:hover {
    background-color: rgba(133, 100, 4, 0.1);
}

/* 临时调试样式 - 让关闭按钮更明显 */
.bookmark-close {
    background-color: rgba(133, 100, 4, 0.05) !important;
    border: 1px solid rgba(133, 100, 4, 0.2) !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    user-select: none;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-input-container {
    display: flex;
    width: 100%;
    height: 40px;
    border: 1px solid #1a73e8;
    border-radius: 30px;
    overflow: hidden;
}

.search-input {
    flex: 1;
    height: 100%;
    border: none;
    outline: none;
    font-size: 15px;
    padding: 0 16px;
    background: transparent;
}

.search-button {
    background: none;
    border: none;
    padding: 0 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-button svg {
    width: 20px;
    height: 20px;
    fill: #4285f4;
}

/* 内容包装器 */
.content-wrapper {
    display: flex;
    padding: 5px 0;
    max-width: none;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    gap: 16px;
    align-items: flex-start;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: calc(100% - 180px - 16px);
    box-sizing: border-box;
}

.search-stats {
    color: #70757a;
    font-size: 14px;
    margin-bottom: 0px;
    padding: 0 0 0 250px;
    line-height: 2.8;
    width: 100%;
    display: block;
    clear: both;
    margin-left: 10px;
    box-sizing: border-box;
}

.search-results {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
}

/* 搜索结果卡片 */
.card {
    background: #fff;
    border: none;
    border-radius: 6px;
    box-shadow: none;
    margin: 0 0 10px 0;
    padding: 8px;
    position: relative;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.card:hover {
    box-shadow: 0 2px 3px #f0f0f0;
}

.card-body {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    padding: 0;
    width: 90%;
    margin: 10px;
    box-sizing: border-box;
}

.card-main-content {
    flex: 1;
    min-width: 0;
    padding-right: 12px;
    max-width: calc(100% - 100px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.card-title {
    margin: 0 0 8px 0;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.4;
}

.card-title a {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
}

.card-title a:hover {
    text-decoration: underline;
}

.card-meta {
    color: #5f6368;
    font-size: 13px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.card-text {
    color: #3c4043;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 5px;
    align-items: center;
}

.card-actions a,
.card-actions button {
    color: #1a73e8;
    font-size: 13px;
    background: none;
    border: none;
    padding: 6px 12px;
    margin-right: 8px;
    cursor: pointer;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.card-actions a:hover,
.card-actions button:hover {
    background-color: #f1f3f4;
    text-decoration: none;
}

.card-side-links {
    min-width: 90px;
    max-width: 180px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-top: 0;
    overflow: hidden;
    justify-content: flex-start;
}

.side-link {
    display: flex;
    align-items: center;
    color: #1a73e8;
    font-size: 13px;
    text-decoration: none;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    justify-content: flex-start;
}

.side-link:hover {
    background-color: #f1f3f4;
    text-decoration: none;
}

.side-link i {
    font-size: 14px;
    color: #1a73e8;
    flex-shrink: 0;
    margin-right: 4px;
}

.scihub-link i {
    color: #e53935;
}

.scihub-link-2 i {
    color: #ff6f00;
}

/* 引用按钮 */
.cite-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #1a73e8;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cite-button:hover {
    text-decoration: underline;
}

/* 筛选侧边栏 */
.filter-sidebar {
    width: 180px;
    flex-shrink: 0;
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(60,64,67,0.1);
    position: sticky;
    top: 0;
    height: auto;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-left: 24px;
    align-self: flex-start;
}

.filter-group, .filter-title, .filter-option {
    width: 100%;
    text-align: center;
    justify-content: center;
    align-items: center;
    display: flex;
    flex-direction: column;
}

.filter-title {
    color: #202124;
    font-size: 15px;
    font-weight: 500;
    margin: 12px 0 12px 0;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    color: #5f6368;
    font-size: 14px;
}

.filter-option:hover {
    background-color: #f1f3f4;
}

.filter-option.active {
    background-color: #e8f0fe;
    color: #1a73e8;
    font-weight: 500;
}

/* 分页样式 */
.pagination {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 32px 0 0 0;
    padding: 0;
    overflow: visible;
}

/* ====== Google Scholar 风格优化 ====== */
.google-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    margin: 0 auto;
    white-space: nowrap;
    max-width: 100%;
    overflow-x: auto;
}

.google-pagination .page-numbers {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.google-pagination .page-numbers::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}

.google-pagination .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    color: #5f6368;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    background: none;
    min-width: 32px;
    height: 32px;
    margin: 0 2px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.google-pagination .current {
    background-color: #1a73e8;
    color: #fff;
    font-weight: 500;
    border-radius: 6px;
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 2px;
    flex-shrink: 0;
}

.google-pagination .disabled {
    color: #dadce0;
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
}

/* 页脚样式 */
.footer {
    width: 100%;
    padding: 20px 0 10px 0;
    background: none;
    border: none;
    margin-top: 40px;
    text-align: center;
}

.footer p {
    color: #70757a;
    font-size: 13px;
    margin: 0;
    padding: 0;
}

/* 移动端筛选栏开关 */
.filter-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #1a73e8;
    color: white;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
}

.filter-toggle:hover {
    background: #1557b0;
}

.filter-toggle i {
    font-size: 18px;
}

.mobile-filter-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
}

/* 搜索结果页头部 */
.results-page .header {
    background: #fff;
    border-bottom: 1px solid #ebebeb;
    padding: 8px 0;
    height: 48px;
    display: flex;
    align-items: center;
}

.results-page .logo-section {
    margin: 0;
    padding-left: 16px;
    display: flex;
    align-items: center;
}

.results-page .logo-image {
    height: 24px;
    margin: 0;
}

/* 搜索框容器 */
.results-page .search-container {
    flex: 1;
    max-width: 692px;
    margin-left: 40px;
}

.results-page .search-form {
    display: flex;
    flex-direction: column;
}

.results-page .search-input-container {
    display: flex;
    width: 100%;
    height: 40px;
    border: 1px solid #dfe1e5;
    border-radius: 24px;
    padding: 0;
    position: relative;
    background: #fff;
}

.results-page .search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 0 20px;
    background: transparent;
}

.results-page .search-button {
    background: none;
    border: none;
    padding: 0 20px;
    cursor: pointer;
}

.results-page .search-button svg {
    width: 20px;
    height: 20px;
    fill: #4285f4;
}

.error-message {
    max-width: 800px;
    margin: 20px auto;
    padding: 15px;
    background-color: #fce8e6;
    border: 1px solid #fad2cf;
    border-radius: 8px;
    color: #c5221f;
    font-size: 14px;
    text-align: center;
}

.no-results {
    max-width: 800px;
    margin: 40px auto;
    text-align: center;
    color: #5f6368;
    font-size: 16px;
}

/* 自定义年份输入 */
.year-input-wrapper {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.year-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.year-input-group input {
    width: 60px;
    padding: 5px;
    border: 1px solid #dfe1e5;
    border-radius: 4px;
    font-size: 13px;
}

.year-input-wrapper button {
    margin-top: 4px;
    padding: 5px 10px;
    background-color: #f8f9fa;
    border: 1px solid #dfe1e5;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.year-input-wrapper button:hover {
    background-color: #f1f3f4;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .header {
        padding: 8px 16px;
    }
    
    .logo-section {
        margin-right: 16px;
        padding-left: 16px;
    }
    
    .logo-image {
        height: 28px;
    }
    
    .search-input-container {
        height: 36px;
    }

    .content-wrapper {
        padding: 12px 0;
        gap: 12px;
    }

    .card {
        padding: 6px;
        border-radius: 4px;
        width: 100%;
    }
    
    .card-body {
        flex-direction: column;
        width: 100%;
        margin: 5px;
        gap: 8px;
    }
    
    .card-main-content {
        max-width: 100%;
        width: 100%;
        padding-right: 0;
    }
    
    .card-side-links {
        min-width: 100%;
        max-width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        margin-top: 8px;
    }
    
    .side-link {
        width: auto;
        margin-right: 8px;
    }
    
    .filter-toggle {
        display: flex;
    }
    
    .filter-sidebar {
        position: fixed;
        left: -250px;
        top: 0;
        bottom: 0;
        width: 240px;
        background: white;
        z-index: 1000;
        margin: 0;
        border-radius: 0;
        transition: left 0.3s ease;
        overflow-y: auto;
        padding: 20px;
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
        display: block;
    }
    
    .filter-sidebar.active {
        left: 0;
    }
    
    .google-pagination .prev span,
    .google-pagination .next span {
        display: none;
    }
    
    .google-pagination {
        gap: 0;
    }
    
    .google-pagination .page-numbers {
        max-width: 60%;
    }
    
    .google-pagination .btn {
        min-width: 28px;
        height: 28px;
        padding: 0 6px;
        font-size: 13px;
    }
    
    .google-pagination .current {
        min-width: 28px;
        height: 28px;
        font-size: 13px;
    }
    
    .google-pagination .ellipsis {
        min-width: 20px;
    }
    
    .search-stats {
        padding: 0 10px;
        line-height: 1.6;
    }
    
    /* 移动端收藏提示样式 */
    .bookmark-tip {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 8px 12px;
    }
    
    .logo-section {
        margin-right: 12px;
        padding-left: 12px;
    }
    
    .logo-image {
        height: 24px;
    }
    
    .search-input-container {
        height: 36px;
        border-radius: 20px;
    }
    
    .search-input {
        font-size: 14px;
    }
    
    .search-button {
        padding: 0 12px;
    }
    
    .search-button svg {
        width: 18px;
        height: 18px;
    }

    .content-wrapper {
        padding: 8px 0;
        gap: 8px;
    }

    .card {
        padding: 5px;
        margin-bottom: 8px;
    }
    
    .card-body {
        margin: 4px;
        gap: 5px;
    }
    
    .card-title {
        font-size: 15px;
        line-height: 1.3;
        margin: 8px 0 8px 0;
    }
    
    .card-meta {
        font-size: 12px;
        line-height: 1.3;
    }
    
    .card-text {
        font-size: 13px;
        line-height: 1.4;
    }
    
    .card-actions {
        margin-top: 4px;
        gap: 5px;
    }
    
    .side-link {
        font-size: 12px;
        padding: 3px 6px;
    }
    
    .search-stats {
        padding: 0 8px;
        font-size: 12px;
        line-height: 1.4;
    }

    .google-pagination .page-numbers {
        max-width: 50%;
    }
    
    .google-pagination .btn {
        min-width: 24px;
        height: 24px;
        padding: 0 4px;
        font-size: 12px;
        margin: 0 1px;
    }
    
    .google-pagination .current {
        min-width: 24px;
        height: 24px;
        font-size: 12px;
        margin: 0 1px;
    }
    
    .google-pagination .ellipsis {
        min-width: 16px;
    }
    
    /* 小屏幕收藏提示样式 */
    .bookmark-tip {
        display: none !important;
    }
    
    .bookmark-close {
        width: 18px;
        height: 18px;
        font-size: 14px;
    }
}

/* u52a0u8f7du9065u7f69 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(240, 240, 240, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.loading-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    background: none;
    box-shadow: none;
    padding: 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(230, 230, 230, 0.8);
    border-top: 3px solid #1a73e8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: #1a73e8;
    font-size: 16px;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 