/* ================= 全局基础设置 ================= */
body {
    margin: 0;
    padding: 0;
    padding-bottom: 60px;
    background-color: #FFF6D9; /* 奶黄色背景 */
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    color: #000;
    overflow-x: hidden; 
    
    /* 让底部备案始终在最底下 */
    display: flex;
    flex-direction: column;
    min-height: 100vh; 
}

a {
    text-decoration: none;
    color: #000;
}

/* ================= 顶部导航栏 ================= */
.topbar {
    position: sticky;
    top: 0;
    z-index: 999;
    
    background-color: #000000; 
    padding: 10px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15); 
}

.topbar .logo {
    height: 45px;
    width: auto; 
    margin-right: 30px; 
}

.nav-links {
    position: relative;
    display: flex;
    gap: 40px;
}

.nav-link {
    color: #FFFFFF;
    font-size: 16px;
    font-weight: bold;
    padding: 10px 0;
    position: relative;
    z-index: 2;
    cursor: pointer;
    transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: #FF9800; 
}

.nav-indicator {
    position: absolute;
    bottom: -2px;
    left: 0;
    height: 4px;
    background-color: #FF9800; 
    border-radius: 2px;
    z-index: 1;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); 
}


/* ================= 主页主体内容 ================= */
.home-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    text-align: center;
    flex: 1; 
}

.typewriter-container {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 15px;
    height: 60px; 
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.cursor {
    display: inline-block;
    width: 30px; 
    height: 6px; 
    background-color: #000;
    margin-left: 5px;
    margin-bottom: 8px; 
    animation: blink 0.8s infinite; 
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.bilibili-btn {
    display: inline-block;
    background-color: #FB7299;
    color: #FFF;
    font-size: 18px;
    font-weight: bold;
    padding: 10px 25px;
    border-radius: 30px;
    margin-bottom: 50px;
    transition: transform 0.2s;
}

.bilibili-btn:hover {
    transform: scale(1.05);
}


/* ================= 视频滚动区域 ================= */
.video-section-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 20px;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 900px;
    padding: 0 10px;
    box-sizing: border-box;
}

.scroll-btn {
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: 2px solid #000; 
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 18px;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.scroll-btn:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1); 
}

.scroll-btn.left { left: -10px; }
.scroll-btn.right { right: -10px; }

.carousel-container {
    width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    display: flex;
    gap: 20px;
    padding: 25px 40px; 
    background-color: #FFFDF5; 
    border: 3px solid #000; 
    border-radius: 20px; 
    box-shadow: 4px 4px 0px rgba(0,0,0,0.1); 
    scroll-behavior: smooth; 
    scrollbar-width: none;
    height: 320px;
    align-items: flex-start;
}
.carousel-container::-webkit-scrollbar {
    display: none; 
}

/* 封面外层容器：强制16:9占位，图片坏了也不会塌 */
.cover-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #e8e8e8; 
    border-bottom: 2px solid #222;
    overflow: hidden;
}

.video-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-card {
    min-width: 240px;
    max-width: 240px;
    flex: 0 0 240px;
    height: 100%;
    box-sizing: border-box;
    background-color: #FFF;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #222;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;

    display: flex;
    flex-direction: column;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.video-title {
    font-size: 15px;
    font-weight: bold;
    padding: 12px;
    margin: 0;
    flex-shrink: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* ================= 【新增】解决方案页面 (第二页专属) ================= */
.solutions-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    flex: 1; /* 撑满中间，把底部挤下去 */
}

.solutions-header {
    text-align: center;
    margin-bottom: 40px;
    margin-top: 20px;
}

.solutions-header h1 {
    font-size: 32px;
    font-weight: 900;
    margin: 0 0 10px 0;
}

.solutions-header p {
    color: #666;
    margin: 0;
}

/* 卡片网格布局，响应式魔法 */
.solutions-grid {
    display: grid;
    /* 核心魔法：屏幕宽排3列，屏幕窄排2列，手机排1列 */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    width: 100%;
    max-width: 1000px;
    box-sizing: border-box;
    margin-bottom: 40px;
}

/* 单个解决方案卡片 */
.solution-card {
    background-color: #FFF;
    border: 3px solid #000; /* 漫画风粗黑边框 */
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    text-align: left;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.1);
    transition: all 0.2s;
    cursor: pointer;
}

.solution-card:hover {
    transform: translateY(-5px);
    box-shadow: 6px 6px 0px rgba(0,0,0,0.2);
}

