* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}

html {
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
}

body {
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 1200px;
    /* height: 80%; */
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: #e63946;
    font-size: 24px;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #e63946;
}

.search-bar {
    display: flex;
    align-items: center;
}

.search-bar input {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    outline: none;
    width: 200px;
}

.search-bar button {
    padding: 8px 15px;
    background-color: #e63946;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-bar button:hover {
    background-color: #c1121f;
}

/* 主体内容样式 */
.hero {
    background: linear-gradient(135deg, #e63946 0%, #457b9d 100%);
    color: white;
    text-align: center;
    padding: 60px 0;
    margin-bottom: 30px;
    border-radius: 8px;
}

.hero h2 {
    font-size: 32px;
    margin-bottom: 15px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 25px;
}

.hero-search {
    display: flex;
    justify-content: center;
    max-width: 700px;
    margin: 0 auto;
}

.hero-search input {
    padding: 12px 20px;
    width: 70%;
    border: none;
    border-radius: 4px 0 0 4px;
    outline: none;
    font-size: 16px;
}

.hero-search button {
    padding: 12px 30px;
    background-color: #1d3557;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.hero-search button:hover {
    background-color: #14213d;
}

/* 问题区域样式 */
.questions-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.section-header h3 {
    font-size: 22px;
    color: #333;
}

.tabs {
    display: flex;
    margin: 10px 0;
}

.tab-btn {
    padding: 8px 15px;
    background-color: transparent;
    border: 1px solid #ddd;
    cursor: pointer;
    margin-right: 5px;
    border-radius: 4px;
    transition: all 0.3s;
}

.tab-btn.active {
    background-color: #e63946;
    color: white;
    border-color: #e63946;
}

.filters {
    display: flex;
}

.filter-btn {
    padding: 8px 15px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    margin-left: 15px;
    color: #666;
    transition: color 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
    color: #e63946;
    font-weight: 500;
}

.questions-list {
    margin-bottom: 25px;
}

.question-item {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.question-item:last-child {
    border-bottom: none;
}

.question-title {
    font-size: 18px;
    margin-bottom: 10px;
}

.question-title a {
    text-decoration: none;
    color: #1d3557;
    transition: color 0.3s;
}

.question-title a:hover {
    color: #e63946;
}

.question-meta {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 14px;
}

.question-stats {
    display: flex;
    align-items: center;
}

.stat-item {
    margin-right: 15px;
    display: flex;
    align-items: center;
}

.stat-item i {
    margin-right: 5px;
}

.question-tags {
    display: flex;
    flex-wrap: wrap;
    margin-top: 10px;
}

.tag {
    background-color: #f1faee;
    color: #457b9d;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 8px;
    margin-bottom: 8px;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination button {
    padding: 8px 15px;
    margin: 0 5px;
    border: 1px solid #ddd;
    background-color: transparent;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.pagination button.active {
    background-color: #e63946;
    color: white;
    border-color: #e63946;
}

.pagination button:hover:not(.active) {
    border-color: #e63946;
    color: #e63946;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    background-color: #fff;
    margin: 50px auto;
    padding: 25px;
    border-radius: 8px;
    width: 80%;
    max-width: 800px;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #666;
}

.close-btn:hover {
    color: #e63946;
}

.question-detail {
    margin-bottom: 30px;
}

.question-detail h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #1d3557;
}

.question-detail-meta {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.question-content {
    margin-bottom: 20px;
    line-height: 1.8;
}

.answers-section {
    margin-bottom: 30px;
}

.answers-section h4 {
    font-size: 20px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.answer-item {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.answer-item:last-child {
    border-bottom: none;
}

.answer-meta {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.answer-content {
    line-height: 1.6;
}

.answer-form {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.answer-form h4 {
    font-size: 18px;
    margin-bottom: 15px;
}

.answer-form textarea {
    width: 100%;
    height: 150px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    margin-bottom: 15px;
    outline: none;
}

.answer-form button {
    padding: 10px 20px;
    background-color: #e63946;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.answer-form button:hover {
    background-color: #c1121f;
}

/* 底部样式 */
footer {
    background-color: #1d3557;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        width: 95%;
    }
}

@media (max-width: 992px) {
    .header-container {
        flex-direction: column;
    }

    .logo,
    .nav-links,
    .search-bar {
        margin-bottom: 15px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .tabs,
    .filters {
        margin-top: 10px;
        width: 100%;
        overflow-x: auto;
    }
}

@media (max-width: 768px) {
    .hero h2 {
        font-size: 26px;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-search input {
        width: 60%;
    }

    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
}

/* 添加以下样式到styles.css文件末尾 */

/* 文章列表样式 */
.articles-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 30px;
}

.articles-list {
    margin-bottom: 25px;
}

.article-item {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    display: flex;
}

.article-item:last-child {
    border-bottom: none;
}

.article-thumbnail {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
}

.article-content {
    flex: 1;
}

.article-title {
    font-size: 18px;
    margin-bottom: 10px;
}

.article-title a {
    text-decoration: none;
    color: #1d3557;
    transition: color 0.3s;
}

.article-title a:hover {
    color: #e63946;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 14px;
}

.article-excerpt {
    margin-top: 10px;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 文章详情样式 */
.article-detail-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 30px;
}

.article-detail h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #1d3557;
}

.article-detail-meta {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.article-body {
    margin-bottom: 30px;
    line-height: 1.8;
}

.article-body img {
    max-width: 100%;
    height: auto;
    margin: 15px 0;
    border-radius: 4px;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* 评论样式 */
.comments-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.comments-list {
    margin-bottom: 20px;
}

.comment-item {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.comment-content {
    line-height: 1.6;
}

.comment-form {
    margin-top: 20px;
}

.comment-form textarea {
    width: 100%;
    height: 120px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    margin-bottom: 15px;
    outline: none;
}

.comment-form button {
    padding: 10px 20px;
    background-color: #e63946;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.comment-form button:hover {
    background-color: #c1121f;
}

/* 登录页面样式 */
.login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
}

.login-container {
    width: 100%;
    max-width: 500px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.login-container .tabs {
    display: flex;
    border-bottom: 1px solid #eee;
}

.login-container .tab-btn {
    flex: 1;
    padding: 15px;
    background-color: #f5f7fa;
    border: none;
    cursor: pointer;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s;
}

.login-container .tab-btn.active {
    background-color: #fff;
    color: #e63946;
    border-bottom: 2px solid #e63946;
}

.form-content {
    padding: 25px;
}

.form-content h3 {
    margin-bottom: 20px;
    color: #1d3557;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: #e63946;
}

.remember-me {
    display: flex;
    align-items: center;
}

.remember-me input {
    width: auto;
    margin-right: 10px;
}

#login-btn,
#register-btn {
    width: 100%;
    padding: 12px;
    background-color: #e63946;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

#login-btn:hover,
#register-btn:hover {
    background-color: #c1121f;
}

.form-footer {
    margin-top: 15px;
    text-align: center;
}

.form-footer a {
    color: #457b9d;
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

.hidden {
    display: none;
}

/* 专区页面样式 */
.special-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 30px;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.special-content {
    text-align: center;
    padding: 40px;
}

.lock-icon {
    font-size: 60px;
    color: #ddd;
    margin-bottom: 20px;
}

.special-message p {
    font-size: 18px;
    margin-bottom: 30px;
    color: #666;
}

.special-message button {
    padding: 12px 25px;
    background-color: #457b9d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.special-message button:hover {
    background-color: #1d3557;
}

/* 发布按钮样式 */
.publish-btn {
    padding: 8px 15px;
    background-color: #e63946;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 15px;
    transition: background-color 0.3s;
}

.publish-btn:hover {
    background-color: #c1121f;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination button:hover:not(:disabled) {
    background: #f5f5f5;
}

.pagination button.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-dots {
    padding: 8px 4px;
    color: #999;
}

.no-data {
    text-align: center;
    color: #999;
    padding: 40px;
}

.paid-tag {
    background: #ff6b6b;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 10px;
}

/* 发布问题表单样式 */
.publish-question-form {
    max-width: 600px;
    margin: 0 auto;
}

.publish-question-form .form-group {
    margin-bottom: 20px;
}

.publish-question-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.publish-question-form input,
.publish-question-form select,
.publish-question-form textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s;
}

.publish-question-form input:focus,
.publish-question-form select:focus,
.publish-question-form textarea:focus {
    border-color: #e63946;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.form-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.form-actions button[type="submit"] {
    background-color: #e63946;
    color: white;
}

.form-actions button[type="button"] {
    background-color: #6c757d;
    color: white;
}

/* 悬赏标签样式 */
.reward-tag {
    background-color: #ffc107;
    color: #212529;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 10px;
}

/* 问题状态样式 */
.question-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.question-status.solved {
    background-color: #d4edda;
    color: #155724;
}

.question-status.unsolved {
    background-color: #f8d7da;
    color: #721c24;
}

/* 专区功能样式 */
.special-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.feature-item {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.feature-item h4 {
    color: #e63946;
    margin-bottom: 10px;
}