/* 论文详情弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
}

.modal-content {
    background-color: #fff;
    margin: 30px auto;
    padding: 30px;
    width: 80%;
    max-width: 1000px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close-button:hover {
    color: #333;
}

/* 论文详情内容样式 */
.paper-container {
    max-width: 2000px;
    margin: 40px auto;
    padding: 30px;
    background: white;
    border-radius: 8px;
}

.content-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.paper-details {
    flex: 2;
    min-width: 300px;
}

.paper-title {
    font-size: 24px;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 20px;
    line-height: 1.4;
}

.authors {
    margin-bottom: 20px;
}

.author {
    display: inline-block;
    margin-right: 15px;
    margin-bottom: 5px;
}

.author a {
    text-decoration: none;
    color: #2c3e50;
    transition: opacity 0.3s;
}

.author a:hover {
    color: #1775d4;
    opacity: 0.8;
    text-decoration: underline;
}

.metadata {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #f0f0f0;
}

.metadata div {
    margin-bottom: 10px;
    color: #666;
}

.metadata div:last-child {
    margin-bottom: 0;
}

.metadata strong {
    color: #2c3e50;
    margin-right: 8px;
}

.abstract {
    text-align: justify;
    line-height: 1.7;
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(to right, rgba(205, 220, 226, 0.2), rgba(211, 206, 232, 0.2));
    border-radius: 8px;
    color: #2c3e50;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 500;
    color: #2c3e50;
    margin: 30px 0 15px;
}

.links-section {
    font-size: 15px;
    margin: 20px 0;
}

.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;
    color: #ffffff;
}

.categories {
    margin: 10px 0;
}

.categories span {
    display: inline-block;
    padding: 4px 12px;
    margin-right: 8px;
    margin-bottom: 8px;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
}

