/* ============================================
   style.css —— 全站统一样式
   设计风格：百科词条风格
   特点：左侧信息卡 + 右侧正文，干净、正式
   ============================================ */

/* ========== 颜色变量 ========== */
:root {
    --primary: #2c3e50;
    --primary-light: #34495e;
    --accent: #3498db;
    --bg: #f5f5f5;
    --card-bg: #ffffff;
    --text: #333333;
    --text-light: #666666;
    --border: #e0e0e0;
    --toc-bg: #f8f9fa;
    --footer-bg: #2c3e50;
}

/* ========== 全局重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ========== 导航栏 ========== */
.navbar {
    background-color: var(--primary);
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.4s ease;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    flex-wrap: wrap;
}

.nav-logo {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.nav-links a {
    color: #ccc;
    padding: 8px 18px;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.nav-links a:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-links a.active {
    color: #fff;
    background-color: var(--accent);
    font-weight: 600;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: #fff;
    margin: 5px 0;
    transition: all 0.3s;
}

/* ========== 词条标题区域 ========== */
.entry-header {
    background-color: rgba(20, 30, 50, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px 20px;
    transition: background-color 0.4s ease;
}

.entry-header-container {
    max-width: 1100px;
    margin: 0 auto;
}

.entry-title {
    font-size: 2rem;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.entry-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    margin-top: 5px;
}

/* ========== 主内容布局 ========== */
.entry-main {
    flex: 1;
    padding: 30px 20px;
    transition: background-color 0.4s ease;
}

.entry-layout {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

.entry-sidebar {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 25px;
}

.entry-toc .toc {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 20px 22px;
    margin-bottom: 0;
}

.info-avatar {
    text-align: center;
    margin-bottom: 20px;
}

.info-avatar-img {
    width: 150px;
    height: 200px;
    border-radius: 8px;
    object-fit: cover;
    border: 3px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.info-table th,
.info-table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

.info-table th {
    color: var(--text-light);
    font-weight: 600;
    white-space: nowrap;
    width: 35%;
}

.info-card-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-block {
    width: 100%;
    text-align: center;
}

/* ========== 按钮样式 ========== */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-outline {
    background-color: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-outline:hover {
    background-color: var(--accent);
    color: #fff;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* ========== 右侧正文区域 ========== */
.entry-content {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 30px;
    min-width: 0;
}

/* ========== 目录 ========== */
.toc {
    background-color: var(--toc-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 20px 25px;
    margin-bottom: 30px;
}

.toc-title {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 10px;
    font-weight: 700;
}

.toc ul {
    list-style: none;
}

.toc li {
    padding: 5px 0;
}

.toc-link {
    color: var(--accent);
    font-size: 0.95rem;
    transition: color 0.2s;
}

.toc-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* ========== 正文章节 ========== */
.content-section {
    margin-bottom: 35px;
    scroll-margin-top: 80px;   /* 锚点滚动偏移，避免标题被导航栏遮住 */
}

.content-section:last-child {
    margin-bottom: 0;
}

.section-heading {
    font-size: 1.4rem;
    color: var(--primary);
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 20px;
    font-weight: 700;
}

.content-section p {
    margin-bottom: 12px;
    font-size: 1rem;
    color: var(--text);
}

/* ========== 项目行 ========== */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.project-row {
    display: flex;
    gap: 15px;
    padding: 15px;
    background-color: #fafafa;
    border-radius: 6px;
    border: 1px solid #f0f0f0;
    align-items: flex-start;
}

.project-row-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.project-row-info h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 5px;
}

.project-row-info p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

.tag {
    display: inline-block;
    background-color: #eef4fb;
    color: var(--accent);
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.78rem;
    margin-right: 5px;
}

/* ========== 兴趣列表 ========== */
.interest-list {
    list-style: none;
    margin: 15px 0;
}

.interest-list li {
    padding: 8px 0;
    border-bottom: 1px dashed #f0f0f0;
}

.interest-list li:last-child {
    border-bottom: none;
}

/* ========== 页内联系方式 ========== */
.contact-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 15px 0;
    font-size: 0.95rem;
}

/* ========== 通用页面主体 ========== */
.page-main {
    flex: 1;
    padding: 30px 20px;
    transition: background-color 0.4s ease;
}

.page-container {
    max-width: 1100px;
    margin: 0 auto;
}

.category-heading {
    font-size: 1.3rem;
    color: #ffffff;
    margin: 30px 0 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* ========== 项目卡片网格 ========== */
.project-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.project-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 25px;
    transition: all 0.25s;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-color: #ccc;
}

.project-card-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.project-card h3 {
    font-size: 1.15rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.project-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 12px;
    flex: 1;
}

.project-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 15px;
}

.project-card-tags span {
    background-color: #eef4fb;
    color: var(--accent);
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.78rem;
}

/* ========== 联系卡片 ========== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.contact-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 25px;
    text-align: center;
    transition: all 0.25s;
}

.contact-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.contact-card-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.contact-card h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.contact-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 12px;
    word-break: break-all;
}

/* ========== 表单卡片 ========== */
.form-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 30px;
}

.form-card h2 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.form-note {
    background-color: #fffde7;
    border-left: 4px solid #f9a825;
    padding: 12px 16px;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 20px;
    border-radius: 0 4px 4px 0;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary);
}

.form-group input,
.form-group textarea {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
}

/* ========== 添加提示 ========== */
.add-note {
    background-color: #fffde7;
    border-left: 4px solid #f9a825;
    padding: 20px;
    border-radius: 0 6px 6px 0;
    margin-top: 30px;
}

.add-note h3 {
    color: #f57f17;
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.add-note p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ========== 回到顶部按钮 ========== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: var(--accent);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 90;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    filter: brightness(0.9);
}

/* ========== 页脚 ========== */
.footer {
    background-color: var(--footer-bg);
    color: #ccc;
    text-align: center;
    padding: 20px;
    margin-top: auto;
    transition: background-color 0.4s ease;
}

.footer p {
    font-size: 0.9rem;
    margin: 3px 0;
}

/* ========== 表单提示消息 ========== */
.form-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.form-message.success {
    background-color: #e8f8f0;
    color: #27ae60;
    border: 1px solid #b2dfdb;
}

.form-message.error {
    background-color: #fdecea;
    color: #e74c3c;
    border: 1px solid #f5c6cb;
}

/* ========== 笔记列表 ========== */
.notes-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.note-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 20px;
    transition: all 0.2s;
    display: block;
}

.note-item:hover {
    border-color: #ccc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.note-title {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 5px;
}

.note-meta {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 10px;
}

.note-excerpt {
    color: #666;
    font-size: 0.95rem;
}

.note-content {
    line-height: 1.8;
}

/* ========== 分类卡片 ========== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.category-card {
    padding: 30px 20px;
    border-radius: 8px;
    text-align: center;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.category-name {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ========== 证书弹窗 ========== */
.cert-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.cert-modal.open {
    display: flex;
}

.cert-modal-content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
}

.cert-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    z-index: 10;
}

