body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #ffffff;
}

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

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    text-decoration: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-right a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.header-right a:hover {
    color: #333;
}

.search-section {
    text-align: center;
    margin-bottom: 40px;
}

.search-title {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 20px;
}

.search-container {
    max-width: 1000px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    background: white;
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    background: transparent;
    color: inherit;
}

.search-button {
    padding: 12px 25px;
    background: linear-gradient(to right, #cddce2, #d3cee8);
    color: #333;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: opacity 0.3s;
    border-radius: 0 8px 8px 0;
}

.search-button:hover {
    opacity: 0.9;
}

.repo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 40px;
}
.repo-card {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 160px;
    border: 1px solid #f0f0f0;
}

.repo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.repo-name {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.repo-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.repo-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #888;
}

.repo-stars {
    display: flex;
    align-items: center;
    gap: 5px;
}

.repo-arrow {
    color: #ccc;
    transition: color 0.2s;
}

.repo-card:hover .repo-arrow {
    color: #666;
}

.add-repo {
    background: white;
    border: 2px dashed #cddce2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #666;
    transition: all 0.2s;
}

.add-repo:hover {
    border-color: #d3cee8;
    color: #666;
    background: linear-gradient(to right, rgba(205, 220, 226, 0.1), rgba(211, 206, 232, 0.1));
}