.primary-category {
    background: linear-gradient(to right, #cddce2, #d3cee8);
}

.secondary-category {
    background: rgba(205, 220, 226, 0.2);
}

.version-history {
    margin-top: 20px;
}

.version-entry {
    background: white;
    border: 1px solid #f0f0f0;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.version-label {
    background: linear-gradient(to right, #cddce2, #d3cee8);
    color: #333;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 500;
}

.version-date {
    color: #666;
    flex: 1;
}

.version-size {
    color: #888;
    font-size: 14px;
}

.no-analysis {
    padding: 20px;
    color: #666;
    text-align: center;
    font-style: italic;
}

@media (max-width: 768px) {
    .content-container {
        flex-direction: column;
    }
    
    .analysis-container {
        margin-top: 30px;
    }
}

/* 移动端适配 - 448x924 */
@media (max-width: 480px) {
    .modal-content {
        margin: 10px auto;
        padding: 20px;
        width: 95%;
        max-width: 95%;
        border-radius: 6px;
        max-height: 95vh;
    }

    .close-button {
        top: 10px;
        right: 15px;
        font-size: 24px;
    }

    .paper-container {
        max-width: 100%;
        margin: 20px auto;
        padding: 16px;
        border-radius: 6px;
    }

    .content-container {
        flex-direction: column;
        gap: 15px;
    }

    .paper-details {
        min-width: 100%;
    }

    .paper-title {
        font-size: 20px;
        margin-bottom: 16px;
        line-height: 1.3;
    }

    .authors {
        margin-bottom: 16px;
    }

    .author {
        display: block;
        margin-right: 0;
        margin-bottom: 8px;
    }

    .metadata {
        padding: 16px;
        margin: 16px 0;
        border-radius: 6px;
    }

    .metadata div {
        margin-bottom: 8px;
        font-size: 13px;
    }

    .abstract {
        margin: 16px 0;
        padding: 16px;
        border-radius: 6px;
        font-size: 14px;
        line-height: 1.6;
    }

    .section-title {
        font-size: 1.1rem;
        margin: 24px 0 12px;
    }

    .links-section {
        font-size: 14px;
        margin: 16px 0;
    }

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

    .categories {
        margin: 8px 0;
    }

    .categories span {
        padding: 6px 10px;
        margin-right: 6px;
        margin-bottom: 6px;
        font-size: 12px;
    }

    .version-history {
        margin-top: 16px;
    }

    .version-entry {
        padding: 12px;
        margin-bottom: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .version-label {
        padding: 6px 10px;
        font-size: 12px;
    }

    .version-date {
        font-size: 12px;
    }

    .version-size {
        font-size: 11px;
    }

    .no-analysis {
        padding: 16px;
        font-size: 14px;
    }
}

/* 超小屏幕适配 - 针对448px宽度 */
@media (max-width: 448px) {
    .modal-content {
        margin: 5px;
        padding: 16px;
        width: calc(100% - 10px);
        max-height: 98vh;
        border-radius: 4px;
    }

    .close-button {
        top: 8px;
        right: 12px;
        font-size: 20px;
    }

    .paper-container {
        margin: 10px auto;
        padding: 12px;
        border-radius: 4px;
    }

    .paper-title {
        font-size: 18px;
        margin-bottom: 14px;
        line-height: 1.2;
    }

    .authors {
        margin-bottom: 14px;
    }

    .author {
        margin-bottom: 6px;
        font-size: 14px;
    }

    .metadata {
        padding: 12px;
        margin: 12px 0;
        border-radius: 4px;
    }

    .metadata div {
        margin-bottom: 6px;
        font-size: 12px;
    }

    .abstract {
        margin: 12px 0;
        padding: 12px;
        border-radius: 4px;
        font-size: 13px;
        line-height: 1.5;
    }

    .section-title {
        font-size: 1rem;
        margin: 20px 0 10px;
    }

    .links-section {
        font-size: 13px;
        margin: 12px 0;
    }

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

    .categories span {
        padding: 4px 8px;
        margin-right: 4px;
        margin-bottom: 4px;
        font-size: 11px;
    }

    .version-entry {
        padding: 10px;
        margin-bottom: 10px;
        gap: 6px;
    }

    .version-label {
        padding: 4px 8px;
        font-size: 11px;
    }

    .version-date {
        font-size: 11px;
    }

    .version-size {
        font-size: 10px;
    }

    .no-analysis {
        padding: 12px;
        font-size: 13px;
    }
} 

/* 并排布局样式 */
.content-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px auto;
    max-width: 100%;
    padding: 0 20px;
}

.paper-details-container {
    flex: 6;
    min-width: 400px;
}

.analysis-container-wrapper {
    flex: 4;
    min-width: 300px;
}

/* 页面标题和导航栏 */
.page-header {
    background-color: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.nav-buttons {
    display: flex;
    gap: 10px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    background-color: linear-gradient(to right, #cddce2, #d3cee8);
    color: rgba(0,0,0,0.7);
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
}

.back-button:hover {
    background-color: linear-gradient(to right, #d3cee8, #cddce2);
}

.back-button i {
    margin-right: 5px;
}

/* 响应式布局 */
@media (max-width: 1100px) {
    .content-wrapper {
        flex-direction: column;
    }
    
    .paper-details-container,
    .analysis-container-wrapper {
        width: 100%;
    }
}

/* 队列状态显示样式 */
.queue-position {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 8px 12px;
    margin: 10px 0;
    border-radius: 4px;
    font-weight: bold;
    color: #1976d2;
}

.processing-status {
    background-color: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 8px 12px;
    margin: 10px 0;
    border-radius: 4px;
    font-weight: bold;
    color: #f57c00;
}

.retry-info {
    background-color: #fff8e1;
    border-left: 4px solid #ffc107;
    padding: 6px 10px;
    margin: 8px 0;
    border-radius: 3px;
    font-size: 0.9em;
    color: #f57f17;
}

/* 重试按钮样式 */
.retry-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    margin: 5px 0;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.retry-button:hover {
    background-color: #218838;
}

.retry-button:active {
    transform: translateY(1px);
}

.retry-button i {
    font-size: 0.8em;
}

/* 分析错误容器样式改进 */
.analysis-error-container {
    text-align: center;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #dc3545;
}

.analysis-error-container h3 {
    color: #dc3545;
    margin-bottom: 10px;
}

.analysis-error-container p {
    margin-bottom: 15px;
    color: #6c757d;
}

.analysis-loading-container {
    text-align: center;
    padding: 20px;
}

/* 旋转动画 */
.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 认证相关样式 */
.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: #f8f9fa;
    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;
}


/* 登录提示样式 */
.login-required {
    text-align: center;
    padding: 40px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin: 20px;
}

.login-required h2 {
    color: #495057;
    margin-bottom: 15px;
}

.login-required p {
    color: #6c757d;
    margin-bottom: 20px;
}

/* 收藏按钮样式 */
.paper-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.paper-actions {
    display: flex;
    gap: 10px;
}

.favorite-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    background: #fff;
    border: 2px solid #71aec6;
    border-radius: 25px;
    color: #71aec6;
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.favorite-btn:hover {
    background: #71aec6;
    color: white;
    transform: translateY(-2px);
}

.favorite-btn.favorited {
    background: #71aec6;
    color: white;
}

.favorite-btn.favorited i {
    color: white;
}

.favorite-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.favorite-btn:disabled:hover {
    background: #fff;
    color: #cddce2;
    transform: none;
    box-shadow: none;
}

.favorite-btn.favorited:disabled:hover {
    background: #cddce2;
    color: white;
}

/* 收藏模态框样式 */
.favorite-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.favorite-modal-content {
    background: white;
    border-radius: 12px;
    padding: 0;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.favorite-modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.favorite-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.favorite-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.favorite-modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.favorite-modal-body {
    padding: 20px 24px;
}

.quick-actions {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    color: #495057;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 10px;
}

.quick-action-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.quick-action-btn.primary {
    background: #6eb1f9;
    border-color: #6eb1f9;
    color: white;
}

.quick-action-btn.primary:hover {
    background: #4474a8;
    border-color: #4474a8;
}

.collections-list {
    max-height: 300px;
    overflow-y: auto;
}

.collection-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.collection-item:hover {
    background: #f8f9fa;
    border-color: #6eb1f9;
}

.collection-item.favorited {
    background: #e7f3ff;
    border-color: #6eb1f9;
}

.collection-info h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: #333;
}

.collection-info p {
    margin: 0;
    font-size: 12px;
    color: #666;
}

.collection-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #666;
}

.collection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.collection-status.favorited {
    color: #28a745;
}

.loading-collections {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.loading-spinner-small {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}