body {
    margin: 0;
    font-family: "Microsoft YaHei", sans-serif;
    background: #f7f7f7;
    color: #333;
}

.topbar {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    height: 60px;
}

.topbar-content {
    width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    height: 60px;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
}

.logo-images {
    width: 21px !important;
    height: 21px !important;
}

.search-box {
    width: 400px;
    margin: 0 40px;
    display: flex;
    flex-direction: column;
    position: relative;
}

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

.search-box input {
    flex: 1;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    border-color: #6b4226;
}

.search-box button {
    width: 50px;
    border: 1px solid #ccc;
    border-left: none;
    background: #6b4226;
    color: #fff;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.search-box button i {
    font-size: 20px;
}

.user-links {
    margin-left: auto;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-links .logo {
    width: 25px;
    height: 25px;
    border: 1px solid #6E544C;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-links a {
    color: #6E544C;
    text-decoration: none;
}

.login-btn-line {
    width: 1px;
    height: 10px;
    background-color: #6E544C;
}

.register-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.promo-banner {
    background: linear-gradient(100deg, #FF8D73 0%, #FC4E29 100%);
    color: white;
    padding: 5px 8px;
    font-size: 12px;
    border-radius: 5px;
    position: absolute;
    top: 10px;
    transform: translateX(-50%);
    margin-top: 5px;
    white-space: nowrap;
}

.promo-banner::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 80%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid #ff4444;
}

.container {
    width: 1200px;
    margin: 20px auto;
    display: flex;
}

.content {
    flex: 1;
    margin-right: 20px;
}

.sidebar {
    width: 260px;
}

.filter-bar {
    background: #fff;
    border: 1px solid #eee;
    padding: 10px 15px;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-radius: 10px;
}

.filter-bar strong {
    color: #F83131;
}

.filter-bar span {
    margin-right: 10px;
    color: #666;
}

.filter-bar button {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 6px 15px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-bar button:hover {
    background: #e9e9e9;
}

.filter-bar button.active {
    background: #6b4226;
    color: white;
    border-color: #6b4226;
}

.result-card {
    background: #fff;
    border: 1px solid #eee;
    margin-bottom: 20px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 10px;
}

.result-card:hover {
    border-color: #6b4226;
    box-shadow: 0 2px 8px rgba(107, 66, 38, 0.1);
    transform: translateY(-1px);
}

.result-card h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.result-card .title-content {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.result-card .title-content::before {
    content: "📁 ";
    margin-right: 5px;
    flex-shrink: 0;
}

.result-card .title-content span {
    word-break: break-all;
    line-height: 1.4;
}

.result-card .title-date {
    font-size: 14px;
    color: #999;
    font-weight: normal;
    flex-shrink: 0;
    white-space: nowrap;
}

.result-card h3 em {
    color: #F83131;
    font-style: normal;
    text-decoration: none;
}

.file-list {
    font-size: 14px;
    line-height: 1.8;
    color: #555;
    margin: 10px 0;
    padding-left: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #999;
    margin-top: 10px;
}

.result-meta .tags {
    display: flex;
}

.tag {
    border: 1px solid #C3BCB7;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.result-meta .tags .tag:first-child {
    border-right: 0px;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

.result-meta .tags .tag:last-child {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}

.sidebar .hot-list {
    background: #fff;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 10px;
}

.sidebar h4 {
    margin: 0 0 10px;
    font-size: 16px;
}

.sidebar ol {
    padding-left: 20px;
    margin: 0;
    font-size: 14px;
    line-height: 1.8;
}

.sidebar ol li {
    margin-bottom: 4px;
    cursor: pointer;
}

.sidebar .highlight {
    display: inline-block;
    background: #ff5a5f;
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    margin-left: 5px;
    border-radius: 3px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    font-size: 14px;
    gap: 5px;
}

.pagination a {
    padding: 6px 12px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #666;
    border-radius: 4px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #e9ecef;
    color: #333;
}

.pagination a.active {
    background: #6b4226;
    color: #fff;
    border-color: #6b4226;
}

.pagination span {
    padding: 6px 12px;
    color: #666;
}

.pagination input {
    width: 40px;
    text-align: center;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
}

.pagination button {
    padding: 6px 12px;
    background: #6b4226;
    border: none;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.pagination button:hover {
    background: #5a3520;
}

/* Bootstrap分页样式覆盖 */
.pagination .page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background-color: #6b4226;
    border-color: #6b4226;
}

.pagination .page-link {
    color: #666;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 12px;
    margin: 0 2px;
}

.pagination .page-link:hover {
    color: #333;
    background-color: #e9ecef;
    border-color: #ddd;
}

.pagination .page-item:first-child .page-link {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.pagination .page-item:last-child .page-link {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* VIP AI 推荐样式 */
.vip-ai-notice {
    padding: 15px 20px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    margin-bottom: 10px;
}

.vip-notice-text {
    color: #6b4226;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.vip-icon {
    font-size: 18px;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.ai-recommendation-content {
    margin-top: 8px;
    max-height: 300px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.3s ease;
}

.ai-recommendation-content.expanded {
    max-height: none;
}

.ai-recommendation-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, #fff);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ai-recommendation-content.needs-expand::after {
    opacity: 1;
}

.ai-recommendation-content.expanded::after {
    opacity: 0;
}

.expand-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 8px 16px;
    background: #6b4226;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.expand-toggle-btn:hover {
    background: #8b5a3c;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(107, 66, 38, 0.2);
}

.expand-toggle-btn:active {
    transform: translateY(0);
}

.expand-toggle-btn .icon {
    transition: transform 0.3s ease;
    font-size: 14px;
}

.expand-toggle-btn.expanded .icon {
    transform: rotate(180deg);
}

.ai-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b4226;
    font-size: 14px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.loading-spinner {
    animation: spin 1s linear infinite;
}

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

.ai-recommendation-text {
    color: #333;
    font-size: 14px;
    line-height: 1.8;
    padding: 0;
    background: transparent;
    border: none;
    animation: fadeIn 0.5s ease;
}

/* Markdown样式 */
.ai-recommendation-text h1,
.ai-recommendation-text h2,
.ai-recommendation-text h3,
.ai-recommendation-text h4,
.ai-recommendation-text h5,
.ai-recommendation-text h6 {
    color: #6b4226;
    margin-top: 20px;
    margin-bottom: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.ai-recommendation-text h1 {
    font-size: 20px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

.ai-recommendation-text h2 {
    font-size: 18px;
    color: #6b4226;
}

.ai-recommendation-text h3 {
    font-size: 16px;
    color: #8b5a3c;
}

.ai-recommendation-text h4 {
    font-size: 15px;
    color: #8b5a3c;
}

.ai-recommendation-text h1:first-child,
.ai-recommendation-text h2:first-child,
.ai-recommendation-text h3:first-child {
    margin-top: 0;
}

.ai-recommendation-text p {
    margin: 12px 0;
    line-height: 1.8;
    color: #555;
}

.ai-recommendation-text ul,
.ai-recommendation-text ol {
    margin: 12px 0;
    padding-left: 28px;
    color: #555;
}

.ai-recommendation-text li {
    margin: 6px 0;
    line-height: 1.7;
}

.ai-recommendation-text li::marker {
    color: #6b4226;
}

.ai-recommendation-text strong {
    color: #6b4226;
    font-weight: 600;
}

.ai-recommendation-text em {
    font-style: italic;
    color: #666;
}

.ai-recommendation-text code {
    background: #f5f5f5;
    color: #e83e8c;
    padding: 3px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    border: 1px solid #e9ecef;
}

.ai-recommendation-text pre {
    background: #f8f9fa;
    padding: 14px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 14px 0;
    border: 1px solid #e9ecef;
}

.ai-recommendation-text pre code {
    background: none;
    color: #333;
    padding: 0;
    border: none;
    font-size: 13px;
}

.ai-recommendation-text a {
    color: #6b4226;
    text-decoration: none;
    border-bottom: 1px solid #6b4226;
    transition: all 0.3s ease;
    font-weight: 500;
}

.ai-recommendation-text a:hover {
    color: #8b5a3c;
    border-bottom-color: #8b5a3c;
    background: rgba(107, 66, 38, 0.05);
    padding: 2px 4px;
    margin: -2px -4px;
    border-radius: 3px;
}

.ai-recommendation-text blockquote {
    border-left: 4px solid #6b4226;
    padding: 12px 16px;
    margin: 16px 0;
    background: #f8f9fa;
    border-radius: 0 6px 6px 0;
    color: #666;
    font-style: italic;
}

.ai-recommendation-text hr {
    border: none;
    border-top: 2px solid #e9ecef;
    margin: 20px 0;
}

.ai-recommendation-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.ai-recommendation-text table th,
.ai-recommendation-text table td {
    border: 1px solid #e9ecef;
    padding: 10px 12px;
    text-align: left;
}

.ai-recommendation-text table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #6b4226;
}

.ai-recommendation-text table tr:nth-child(even) {
    background: #fafafa;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}