/* 标签样式 */
.solution-tag {
    display: inline-block;
    align-self: flex-start;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
    color: #FFF;
}
/* 给不同类别的标签设定不同的颜色 */
.solution-tag.system { background-color: #2196F3; } 
.solution-tag.software { background-color: #9C27B0; } 
.solution-tag.hardware { background-color: #F44336; } 
.solution-tag.network { background-color: #4CAF50; }  

.solution-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.solution-desc {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin: 0;
    flex: 1; /* 让描述文字占据剩余空间，把日期挤到底部 */
}

.solution-date {
    font-size: 12px;
    color: #999;
    margin-top: 15px;
    text-align: right;
    font-family: monospace; 
}


/* ================= 底部备案 ================= */
.footer {
    position: fixed; /* 绝对固定在窗口上 */
    bottom: 0;       /* 距离底部 0 像素 */
    left: 0;
    width: 100%;     /* 撑满整个宽度 */
    text-align: center;
    padding: 15px 0;
    font-size: 13px;
    color: #666;
    background-color: rgba(255, 246, 217, 0.9); /* 加上半透明的奶黄底色，防止文字看不清 */
    backdrop-filter: blur(5px); /* 背景加上一点毛玻璃模糊效果，高级感拉满 */
    z-index: 100;    /* 保证它在最上层，不被视频卡片遮挡 */
}

/* ================= 文章详情页专属样式 ================= */
.article-wrapper {
    max-width: 850px;
    margin: 0 auto;
    padding: 30px 20px;
    flex: 1; 
    width: 100%;
    box-sizing: border-box;
}

/* 漫画风的返回按钮 */
.back-btn {
    display: inline-block;
    margin-bottom: 20px;
    font-size: 15px;
    font-weight: bold;
    color: #000;
    background: #fff;
    border: 2px solid #000;
    padding: 8px 16px;
    border-radius: 8px;
    box-shadow: 2px 2px 0px rgba(0,0,0,1);
    transition: all 0.2s;
}
.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 4px 4px 0px rgba(0,0,0,1);
}

/* 文章正文的白板框框 */
.markdown-body {
    background: #fff;
    padding: 40px;
    border: 3px solid #000;
    border-radius: 16px;
    box-shadow: 6px 6px 0px rgba(0,0,0,0.1);
    line-height: 1.8;
    font-size: 16px;
    color: #333;
    word-wrap: break-word;
}

/* ================= Markdown 排版美化 ================= */
.markdown-body h1, .markdown-body h2, .markdown-body h3 {
    color: #000;
    border-bottom: 2px dashed #eee;
    padding-bottom: 10px;
    margin-top: 1.5em;
    font-weight: 900;
}
.markdown-body p { margin-bottom: 1em; }

/* 代码高亮效果 */
.markdown-body code {
    background-color: #f6f8fa;
    padding: 3px 6px;
    border-radius: 4px;
    font-family: monospace;
    color: #e83e8c;
    border: 1px solid #ddd;
}
.markdown-body pre {
    background-color: #282c34;
    color: #abb2bf;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
}
.markdown-body pre code {
    background: transparent;
    border: none;
    color: inherit;
    padding: 0;
}

/* 引用框效果 */
.markdown-body blockquote {
    border-left: 5px solid #FF9800;
    margin: 0 0 1em 0;
    color: #666;
    background: #fff9f0;
    padding: 15px;
    border-radius: 0 8px 8px 0;
}
.markdown-body img {
    max-width: 90%; /* 把这里改成你喜欢的比例，比如 60% 或者 500px */
    border-radius: 8px;
    border: 2px solid #ddd;
    display: block;  /* 下面这两行是为了让缩小的图片居中显示 */
    margin: 0 auto; 
}

/* 手机端的时候，图片还是放大一点好看，所以加上这句保护 */
@media (max-width: 768px) {
    .markdown-body img { max-width: 100%; }
}




/* ================= 高级设备适配 (判断手机/电脑) ================= */
@media (max-width: 768px) {
    .topbar {
        flex-direction: column; 
        gap: 10px;
    }
    .topbar .logo {
        margin-right: 0;
    }
    .typewriter-container {
        font-size: 36px; 
        height: 50px;
    }
    .cursor {
        width: 22px; 
        height: 5px; 
        margin-bottom: 5px; 
    }
    .carousel-container {
        display: flex;
        overflow-x: auto;
        gap: 20px;
        padding: 20px 30px;
        height: 300px;
        align-items: flex-start;
    }
    .video-card {
        flex: 0 0 auto;    
        width: 240px;      
    }
    .empty-tip {
        width: 100%;
        text-align: center;
        padding: 60px 0;
        font-size: 18px;
        color: #999;
        letter-spacing: 2px;
        background: #f9f9f9;
        border-radius: 12px;
    }
    /* 第二页手机端标题微调 */
    .solutions-header h1 {
        font-size: 26px;
    }
}

@media (hover: none) and (pointer: coarse) {
    .scroll-btn {
        display: none; 
    }
}

/* ================= 搜索框样式 ================= */
.search-container {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    width: 100%;
}

#searchInput {
    width: 100%;
    max-width: 500px; /* 搜索框最大宽度 */
    padding: 12px 20px;
    font-size: 16px;
    border: 3px solid #000; /* 漫画风粗边框 */
    border-radius: 30px;    /* 胶囊形状 */
    outline: none;
    transition: all 0.3s;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.1);
    font-family: inherit; /* 字体和网页保持一致 */
}

/* 鼠标点进去准备打字时的动画效果 */
#searchInput:focus {
    border-color: #FF9800; /* 边框变亮橙色 */
    box-shadow: 4px 4px 0px rgba(255,152,0,0.3);
    transform: translateY(-2px);
}
