/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.header {
    background: #1a1a2e;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo a {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
}

.nav ul {
    display: flex;
    gap: 30px;
}

.nav a {
    color: #b8c5d6;
    font-size: 16px;
    padding: 8px 16px;
    border-radius: 4px;
}

.nav a:hover,
.nav a.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    display: flex;
    align-items: center;
    background: #16213e;
    border-radius: 20px;
    padding: 8px 15px;
}

.search-box input {
    background: none;
    border: none;
    color: #fff;
    outline: none;
    width: 150px;
}

.search-box button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.btn-login {
    background: #0f3460;
    color: #e94560;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
}

.btn-login:hover {
    background: #16213e;
}

.btn-register {
    background: #e94560;
    color: #fff;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
}

.btn-register:hover {
    background: #ff6b81;
}

.btn-primary {
    background: #e94560;
    color: #fff;
    padding: 12px 30px;
    border-radius: 4px;
    display: inline-block;
    font-size: 16px;
    font-weight: 500;
}

.btn-primary:hover {
    background: #ff6b81;
}

/* 面包屑导航 */
.breadcrumb {
    background: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.breadcrumb a,
.breadcrumb span {
    color: #666;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #e94560;
}

.breadcrumb span {
    margin: 0 8px;
}

.breadcrumb .current {
    color: #e94560;
}

/* 章节通用样式 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 28px;
    color: #1a1a2e;
}

.view-more {
    color: #e94560;
    font-size: 14px;
}

.view-more:hover {
    text-decoration: underline;
}

/* 页脚 */
.footer {
    background: #1a1a2e;
    color: #b8c5d6;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 16px;
}

.footer-section p {
    font-size: 14px;
    line-height: 1.8;
}

.footer-section ul {
    font-size: 14px;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a:hover {
    color: #e94560;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    background: #16213e;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
}

.social-links a:hover {
    background: #e94560;
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 15px;
    }

    .nav ul {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    .header-right {
        flex-direction: column;
        width: 100%;
    }

    .search-box input {
        width: 200px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}