.cert-modal-close:hover {
    color: #e74c3c;
}

.cert-modal-title {
    text-align: center;
    margin-bottom: 15px;
    color: #2c3e50;
}

.cert-image-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.cert-image-wrapper img {
    max-width: 80vw;
    max-height: 70vh;
    display: block;
    border-radius: 4px;
}

.cert-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 2rem;
    color: rgba(0, 0, 0, 0.15);
    pointer-events: none;
    white-space: nowrap;
    letter-spacing: 8px;
    user-select: none;
}

.cert-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 5;
}

/* ========== 星空背景层 ========== */
.starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(180deg, #0b0e1a 0%, #1a1f35 50%, #2c3e50 100%);
    overflow: hidden;
    pointer-events: none;
    transition: background 0.5s ease;
}

.starfield::before,
.starfield::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-repeat: repeat;
    opacity: 0.8;
}

.starfield::before {
    background-image:
        radial-gradient(1px 1px at 20% 30%, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1px 1px at 70% 60%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 40% 80%, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(1px 1px at 90% 20%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 15% 70%, rgba(255, 255, 255, 0.2), transparent);
    background-size: 200px 200px;
    animation: twinkle 6s ease-in-out infinite alternate;
}

.starfield::after {
    background-image:
        radial-gradient(2px 2px at 50% 40%, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(2px 2px at 80% 75%, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(2px 2px at 30% 55%, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(2px 2px at 65% 15%, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(2px 2px at 10% 90%, rgba(255, 255, 255, 0.4), transparent);
    background-size: 350px 350px;
    animation: twinkle 8s ease-in-out infinite alternate-reverse;
}

@keyframes twinkle {
    0%   { opacity: 0.5; }
    50%  { opacity: 1; }
    100% { opacity: 0.6; }
}

/* ========== 流星 ========== */
.meteor {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6) 30%, transparent);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
    transform-origin: 0% 50%;
    animation-name: meteorShower;
    animation-timing-function: linear;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
}

@keyframes meteorShower {
    0% {
        opacity: 0;
        transform: translate(0, 0) rotate(-45deg) scaleX(1);
    }
    8% {
        opacity: 1;
        transform: translate(-35px, 35px) rotate(-45deg) scaleX(1);
    }
    100% {
        opacity: 0;
        transform: translate(-450px, 450px) rotate(-45deg) scaleX(0.08);
    }
}

/* ========== 主题背景（仅背景渐变，四区颜色由 JS 内联控制） ========== */

/* 季节主题下隐藏星星 */
body[data-theme="spring"] .starfield,
body[data-theme="summer"] .starfield,
body[data-theme="autumn"] .starfield,
body[data-theme="winter"] .starfield,
body[data-theme="minimal"] .starfield,
body[data-theme="dark"] .starfield {
    background: none;
}

body[data-theme="spring"] .starfield::before,
body[data-theme="spring"] .starfield::after,
body[data-theme="summer"] .starfield::before,
body[data-theme="summer"] .starfield::after,
body[data-theme="autumn"] .starfield::before,
body[data-theme="autumn"] .starfield::after,
body[data-theme="winter"] .starfield::before,
body[data-theme="winter"] .starfield::after,
body[data-theme="minimal"] .starfield::before,
body[data-theme="minimal"] .starfield::after,
body[data-theme="dark"] .starfield::before,
body[data-theme="dark"] .starfield::after {
    display: none;
}

body[data-theme="spring"] .starfield {
    background: linear-gradient(180deg, #e8ebe3 0%, #dde4d4 50%, #d0d9c4 100%);
}

body[data-theme="summer"] .starfield {
    background: linear-gradient(180deg, #003d33 0%, #00695c 50%, #00838f 100%);
}

body[data-theme="autumn"] .starfield {
    background: linear-gradient(180deg, #4e342e 0%, #6d4c41 50%, #a1887f 100%);
}

body[data-theme="winter"] .starfield {
    background: linear-gradient(180deg, #90a4ae 0%, #b0bec5 50%, #cfd8dc 100%);
}

body[data-theme="minimal"] .starfield {
    background: #ffffff;
}

body[data-theme="dark"] .starfield {
    background: #1a1a1a;
}

/* ========== 极简白主题细节 ========== */
body[data-theme="minimal"] .navbar {
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

body[data-theme="minimal"] .entry-header {
    border-bottom: 1px solid #e0e0e0;
}

body[data-theme="minimal"] .footer {
    border-top: 1px solid #e0e0e0;
}

/* ========== 头像防下载 ========== */
.avatar-wrapper {
    position: relative;
    display: inline-block;
    width: 150px;
    height: 200px;
    margin: 0 auto 20px;
    overflow: hidden;
    border-radius: 8px;
}

.avatar-wrapper .info-avatar-img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 0;
    border: none;
    box-shadow: none;
    pointer-events: none;
}

.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: transparent;
}

.avatar-watermark {
    position: absolute;
    bottom: 6px;
    right: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.7rem;
    letter-spacing: 2px;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    z-index: 3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* ========== Jupyter 笔记渲染样式 ========== */
.jupyter-md {
    margin-bottom: 20px;
}

.jupyter-md h1, .jupyter-md h2, .jupyter-md h3 {
    color: #2c3e50;
    margin: 20px 0 10px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 6px;
}

.jupyter-md p {
    margin-bottom: 12px;
    line-height: 1.8;
}

.jupyter-md code {
    background-color: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
    color: #e74c3c;
}

.jupyter-md pre {
    background-color: #f6f8fa;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 15px 0;
}

.jupyter-md pre code {
    background: none;
    color: #333;
    padding: 0;
}

.jupyter-code {
    margin: 20px 0;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.jupyter-code-header {
    background-color: #f0f0f0;
    padding: 6px 14px;
    font-size: 0.8rem;
    color: #666;
    font-family: 'Consolas', 'Monaco', monospace;
    border-bottom: 1px solid #e0e0e0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.jupyter-code pre {
    margin: 0;
    padding: 15px;
    background-color: #fafafa;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.jupyter-output {
    border-top: 1px dashed #e0e0e0;
    background-color: #f9f9f9;
}

.jupyter-output-label {
    padding: 6px 14px;
    font-size: 0.75rem;
    color: #999;
    font-family: 'Consolas', 'Monaco', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.jupyter-output-content {
    padding: 12px 15px;
    font-size: 0.9rem;
    color: #444;
    line-height: 1.6;
}

.jupyter-output-content p {
    margin-bottom: 8px;
}

.jupyter-output-content img {
    max-width: 100%;
    border-radius: 4px;
    margin: 8px 0;
    border: 1px solid #e0e0e0;
}

.jupyter-output-content pre {
    margin: 8px 0;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
}

.jupyter-cell-editor textarea {
    font-family: 'Consolas', 'Monaco', monospace;
    outline: none;
    resize: vertical;
}

.jupyter-cell-editor textarea:focus {
    border-color: #3498db;
}

/* ========== 编辑器内表格样式 ========== */
.ql-editor table,
.jupyter-cell-editor .ql-editor table {
    border-collapse: collapse;
    width: 100%;
    margin: 12px 0;
}

.ql-editor table td,
.ql-editor table th,
.jupyter-cell-editor .ql-editor table td,
.jupyter-cell-editor .ql-editor table th {
    border: 1px solid #ccc;
    padding: 6px 10px;
    min-width: 60px;
}

.ql-editor table th {
    background: #f0f0f0;
    font-weight: 600;
}

.ql-editor table td:focus,
.ql-editor table th:focus {
    outline: 2px solid #3498db;
    outline-offset: -2px;
}

/* Quill 缩进支持（展示页也生效） */
.ql-editor p[class*="ql-indent-1"],
.note-content p[class*="ql-indent-1"] { margin-left: 2em; }
.ql-editor p[class*="ql-indent-2"],
.note-content p[class*="ql-indent-2"] { margin-left: 4em; }
.ql-editor p[class*="ql-indent-3"],
.note-content p[class*="ql-indent-3"] { margin-left: 6em; }
.ql-editor p[class*="ql-indent-4"],
.note-content p[class*="ql-indent-4"] { margin-left: 8em; }

/* ========== 笔记内容响应式（移动端适配） ========== */
.note-content img,
.jupyter-md img,
.jupyter-output-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px 0;
    border-radius: 4px;
}

.note-content table,
.jupyter-md table {
    max-width: 100%;
    overflow-x: auto;
    display: block;
}

.note-content pre,
.jupyter-md pre {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre;
    word-wrap: normal;
}

.note-content,
.jupyter-md {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ========== 符号面板 ========== */
.symbol-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    padding: 8px 10px;
    background: #fafbfc;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.symbol-panel-label {
    color: #888;
    font-size: 0.8rem;
    margin-right: 4px;
}

.sym-btn {
    padding: 3px 8px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.2;
    min-width: 32px;
    transition: all 0.15s;
    font-family: "Times New Roman", "Cambria Math", serif;
}

.sym-btn:hover {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

/* KaTeX 公式（编辑器内） */
.math-tex {
    display: inline-block;
    padding: 0 4px;
    background: #f5f7fa;
    border-radius: 3px;
    color: #666;
    font-family: "Times New Roman", serif;
    font-size: 0.95em;
}

/* ========== 编辑器粘性工具栏 ========== */
.editor-sticky-tools {
    position: sticky;
    top: 62px;
    z-index: 40;
    background: #fff;
    padding: 8px 0 6px;
    margin-bottom: 6px;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.editor-sticky-tools + .ql-toolbar {
    position: sticky;
    z-index: 39;
    background: #fafafa;
    border-bottom: 1px solid #ccc;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.ql-container.ql-snow {
    overflow: visible;
}

/* ========== 首页项目列表 ========== */
.home-project-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0 10px;
}

.home-project-item {
    display: block;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.home-project-item:hover {
    border-color: #3498db;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.1);
    transform: translateX(3px);
}

.home-project-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.home-project-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.home-project-header h3 {
    font-size: 1.05rem;
    color: #2c3e50;
    margin: 0;
    font-weight: 600;
}

.home-project-item > p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.7;
    margin: 0 0 10px;
}

.home-project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.home-project-tags span {
    background-color: #eef4fb;
    color: #3498db;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .entry-layout {
        grid-template-columns: 1fr;
    }

    .entry-sidebar {
        position: static;
    }

    .entry-toc {
        order: -1;
    }

    .note-content,
    .jupyter-md {
        padding: 15px;
    }

    .note-content img,
    .jupyter-md img {
        max-width: 100%;
        margin: 8px 0;
    }

    .form-card {
        padding: 15px;
    }
}

/* ========== 错题集样式 ========== */

/* 错题列表 */
.mistake-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mistake-item {
    display: block;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #e74c3c;
    border-radius: 6px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.mistake-item.mastered {
    border-left-color: #27ae60;
    opacity: 0.85;
}

.mistake-item:hover {
    border-color: #ccc;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transform: translateX(4px);
}

.mistake-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.mistake-item-header h3 {
    font-size: 1.15rem;
    color: #2c3e50;
    margin: 0;
    font-weight: 600;
}

.mistake-item-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.badge-mastered {
    font-size: 0.75rem;
    color: #27ae60;
    background: #e8f8f0;
    padding: 2px 10px;
    border-radius: 10px;
}

.badge-unmastered {
    font-size: 0.75rem;
    color: #e74c3c;
    background: #fdecea;
    padding: 2px 10px;
    border-radius: 10px;
}

.badge-difficulty {
    font-size: 0.8rem;
    color: #f39c12;
    letter-spacing: 1px;
}

.mistake-item-preview {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.7;
    margin-bottom: 10px;
}

.mistake-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* 错题详情各区块 */
.mistake-section {
    margin-bottom: 25px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.mistake-section-label {
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}

.mistake-section-content {
    padding: 20px;
    background: #fff;
    font-size: 0.95rem;
    line-height: 1.85;
    color: #333;
}

.mistake-question .mistake-section-label { background: #3498db; }
.mistake-wrong .mistake-section-label { background: #e74c3c; }
.mistake-correct .mistake-section-label { background: #27ae60; }
.mistake-analysis .mistake-section-label { background: #f39c12; }

.mistake-section-content img {
    max-width: 100%;
    border-radius: 4px;
    margin: 10px 0;
}

/* ========== 学习页入口卡片 ========== */
.study-entry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.study-entry-card {
    display: block;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 35px 30px;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}

.study-entry-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #3498db;
    transition: width 0.3s;
}

.study-entry-card-mistake::before {
    background: #e74c3c;
}

.study-entry-card:hover {
    border-color: #ccc;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

.study-entry-card:hover::before {
    width: 6px;
}

.study-entry-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.study-entry-card h2 {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 12px;
    font-weight: 700;
}

.study-entry-desc {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.8;
    margin-bottom: 18px;
}

.study-entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 22px;
}

.study-entry-tags span {
    background: #eef4fb;
    color: #3498db;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 0.78rem;
}

.study-entry-card-mistake .study-entry-tags span {
    background: #fdecea;
    color: #e74c3c;
}

.study-entry-btn {
    display: inline-block;
    font-size: 0.92rem;
    font-weight: 600;
    color: #3498db;
    transition: all 0.2s;
}

.study-entry-card-mistake .study-entry-btn {
    color: #e74c3c;
}

.study-entry-card:hover .study-entry-btn {
    transform: translateX(5px);
}

/* 手机端 */
@media (max-width: 768px) {
    .study-entry-grid {
        grid-template-columns: 1fr;
    }
    .study-entry-card {
        padding: 25px 22px;
    }
}

/* ========== 统计卡片 ========== */
.gamer-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.gamer-stat-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 22px 20px;
    text-align: center;
    transition: all 0.2s;
}

.gamer-stat-card:hover {
    border-color: #3498db;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.1);
}

.gamer-stat-card .stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #3498db;
    display: block;
    margin-bottom: 6px;
    line-height: 1.2;
}

.gamer-stat-card .stat-label {
    font-size: 0.85rem;
    color: #888;
    display: block;
}

/* 手机端 */
@media (max-width: 768px) {
    .gamer-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========== 时段色调叠加 ========== */

/* 早晨：暖金色调（往黄橙方向偏移） */
body[data-time="morning"] .starfield {
    filter: sepia(0.35) brightness(1.06) hue-rotate(-8deg) saturate(1.15);
}
body[data-time="morning"] #seasonCanvas {
    filter: sepia(0.4) brightness(1.1) hue-rotate(-10deg) saturate(1.1);
}

/* 中午：明亮清透（增亮 + 微微饱和） */
body[data-time="noon"] .starfield {
    filter: brightness(1.1) saturate(1.05);
}
body[data-time="noon"] #seasonCanvas {
    filter: brightness(1.15) saturate(1.1);
}

/* 下午：无额外滤镜（原季节色） */
body[data-time="afternoon"] .starfield {
    filter: none;
}
body[data-time="afternoon"] #seasonCanvas {
    filter: none;
}

/* 夜晚：无滤镜（星空原样） */
body[data-time="night"] .starfield {
    filter: none;
}

/* ============================================
   横向时间轴（卡片式）
   —— 移动端横向滑动的关键约定：
   1. 滚动容器（.htimeline-wrap）不要加 transform / contain，
      否则会破坏原生惯性滚动。
   2. 只给卡片本身 translateZ(0)，提升渲染层，
      避免屏幕外卡片在滚动中不渲染。
   3. 卡片不要 overflow: hidden，否则会裁掉顶部小三角，
      同时在某些移动端浏览器上触发"跳过渲染"。
   ============================================ */

/* ---- 滚动容器 ---- */
.htimeline-wrap {
    margin: 22px 0 30px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: #c8d8ea transparent;
}

.htimeline-wrap::-webkit-scrollbar {
    height: 6px;
}
.htimeline-wrap::-webkit-scrollbar-thumb {
    background: #c8d8ea;
    border-radius: 3px;
}

/* ---- 主轴 ---- */
.htimeline {
    display: flex;
    align-items: stretch;
    position: relative;
    padding: 6px 8px 0;
    gap: 16px;
    min-width: 100%;
}

/* 主线：加粗的渐变虚线（默认蓝色，具体颜色由模块变量覆盖） */
.htimeline::before {
    content: '';
    position: absolute;
    top: 13px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: linear-gradient(90deg,
        rgba(52, 152, 219, 0.15) 0%,
        rgba(52, 152, 219, 0.5) 50%,
        rgba(52, 152, 219, 0.15) 100%);
    border-radius: 1px;
    z-index: 0;
}

/* ---- 每个节点 ---- */
.htimeline-item {
    position: relative;
    flex: 1 1 0;
    min-width: 155px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
}

/* ---- 圆点 ---- */
.htimeline-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #3498db;
    box-shadow:
        0 0 0 4px rgba(52, 152, 219, 0.12),
        0 2px 6px rgba(52, 152, 219, 0.2);
    margin-bottom: 12px;
    flex-shrink: 0;
    transition: all 0.3s;
}

/* ---- 卡片 ---- */
.htimeline-card {
    background: #fff;
    border: 1px solid #e8eef5;
    border-radius: 10px;
    padding: 14px 16px;
    width: 100%;
    text-align: center;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.06);
    position: relative;

    /* 只过渡具体属性，避免过渡 transform 造成合成层抖动 */
    transition:
        transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.28s ease,
        box-shadow 0.28s ease;

    /* 提升为独立渲染层：修复移动端滚动时屏幕外卡片不渲染 */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* 卡片上方的小三角（指向圆点） */
.htimeline-card::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: #fff;
    border-left: 1px solid #e8eef5;
    border-top: 1px solid #e8eef5;
}

.htimeline-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 10px 10px 0 0;
    background: #3498db;

    /* ↓↓↓ 新增：强制与卡片主体在同一合成层体系 ↓↓↓ */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* ---- 卡片内文字 ---- */
.htimeline-year {
    font-size: 0.82rem;
    font-weight: 700;
    color: #3498db;
    font-family: 'Consolas', 'Monaco', monospace;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.htimeline-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 6px;
    line-height: 1.4;
}

.htimeline-desc {
    font-size: 0.78rem;
    color: #888;
    line-height: 1.5;
}

/* ---- 悬停：卡片浮起，圆点发光 ---- */
/* ---- 悬停：卡片微微浮起 + 光晕加强 ---- */

/* 1. 让被 hover 的节点整体提升，避免浮起后被相邻卡片压住 */
.htimeline-item:hover,
.htimeline-item:focus-within {
    z-index: 10;
}

/* 2. 卡片浮起：位移 + 微缩放 + 光晕 */
.htimeline-item:hover .htimeline-card,
.htimeline-item:focus-within .htimeline-card {
    /* 保留 translateZ(0) 维持合成层，再叠加浮起位移与微缩放 */
    transform: translateZ(0) translateY(-6px) scale(1.02);

    /* 光晕加强：多层阴影叠加，颜色跟随模块变量 */
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--tl-color, #3498db) 25%, transparent),
        0 10px 24px color-mix(in srgb, var(--tl-color, #3498db) 22%, transparent),
        0 4px 10px rgba(0, 0, 0, 0.08);
}

/* 3. 圆点同步发光（原有规则保留即可，这里不再重复） */
.htimeline-item:hover .htimeline-dot {
    background: #3498db;
    box-shadow:
        0 0 0 5px rgba(52, 152, 219, 0.2),
        0 2px 10px rgba(52, 152, 219, 0.4);
}

/* ---- 当前/高亮节点 ---- */
.htimeline-item.htimeline-current .htimeline-dot {
    background: #3498db;
    border-color: #2980b9;
    box-shadow:
        0 0 0 5px rgba(52, 152, 219, 0.2),
        0 2px 10px rgba(52, 152, 219, 0.4);
}

.htimeline-item.htimeline-current .htimeline-card {
    border-color: #b8d4f0;
    background: linear-gradient(135deg, #f8fcff 0%, #ffffff 100%);
}

.htimeline-item.htimeline-current .htimeline-year {
    color: #2980b9;
}

/* ---- 手机端 ---- */
@media (max-width: 768px) {
    .htimeline {
        padding: 6px 4px 0;
        gap: 10px;
    }
    .htimeline::before {
        left: 20px;
        right: 20px;
    }
    .htimeline-item {
        min-width: 130px;
    }
    .htimeline-card {
        padding: 10px 12px;
    }
    .htimeline-year {
        font-size: 0.75rem;
    }
    .htimeline-title {
        font-size: 0.82rem;
    }
    .htimeline-desc {
        font-size: 0.72rem;
    }
}

/* ============================================
   横向时间轴 · 按模块分配颜色变量
   ============================================ */

.htimeline-edu   { --tl-color: #3498db; --tl-color-soft: rgba(52, 152, 219, 0.5);  --tl-color-fade: rgba(52, 152, 219, 0.15); }
.htimeline-act   { --tl-color: #27ae60; --tl-color-soft: rgba(39, 174, 96, 0.5);   --tl-color-fade: rgba(39, 174, 96, 0.15); }
.htimeline-comp  { --tl-color: #9b59b6; --tl-color-soft: rgba(155, 89, 182, 0.5);  --tl-color-fade: rgba(155, 89, 182, 0.15); }
.htimeline-honor { --tl-color: #f39c12; --tl-color-soft: rgba(243, 156, 18, 0.5);  --tl-color-fade: rgba(243, 156, 18, 0.15); }

/* ---- 主线颜色跟随模块 ---- */
.htimeline-edu   .htimeline::before,
.htimeline-act   .htimeline::before,
.htimeline-comp  .htimeline::before,
.htimeline-honor .htimeline::before {
    background: linear-gradient(90deg,
        var(--tl-color-fade) 0%,
        var(--tl-color-soft) 50%,
        var(--tl-color-fade) 100%);
}

/* ---- 圆点边框跟随模块 ---- */
.htimeline-edu   .htimeline-dot,
.htimeline-act   .htimeline-dot,
.htimeline-comp  .htimeline-dot,
.htimeline-honor .htimeline-dot {
    border-color: var(--tl-color);
    box-shadow:
        0 0 0 4px color-mix(in srgb, var(--tl-color) 12%, transparent),
        0 2px 6px color-mix(in srgb, var(--tl-color) 20%, transparent);
}

/* ---- 圆点悬停填充跟随模块 ---- */
.htimeline-edu   .htimeline-item:hover .htimeline-dot,
.htimeline-act   .htimeline-item:hover .htimeline-dot,
.htimeline-comp  .htimeline-item:hover .htimeline-dot,
.htimeline-honor .htimeline-item:hover .htimeline-dot {
    background: var(--tl-color);
    border-color: var(--tl-color);
    box-shadow:
        0 0 0 5px color-mix(in srgb, var(--tl-color) 20%, transparent),
        0 2px 10px color-mix(in srgb, var(--tl-color) 40%, transparent);
}

/* ---- 当前节点圆点跟随模块 ---- */
.htimeline-edu   .htimeline-item.htimeline-current .htimeline-dot,
.htimeline-act   .htimeline-item.htimeline-current .htimeline-dot,
.htimeline-comp  .htimeline-item.htimeline-current .htimeline-dot,
.htimeline-honor .htimeline-item.htimeline-current .htimeline-dot {
    background: var(--tl-color);
    border-color: var(--tl-color);
    box-shadow:
        0 0 0 5px color-mix(in srgb, var(--tl-color) 20%, transparent),
        0 2px 10px color-mix(in srgb, var(--tl-color) 40%, transparent);
}

/* ---- 年份文字跟随模块 ---- */
.htimeline-edu   .htimeline-year,
.htimeline-act   .htimeline-year,
.htimeline-comp  .htimeline-year,
.htimeline-honor .htimeline-year {
    color: var(--tl-color);
}

/* ---- 卡片顶部色带跟随模块 ---- */
.htimeline-edu   .htimeline-card::after {
    background: linear-gradient(90deg, #3498db, #5dade2);
}
.htimeline-act   .htimeline-card::after {
    background: linear-gradient(90deg, #27ae60, #52be80);
}
.htimeline-comp  .htimeline-card::after {
    background: linear-gradient(90deg, #9b59b6, #bb8fce);
}
.htimeline-honor .htimeline-card::after {
    background: linear-gradient(90deg, #f39c12, #f8c471);
}

/* ---- 悬停时边框颜色跟随模块（覆盖通用 hover 的蓝色边框） ---- */
.htimeline-edu   .htimeline-item:hover .htimeline-card { border-color: #a9cce3; }
.htimeline-act   .htimeline-item:hover .htimeline-card { border-color: #a9dfbf; }
.htimeline-comp  .htimeline-item:hover .htimeline-card { border-color: #d2b4de; }
.htimeline-honor .htimeline-item:hover .htimeline-card { border-color: #fad7a0; }

/* 滚动期间给卡片提升渲染优先级（配合 JS 的 is-scrolling 类） */
.htimeline-wrap.is-scrolling .htimeline-card {
    will-change: transform;
}

/* ============================================
   移动端：横向时间轴 → 纵向时间轴
   —— 彻底绕开 overflow-x 容器"屏幕外不渲染"的问题
   ============================================ */
@media (max-width: 768px) {

    /* 1. 取消横向滚动，让内容自然撑开高度 */
    .htimeline-wrap {
        overflow: visible;
        padding-bottom: 0;
        margin: 22px 0 30px;
    }

    /* 2. 主轴改为纵向 */
    .htimeline {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0 0 0 32px;   /* 左侧留给主线和圆点 */
        min-width: 0;
    }

    /* 3. 主线：从横线改成竖线，贯穿整个列表 */
    .htimeline::before {
        top: 8px;
        bottom: 8px;
        left: 7px;              /* 圆点中心 = padding-left 32px 内圆的中心 */
        right: auto;
        width: 2px;
        height: auto;
        background: linear-gradient(180deg,
            var(--tl-color-fade) 0%,
            var(--tl-color-soft) 50%,
            var(--tl-color-fade) 100%);
    }

    /* 4. 每个节点：改成"圆点 + 卡片"横向并排，整体纵向堆叠 */
    .htimeline-item {
        flex: 0 0 auto;
        min-width: 0;
        flex-direction: row;
        align-items: flex-start;
        gap: 14px;
        padding: 0 0 22px 0;
    }
    .htimeline-item:last-child {
        padding-bottom: 0;
    }

    /* 5. 圆点：脱离主轴，定位到左侧竖线上 */
    .htimeline-dot {
        position: absolute;
        left: 0;
        top: 16px;
        margin-bottom: 0;
    }

    /* 6. 卡片：占满剩余宽度，左对齐 */
    .htimeline-card {
        flex: 1 1 auto;
        width: auto;
        text-align: left;
        padding: 14px 16px;
        margin-left: 22px;      /* 给圆点让出位置 */
    }

    /* 7. 小三角：从"指向上"改成"指向左" */
    .htimeline-card::before {
        top: 18px;
        left: -6px;
        transform: rotate(-45deg);
        border-left: 1px solid #e8eef5;
        border-top: 1px solid #e8eef5;
        border-right: none;
        border-bottom: none;
    }

    /* 8. 顶部色带：改成左侧竖色带 */
    .htimeline-card::after {
        top: 0;
        bottom: 0;
        left: 0;
        right: auto;
        width: 3px;
        height: auto;
        border-radius: 10px 0 0 10px;
    }

    /* 9. 字号恢复成正常大小（原来因为空间紧张改小了） */
    .htimeline-year   { font-size: 0.82rem; }
    .htimeline-title  { font-size: 0.98rem; }
    .htimeline-desc   { font-size: 0.85rem; }
}

/* 悬停浮起层：只负责位移，不干涉内层 3D 变换 */
.business-card-hover {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform;
}

.business-card-stage:hover .business-card-hover {
    transform: translateY(-8px) scale(1.02);
}

/* 配合阴影加强，让浮起更真实 */
.business-card-stage:hover .card-face {
    box-shadow:
        0 20px 60px rgba(52, 152, 219, 0.35),
        0 8px 20px rgba(0, 0, 0, 0.2);
}