
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #8a2be2;
    --secondary-color: #ff6b6b;
    --dark-color: #1a1a2e;
    --light-color: #f8f9fa;
    --gray-color: #6c757d;
    --border-color: #dee2e6;
}

body {
    background-color: #f5f7ff;
    color: #333;
    display: flex;
    min-height: 100vh;
}

/* 左侧导航栏样式 */
.sidebar {
    width: 250px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: white;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    box-shadow: 3px 0 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.logo h1,.logo .h1 {
    font-size: 1.8rem;
    /*margin-left: 10px;*/
    color: var(--secondary-color);
}

.logo-icon {
    font-size: 2.5rem;
    background: linear-gradient(45deg, #ff6b6b, #8a2be2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    flex: 1;
}

.nav-links a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    background: rgba(138, 43, 226, 0.2);
    color: white;
    border-left: 4px solid var(--secondary-color);
}

.nav-links a i {
    margin-right: 15px;
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links a {
    color: white;
    margin: 0 10px;
    font-size: 1.3rem;
    transition: all 0.3s;
}

.social-links a:hover {
    color: var(--secondary-color);
    transform: translateY(-3px);
}

/* 主内容区域 */
.main-content {
    flex: 1;
    margin-left: 250px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 顶部栏 */
.top-bar {
    background: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 99;
}

.search-box {
    display: flex;
    width: 400px;
    max-width: 100%;
}

.search-box input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}

.search-box button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background 0.3s;
}

.search-box button:hover {
    background: #6a1fc1;
}

.user-actions a {
    color: var(--dark-color);
    margin-left: 20px;
    font-size: 1.2rem;
    text-decoration: none;
    position: relative;
}

.user-actions a .badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--secondary-color);
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 页面内容 */
.page-content {
    flex: 1;
    padding: 30px;
}



/* 面包屑导航 */
.breadcrumb {
    padding: 15px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb span {
    color: var(--gray-color);
    margin: 0 8px;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 25px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.card-text {
    color: var(--gray-color);
    margin-bottom: 15px;
    line-height: 1.6;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    color: var(--gray-color);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

/* 首页样式 */
.hero-section {
    background: linear-gradient(135deg, #8a2be2, #6a1fc1);
    color: white;
    border-radius: 8px;
    padding: 40px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 60%;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.hero-text {
    font-size: 1.1rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.hero-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.hero-btn:hover {
    background: #ff5252;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.hero-img {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    opacity: 0.3;
}

.section-title {
    font-size: 1.8rem;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.featured-news {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.news-col {
    flex: 0 0 calc(33.333% - 30px);
    margin: 0 15px;
}

.faq-section {
    background: white;
    border-radius: 8px;
    padding: 30px;
    margin-top: 30px;
}

.faq-item {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-question {
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.faq-answer {
    color: var(--gray-color);
    line-height: 1.6;
}

/* 栏目页样式 */
.category-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.category-col {
    flex: 0 0 calc(25% - 30px);
    margin: 0 15px 30px;
}

/* 文章页样式 */
.article-header {
    margin-bottom: 30px;
}

.article-title {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.article-meta {
    display: flex;
    color: var(--gray-color);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.article-meta span {
    margin-right: 20px;
    display: flex;
    align-items: center;
}

.article-meta i {
    margin-right: 5px;
}

.article-image {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 25px;
}

.article-content {
    line-height: 1.8;
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.article-content p {
    margin-bottom: 20px;
}

.related-articles {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.related-col {
    flex: 0 0 calc(33.333% - 20px);
    margin: 0 10px;
}

.comments-section {
    background: white;
    border-radius: 8px;
    padding: 30px;
    margin-top: 40px;
}

.comment-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    resize: vertical;
    min-height: 120px;
    margin-bottom: 15px;
    font-size: 1rem;
}

.comment-form button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.comment-list {
    margin-top: 30px;
}

.comment-item {
    display: flex;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.comment-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: bold;
    color: var(--dark-color);
}

.comment-date {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.comment-text {
    color: #444;
    line-height: 1.6;
}

/* 注册页样式 */
.register-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-color);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border 0.3s;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.1);
}

.register-btn {
    background: var(--primary-color);
    color: white;
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.register-btn:hover {
    background: #6a1fc1;
}

.login-link {
    text-align: center;
    margin-top: 20px;
    color: var(--gray-color);
}

.login-link a {
    color: var(--primary-color);
    text-decoration: none;
}

/* 网址导航页样式 */
.nav-intro {
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    color: white;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
}

.nav-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.nav-category {
    flex: 0 0 calc(25% - 30px);
    margin: 0 15px 30px;
}

.nav-category-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.nav-links-list {
    list-style: none;
}

.nav-links-list li {
    margin-bottom: 10px;
}

.nav-links-list a {
    color: var(--dark-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 8px 0;
    transition: color 0.3s;
}

.nav-links-list a:hover {
    color: var(--primary-color);
}

.nav-links-list a i {
    margin-right: 10px;
    color: var(--primary-color);
}

.features-section {
    display: flex;
    margin: 40px 0;
}

.feature-box {
    flex: 1;
    background: white;
    border-radius: 8px;
    padding: 30px;
    margin: 0 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.feature-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.page-item {
    margin: 0 5px;
}

.page-link {
    display: block;
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--dark-color);
    text-decoration: none;
    transition: all 0.3s;
}

.page-link:hover, .page-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 底部样式 */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 40px 0 20px;
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0 30px;
}

.footer-col {
    flex: 1;
    min-width: 250px;
    margin-bottom: 30px;
    padding: 0 15px;
}

.footer-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .news-col, .category-col {
        flex: 0 0 calc(50% - 30px);
    }

    .nav-category {
        flex: 0 0 calc(33.333% - 30px);
    }
}

@media (max-width: 992px) {
    .sidebar {
        width: 70px;
    }

   .nav-links a span {
        /*display: none;*/
    }

    .nav-links a {
        justify-content: center;
        padding: 20px 0;
    }

    .nav-links a i {
        margin-right: 0;
    }

    .main-content {
        margin-left: 70px;
    }

    .hero-content {
        width: 100%;
    }

    .hero-img {
        display: none;
    }
}

@media (max-width: 768px) {
    .news-col, .category-col, .nav-category {
        flex: 0 0 100%;
        margin: 0 0 20px;
    }

    .related-col {
        flex: 0 0 100%;
        margin: 0 0 20px;
    }

    .features-section {
        flex-direction: column;
    }

    .feature-box {
        margin: 0 0 20px;
    }

    .search-box {
        width: 200px;
    }

    .article-image {
        height: 300px;
    }
}

@media (max-width: 576px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .main-content {
        margin-left: 0;
    }

    .top-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-box {
        width: 100%;
        margin-bottom: 15px;
    }

    .user-actions {
        align-self: flex-end;
    }
}


/* 汉堡菜单按钮 */
.menu-toggle {
    display: none;
    position: fixed;
    top: 60px;
    left: 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 101;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* 遮罩层 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    display: none;
}

/* 修改侧边栏在小屏幕下的样式 */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
    }
}

/* 修改侧边栏基础样式 */
.sidebar {
    width: 250px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: white;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    box-shadow: 3px 0 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s ease;
}

.main-content {
    transition: margin-left 0.3s ease;
}
