@charset "utf-8";
/* ==========================================================
   平滑卡片风主题 · 与功能优势卡片统一
   主色 #4361ee / 深色 #3f37c9 / 深文字 #1f2d50 / 次文字 #7a8699
   卡片：白底 + 1px 浅描边 + 14px 大圆角 + 柔和阴影，无左侧竖条
   ========================================================== */

/* ========== 全局背景（柔和渐变） ========== */
body {
    background: linear-gradient(180deg, #f6f8fc 0%, #eef1f8 100%) fixed;
    color: #3d4759;
}

/* ========== 欢迎横幅 ========== */
.welcome-banner {
    background: linear-gradient(135deg, #5b74f2, #3f37c9);
    border-radius: 14px;
}

/* ========== 栏目横幅 ========== */
.category-banner {
    background: linear-gradient(135deg, #eef2ff, #f5f0ff);
    color: #4361ee;
    border: none;
    border-radius: 14px;
}
.category-banner h2 {
    color: #3f37c9;
    margin-bottom: 5px;
}
.category-banner.overflow-hidden {
    border: none;
}

/* ========== 主内容卡片 ========== */
.main-content-card {
    border-radius: 14px !important;
    border: 1px solid #eceff6 !important;
    box-shadow: 0 2px 14px rgba(31, 45, 80, 0.05) !important;
}

/* ========== 栏目标题（简洁无装饰） ========== */
.main-content-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1f2d50;
    padding-bottom: 12px;
    margin-bottom: 18px;
    border-bottom: 1px solid #f0f2f8;
}

/* ========== 文章卡片（紧凑版，平滑无描边） ========== */
.compact-card {
    padding: 14px 16px !important;
    border: 1px solid #f0f2f8 !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    transition: all 0.25s ease;
}
.compact-card:hover {
    border-color: #dde5fb !important;
    box-shadow: 0 6px 18px rgba(67, 97, 238, 0.09) !important;
    transform: translateY(-2px);
}
.compact-card .article-title a {
    font-size: 1rem;
    font-weight: 600;
    color: #4361ee;
}
.compact-card .article-meta {
    line-height: 1.4;
    color: #98a2b3;
}
.compact-card .article-excerpt {
    margin-top: 5px;
    line-height: 1.5;
    color: #7a8699;
}

/* ========== 侧边栏卡片 ========== */
.sidebar-card {
    border-radius: 14px !important;
    border: 1px solid #eceff6 !important;
    background: #fff;
    box-shadow: 0 2px 14px rgba(31, 45, 80, 0.05) !important;
}
.sidebar-card h5 {
    font-weight: 700;
    color: #1f2d50;
    border-bottom: 1px solid #f0f2f8;
    padding-bottom: 8px;
    margin-bottom: 12px;
}
.sidebar-card ul,
.sidebar-card ol {
    padding-left: 20px;
}
.sidebar-card li {
    margin-bottom: 6px;
}

/* ========== 用户信息卡片 ========== */
.user-info-card {
    border-radius: 14px !important;
    border: 1px solid #eceff6 !important;
    background: linear-gradient(135deg, #fafbff, #f4f6ff);
}
.user-info-card svg {
    opacity: 0.65;
}

/* ========== 链接和按钮 ========== */
a {
    color: #4361ee;
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: #3f37c9;
    text-decoration: none;
}
.navbar-dark.bg-primary {
    background: linear-gradient(135deg, #5b74f2, #3f37c9) !important;
}
.btn-primary {
    background: linear-gradient(135deg, #5b74f2, #3f37c9);
    border: none;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(67, 97, 238, 0.22);
}
.btn-outline-primary {
    color: #4361ee;
    border: 1px solid #dde5fb;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.btn-outline-primary:hover {
    background: #4361ee;
    border-color: #4361ee;
}

/* ========== 文章正文 ========== */
.article-content {
    background: #fbfcfe;
    border: 1px solid #f0f2f8;
    border-radius: 12px;
    line-height: 1.9;
    font-size: 16px;
}

/* ========== 文章正文：图片/代码块/表格不越界 ========== */
.article-content img {
    max-width: 100%;
    height: auto;
}
.article-content pre,
.article-content .code-block {
    overflow-x: auto;
    max-width: 100%;
}
.article-content table {
    max-width: 100%;
    display: block;
    overflow-x: auto;
}

/* ========== 评论项 ========== */
.comment-item {
    background: #fbfcfe;
    border: 1px solid #f0f2f8 !important;
    border-radius: 12px;
}

/* ========== 分页（圆角胶囊） ========== */
.page-link {
    color: #4361ee;
    border: none !important;
    border-radius: 8px !important;
    margin: 0 2px;
    font-weight: 500;
}
.page-link:hover {
    color: #3f37c9;
    background: #eef2ff;
}
.page-item.active .page-link {
    background: linear-gradient(135deg, #5b74f2, #3f37c9);
    color: #fff;
}
.page-item.disabled .page-link {
    background: transparent;
    color: #b9c1d0;
}

/* ========== 视频相关 ========== */
.card {
    border: 1px solid #eceff6;
    border-radius: 14px;
}
.card:hover {
    box-shadow: 0 8px 22px rgba(67, 97, 238, 0.10);
}
.ratio-16x9 {
    margin-bottom: 15px;
}
.video-banner {
    border: none;
    background-size: cover;
    background-position: center;
    position: relative;
}
.video-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border-radius: 14px !important;
}
.video-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(67, 97, 238, 0.12) !important;
}
.video-play-banner {
    background: linear-gradient(135deg, #eef2ff, #f3e8ff);
    color: #4361ee;
    padding: 20px;
    border-radius: 14px;
    margin-bottom: 20px;
}

/* ========== 代码块容器与复制按钮 ========== */
.code-block-wrapper {
    position: relative;
    margin-bottom: 15px;
    border-radius: 12px;
    overflow: hidden;
}
.code-copy-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 10;
    background: rgba(67, 97, 238, 0.85);
    color: #fff;
    border: none;
    padding: 2px 10px;
    cursor: pointer;
    font-size: 12px;
    border-radius: 6px;
    opacity: 0.85;
}
.code-copy-btn:hover {
    opacity: 1;
}

/* ========== 易语言代码高亮（hljs 实际输出的类名） ========== */
.hljs-e-dotcmd { color: #e6c07b; }      /* 点命令 */
.hljs-type     { color: #56b6c2; }      /* 数据类型 */
.hljs-built_in { color: #61afef; }      /* 内置函数 */
.hljs-keyword  { color: #c678dd; }      /* 关键字 */
.hljs-e-const  { color: #d19a66; }      /* 常量 (#开头) */
.hljs-comment  { color: #7f848e; font-style: italic; } /* 注释 */

/* ========== 视频播放页美化 ========== */
.video-play-container {
    max-width: 900px;
    margin: 0 auto;
}

/* 标题信息卡片 */
.video-info-card {
    background: linear-gradient(135deg, #fafbff, #f4f6ff);
    border: 1px solid #eceff6 !important;
    border-radius: 14px;
}
.video-info-card .video-title {
    margin-bottom: 0;
    font-weight: 700;
    color: #1f2d50;
}

/* 视频简介卡片 */
.video-desc-card {
    background: #fff;
    border: 1px solid #eceff6 !important;
    border-radius: 14px;
}
.desc-title {
    font-weight: 700;
    color: #1f2d50;
    border-bottom: 1px solid #f0f2f8;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

/* 评论卡片 */
.video-comments-card {
    background: #fff;
    border: 1px solid #eceff6 !important;
    border-radius: 14px;
}
.comments-title {
    font-weight: 700;
    color: #1f2d50;
    border-bottom: 1px solid #f0f2f8;
    padding-bottom: 8px;
    margin-bottom: 20px;
}

/* 单个评论项 */
.comment-item {
    background: #fbfcfe;
    border: 1px solid #f0f2f8 !important;
}

/* 返回按钮间距 */
.video-play-container .btn-secondary {
    margin-top: 10px;
    border-radius: 8px;
}

/* 自定义横幅 */
.custom-banner {
    color: inherit;
    border-radius: 14px;
}
.custom-banner h2, .custom-banner p {
    color: inherit;
}

/* 跑马灯公告（柔和胶囊条） */
.notice-bar {
    background: linear-gradient(135deg, #eef2ff, #f8f5ff);
    border: 1px solid #e4e9fb;
    border-radius: 24px;
    padding: 8px 18px;
}
.notice-bar marquee {
    line-height: 1.8;
}
.notice-icon {
    margin-right: 6px;
}

.sidebar-card.no-border-dashed {
    border: 1px dashed #dde5fb !important;
}

/* ========== 首页横幅（按 1116×253 等比完整显示） ========== */
.home-banner {
    position: relative;
    background: #0b1220;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(31, 45, 80, 0.12);
    line-height: 0;
}
.home-banner-img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1116 / 253;
    object-fit: cover;
    object-position: center;
}
.home-banner-text {
    position: absolute;
    left: 16px;
    bottom: 14px;
    max-width: 90%;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(11, 18, 32, 0.5);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 15px;
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.home-banner-text h2,
.home-banner-text p {
    color: #fff;
    margin: 0;
}

/* ========== 首页幻灯片轮播（多图，按 1116×253 等比铺满） ========== */
.home-carousel {
    background: #0b1220;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(31, 45, 80, 0.12);
}
.home-carousel .carousel-item img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1116 / 253;
    object-fit: cover;
    object-position: center;
}
.home-carousel .carousel-indicators {
    margin-bottom: 0.55rem;
}
.home-carousel .carousel-indicators [data-bs-target] {
    width: 26px;
    height: 4px;
    margin: 0 4px;
    border: 0;
    border-radius: 2px;
    background-color: rgba(255, 255, 255, 0.55);
    opacity: 1;
}
.home-carousel .carousel-indicators .active {
    background-color: #fff;
}
.home-carousel .carousel-control-prev-icon,
.home-carousel .carousel-control-next-icon {
    width: 1.8rem;
    height: 1.8rem;
}
