/* 讲义页面专用样式 */

/* 导航栏 */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #2563eb;
}

.logo {
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #2563eb;
}

/* 讲义内容 */
.lecture-content {
    background-color: white;
    padding: 3rem 0;
    min-height: calc(100vh - 200px);
}

.lecture-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #e5e7eb;
}

.lecture-badge {
    display: inline-block;
    background-color: #2563eb;
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.lecture-header h1 {
    font-size: 2.5rem;
    color: #1f2937;
    margin-bottom: 1rem;
}

.lecture-meta {
    display: flex;
    gap: 2rem;
    color: #6b7280;
    font-size: 0.9rem;
}

.lecture-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 目录 */
.toc {
    background-color: #f9fafb;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    border-left: 4px solid #2563eb;
}

.toc h2 {
    font-size: 1.2rem;
    color: #1f2937;
    margin-bottom: 1rem;
}

.toc ul {
    list-style: none;
    padding-left: 0;
}

.toc li {
    margin-bottom: 0.5rem;
}

.toc a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.3s;
}

.toc a:hover {
    color: #1e40af;
    text-decoration: underline;
}

/* 内容样式 */
.content {
    line-height: 1.8;
}

.content h2 {
    color: #1f2937;
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.content h3 {
    color: #1f2937;
    font-size: 1.4rem;
    margin: 1.5rem 0 0.75rem;
}

.content h4 {
    color: #1f2937;
    font-size: 1.1rem;
    margin: 1rem 0 0.5rem;
}

.content p {
    color: #4b5563;
    margin-bottom: 1rem;
}

.content ul,
.content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
    color: #4b5563;
}

.content li {
    margin-bottom: 0.5rem;
}

.content ul li {
    list-style-type: disc;
}

.content ol li {
    list-style-type: decimal;
}

/* 引用块 */
.content blockquote {
    background-color: #f3f4f6;
    border-left: 4px solid #2563eb;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
    font-style: italic;
    color: #1f2937;
}

/* 表格 */
.content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}

.content th,
.content td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.content th {
    background-color: #2563eb;
    color: white;
    font-weight: 600;
}

.content tr:hover {
    background-color: #f9fafb;
}

.content tr:last-child td {
    border-bottom: none;
}

/* 警告框 */
.warning-box {
    background-color: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
}

.warning-box h4 {
    color: #92400e;
    margin-bottom: 0.5rem;
}

.warning-box ul {
    margin-bottom: 0;
}

.warning-box li {
    color: #78350f;
}

/* 洞察框 */
.insight-box {
    background-color: #d1fae5;
    border-left: 4px solid #10b981;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
}

.insight-box h3 {
    color: #065f46;
    margin-bottom: 0.5rem;
}

.insight-box ul {
    margin-bottom: 0;
}

.insight-box li {
    color: #064e3b;
}

/* 导航按钮 */
.lecture-nav {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-prev,
.btn-next {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-prev {
    background-color: #f3f4f6;
    color: #1f2937;
}

.btn-prev:hover {
    background-color: #e5e7eb;
}

.btn-next {
    background-color: #2563eb;
    color: white;
}

.btn-next:hover {
    background-color: #1e40af;
    transform: translateX(5px);
}

/* 页脚 */
.footer {
    background-color: #1f2937;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.footer a {
    color: #fbbf24;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .lecture-header h1 {
        font-size: 2rem;
    }

    .lecture-meta {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .content table {
        font-size: 0.9rem;
    }

    .content th,
    .content td {
        padding: 0.5rem;
    }

    .lecture-nav {
        flex-direction: column;
    }

    .btn-prev,
    .btn-next {
        width: 100%;
    }
}