.loading {
    text-align: center;
    padding: 30px;
    font-size: 18px;
    color: #666;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

.message {
    text-align: center;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
}

.message.error {
    color: #e74c3c;
    background-color: #fdecea;
}

.message.info {
    color: #333;
    background: linear-gradient(to right, rgba(205, 220, 226, 0.2), rgba(211, 206, 232, 0.2));
    border: none;
}

.message.success {
    color: #2ecc71;
    background-color: #eafaf1;
}

.message.warning {
    color: #f39c12;
    background-color: #fef5e7;
}

.links-section a {
    display: inline-block;
    margin-right: 15px;
    margin-bottom: 10px;
    text-decoration: none;
    color: #333;
    background: linear-gradient(to right, #cddce2, #d3cee8);
    padding: 8px 15px;
    border-radius: 4px;
    transition: opacity 0.3s;
}

.links-section a:hover {
    opacity: 0.9;
}

/* 移动端适配 - 448x924 */
@media (max-width: 480px) {
    .container {
        max-width: 100%;
        padding: 12px;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 25px;
        text-align: center;
    }

    .logo {
        font-size: 20px;
    }

    .header-right {
        justify-content: center;
        gap: 15px;
    }

    .search-section {
        margin-bottom: 30px;
    }

    .search-title {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .search-container {
        max-width: 100%;
        padding: 0 8px;
    }

    .search-box {
        flex-direction: column;
        gap: 12px;
        padding: 15px;
    }

    .search-input {
        width: 100%;
        padding: 14px 16px;
        font-size: 16px;
        border-radius: 8px;
    }

    .search-button {
        width: 100%;
        padding: 14px 20px;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
    }

    .repo-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 25px;
    }

    .repo-card {
        padding: 16px;
        min-height: 100px;
    }

    .repo-name {
        font-size: 15px;
        margin-bottom: 6px;
    }

    .repo-description {
        font-size: 13px;
        margin-bottom: 12px;
        -webkit-line-clamp: 3;
    }

    .repo-meta {
        font-size: 12px;
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .repo-stars {
        gap: 4px;
    }

    .add-repo {
        font-size: 14px;
        padding: 20px;
    }

    .loading {
        padding: 25px;
        font-size: 16px;
    }

    .loading-spinner {
        width: 25px;
        height: 25px;
        margin: 0 auto 12px;
    }

    .message {
        margin: 15px 0;
        padding: 16px;
        font-size: 14px;
    }

    .links-section a {
        display: block;
        margin-right: 0;
        margin-bottom: 8px;
        padding: 10px 15px;
        text-align: center;
        font-size: 14px;
    }
}

/* 超小屏幕适配 - 针对448px宽度 */
@media (max-width: 448px) {
    .container {
        padding: 8px;
    }

    .header {
        margin-bottom: 20px;
    }

    .logo {
        font-size: 18px;
    }

    .header-right a {
        font-size: 14px;
    }

    .search-title {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .search-container {
        padding: 0 4px;
    }

    .search-box {
        padding: 12px;
        gap: 10px;
    }

    .search-input {
        padding: 12px 14px;
        font-size: 15px;
    }

    .search-button {
        padding: 12px 18px;
        font-size: 15px;
    }

    .repo-grid {
        gap: 12px;
        margin-top: 20px;
    }

    .repo-card {
        padding: 14px;
        min-height: 90px;
    }

    .repo-name {
        font-size: 14px;
        font-weight: 600;
    }

    .repo-description {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .repo-meta {
        font-size: 11px;
        gap: 6px;
    }

    .add-repo {
        padding: 16px;
        font-size: 13px;
    }

    .loading {
        padding: 20px;
        font-size: 15px;
    }

    .loading-spinner {
        width: 20px;
        height: 20px;
        border-width: 3px;
        margin: 0 auto 10px;
    }

    .message {
        margin: 12px 0;
        padding: 14px;
        font-size: 13px;
    }

    .links-section a {
        padding: 8px 12px;
        font-size: 13px;
        margin-bottom: 6px;
    }
} 

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.loading-text {
    color: #333;
    font-size: 16px;
    font-weight: bold;
}

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

.search-box {
    display: flex;
    gap: 10px;
    align-items: center;
    background: white;
    border-radius: 8px;
    padding: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    min-width: 600px;
}

.search-input {
    flex: 1;
    border: none;
    padding: 10px;
    font-size: 16px;
    outline: none;
}

.top-k-input {
    width: 60px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.top-k-input::-webkit-inner-spin-button,
.top-k-input::-webkit-outer-spin-button {
    opacity: 1;
}

.repo-meta-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.repo-rank {
    font-weight: bold;
    color: #3498db;
    font-size: 14px;
}

.repo-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.repo-similarity {
    color: #666;
    font-size: 14px;
}

.repo-similarity span {
    color: #3498db;
    font-weight: bold;
}

.search-type-select {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: #f8f8f8;
    cursor: pointer;
    outline: none;
    margin-right: 5px;
}

.search-type-select:hover {
    border-color: #aaa;
}

.paper-authors {
    margin: 8px 0;
    color: #555;
    font-size: 14px;
}

.highlighted-author {
    background-color: #fffacd;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
    color: #d35400;
}

/* 图片上传和预览样式 */
.image-upload-btn {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: #f8f8f8;
    cursor: pointer;
    outline: none;
    display: none;
}

.image-upload-btn:hover {
    border-color: #aaa;
    background-color: #e8e8e8;
}

.image-preview-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    position: relative;
}

.image-preview-container img {
    max-height: 150px;
    max-width: 300px;
    border-radius: 8px;
    border: 2px solid #ddd;
}

.image-remove-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ff5252;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 论文缩略图样式 */
.paper-thumbnail {
    margin-top: 10px;
    margin-bottom: 10px;
    text-align: center;
    position: relative;
}

.paper-thumbnail img {
    max-height: 120px;
    max-width: 100%;
    border-radius: 4px;
    border: 1px solid #eee;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: zoom-in;
}

/* 大图预览样式 */
.paper-thumbnail .large-preview {
    display: none;
    position: absolute;
    z-index: 100;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    max-width: 400px;
    max-height: 400px;
    border: 2px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    background-color: white;
    padding: 5px;
}

.paper-thumbnail:hover .large-preview {
    display: block;
}

/* 日期筛选容器样式 */
.date-filter-container {
    margin-top: 10px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.quick-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.category-filter-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-label, .date-filter-label {
    font-size: 14px;
    font-weight: bold;
    color: #555;
    margin-right: 5px;
    white-space: nowrap;
}

.quick-filter-btn {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    background-color: #f8f8f8;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.quick-filter-btn:hover {
    border-color: #3498db;
    background-color: #e3f2fd;
}

.quick-filter-btn.active {
    background-color: #a8c8d4;
    color: white;
    border-color: #a8c8d4;
}

.date-picker-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.date-picker {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: #f8f8f8;
    cursor: pointer;
    outline: none;
    min-width: 150px;
}

.date-picker:hover, .date-picker:focus {
    border-color: #3498db;
}



/* 分页样式 */
.pagination-container {
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
}

.pagination-info {
    margin-bottom: 15px;
    color: #555;
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: #f8f8f8;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #333;
    min-width: 40px;
}

.pagination-btn:hover {
    border-color: #3498db;
    background-color: #e3f2fd;
}

.pagination-btn.active {
    background-color: #d5ceed;
    color: white;
    border-color: #d5ceed;
}

.pagination-btn:disabled {
    background-color: #f5f5f5;
    color: #ccc;
    cursor: not-allowed;
    border-color: #eee;
}

.pagination-ellipsis {
    padding: 8px 4px;
    color: #999;
    font-size: 14px;
}

/* 认证相关样式 */
.auth-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 15px;
}

/* 认证相关样式 */
.auth-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 15px;
}
.auth-button {
    padding: 6px 15px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    background-color: #f8f9fa;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.auth-button:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.auth-button.login {
    background-color: #cddce2;
    color: white;
    border-color: #cddce2;
}

.auth-button.login:hover {
    background-color: #92b6c4;
    border-color: #92b6c4;
}

.auth-button.signup {
    background-color: #d3cee8;
    color: white;
    border-color: #d3cee8;
}

.auth-button.signup:hover {
    background-color: #998fc1;
    border-color: #998fc1;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background-color: #ffffff;
    border-radius: 4px;
    border: 1px solid #ddd;
    flex-wrap: wrap;
}

.user-name {
    font-weight: 500;
    color: #333;
}

.logout-button {
    padding: 6px 12px;
    font-size: 12px;
    background-color: #cddce2;
    color: rgb(255, 255, 255);
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.logout-button:hover {
    background-color: #d3cee8;
}