/* ============================================================
   1. 核心变量与基础重置
   ============================================================ */
:root {
    --sidebar-width: 240px;
    --primary-color: #ff5c7c;
    --bg-color: #f8f9fa;
    --text-main: #333;
    --text-muted: #888;
}

* { box-sizing: border-box; }

body { 
    margin: 0; 
    background: var(--bg-color); 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
    color: var(--text-main);
    line-height: 1.5;
}

#app { display: flex; width: 100%; min-height: 100vh; }

/* ============================================================
   2. 左侧导航栏 (Sidebar)
   ============================================================ */
#sidebar {
    width: var(--sidebar-width);
    background: #fff;
    border-right: 1px solid #eee;
    height: 100vh;
    position: fixed;
    left: 0; top: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-logo {
    padding: 25px 20px;
    font-size: 22px;
    font-weight: bold;
    color: var(--primary-color);
    flex-shrink: 0;
    border-bottom: 1px solid #f9f9f9;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 0;
}

/* 导航链接样式 */
.sidebar-nav ul, .widget-list { list-style: none; padding: 0; margin: 0; }
.sidebar-nav li a, .widget-list li a {
    display: block;
    padding: 12px 25px;
    color: #555;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-nav li a:hover, .widget-list li a:hover {
    background: #fff0f3;
    color: var(--primary-color);
}

/* 侧边栏页脚 */
.sidebar-footer {
    padding: 15px 20px;
    font-size: 12px;
    color: #bbb;
    border-top: 1px solid #f9f9f9;
    flex-shrink: 0;
}

/* 滚动条美化 */
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: #eee; border-radius: 10px; }
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: var(--primary-color); }

/* ============================================================
   3. 右侧主区域 (Main Content)
   ============================================================ */
#main-container {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 25px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

/* ============================================================
   4. 视频网格与卡片 (Video Grid & Cards)
   ============================================================ */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

/* 修复链接变蓝和下划线问题 */
.video-card a {
    text-decoration: none !important;
    color: inherit !important;
    display: block;
}

.video-card { 
    background: #fff; 
    border-radius: 10px; 
    overflow: hidden; 
    box-shadow: 0 3px 10px rgba(0,0,0,0.05); 
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.video-card:hover { transform: translateY(-5px) scale(1.02); }

/* 封面图区域 */
.thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    overflow: hidden;
}

.thumb-wrap img { width: 100%; height: 100%; object-fit: cover; }

.play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-card:hover .play-overlay { opacity: 1; }
.play-icon { color: #fff; font-size: 40px; text-shadow: 0 0 10px rgba(0,0,0,0.5); }

/* 文字信息区 */
.info { 
    padding: 12px; 
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.video-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.4;
    height: 2.8em; /* 限制为两行高度 */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

/* 新增：分类样式（🏷️） */
.video-category {
    font-size: 12px;
    color: var(--primary-color);
    opacity: 0.9;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* 确保分类链接在卡片内不撑破布局且颜色正确 */
.video-category a {
    color: var(--primary-color) !important;
    display: inline !important; 
}

/* ============================================================
   5. 分页样式
   ============================================================ */
.pagination-wrapper { margin: 40px 0; text-align: center; }
.pagination { display: inline-flex; gap: 8px; list-style: none; padding: 0; }
.pagination li a, .pagination li span {
    padding: 8px 16px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #eee;
    text-decoration: none;
    color: #666;
}
.pagination li.active span {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* ============================================================
   6. 页脚 (Footer)
   ============================================================ */
#footer {
    margin-left: var(--sidebar-width);
    padding: 30px 20px;
    text-align: center;
    color: #999;
    font-size: 13px;
    border-top: 1px solid #eee;
    background: #fff;
    transition: all 0.3s;
}


/* 页脚链接样式重置 */
#footer a {
    color: #888;              /* 设置为淡灰色，不突兀 */
    text-decoration: none;    /* 彻底去掉下划线 */
    transition: color 0.3s ease;
}

/* 鼠标悬停时的效果 */
#footer a:hover {
    color: var(--primary-color); /* 悬停时变成你设置的粉色主题色 */
    text-decoration: none;       /* 确保悬停时也不出现下划线 */
}

/* 如果你的页脚文字本身也是蓝色的，可以加上这一行 */
#footer {
    color: #999;
}



/* ============================================================
   7. 移动端响应式适配
   ============================================================ */
#nav-toggle {
    display: none;
    position: fixed;
    bottom: 25px; right: 25px;
    width: 55px; height: 55px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    font-size: 24px;
    z-index: 1100;
    box-shadow: 0 5px 15px rgba(255, 92, 124, 0.4);
    cursor: pointer;
}

@media (max-width: 768px) {
    #nav-toggle { display: block; }
    
    #sidebar { transform: translateX(-100%); }
    #main-container, #footer { margin-left: 0; padding: 15px; }
    
    /* 导航激活状态 */
    body.show-nav { overflow: hidden; } /* 开启菜单时禁止背景滚动 */
    body.show-nav #sidebar { transform: translateX(0); }
    body.show-nav #main-container { transform: translateX(50px); opacity: 0.4; }
}





/* ============================================================
   8. 内容页 (Post) 与评论区 (Comments) 专项美化
   ============================================================ */

/* 8.1 链接全局重置：清除蓝色和下划线 */
.post-video a, 
.near-link a, 
.post-cat a,
#comments a {
    color: var(--primary-color) !important;
    text-decoration: none !important;
    transition: opacity 0.2s;
}

.post-video a:hover, 
.near-link a:hover, 
#comments a:hover {
    opacity: 0.8;
}

/* 特殊：评论元数据中的链接（如回复、日期）保持灰色 */
.comment-meta a {
    color: #999 !important;
}

/* 8.2 评论列表样式 */
#comments {
 /*    margin-top: 30px;
    padding-top: 20px; */
    color: #444;
}

#comments h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--text-main);
}

.comment-list, .comment-list ul {
    list-style: none;
    padding: 0;
}

.comment-list li {
    padding: 20px 0;
    border-bottom: 1px solid #f2f2f2;
}

.comment-author {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
}

.comment-author .avatar {
    border-radius: 50%;
    margin-right: 12px;
    background: #eee;
}

.comment-meta {
    font-size: 12px;
    color: #999;
}

.comment-content {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

/* 8.3 评论表单美化 (Respond) */
.respond {
    margin-top: 30px;
    padding: 25px;
    background: #fdfdfd;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
}

.comment-inputs p {
    margin-bottom: 15px;
}

#comment-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: #666;
}

/* 输入框通用样式 */
#comment-form .text, 
#comment-form .textarea {
    width: 100%;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
    background: #fff;
}

#comment-form .textarea {
    height: 120px;
    resize: vertical;
}

#comment-form .text:focus, 
#comment-form .textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 92, 124, 0.1);
}

/* 提交按钮 */
#comment-form .submit {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 35px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
}

#comment-form .submit:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 92, 124, 0.3);
}

/* 8.4 移动端兼容性增强 */
#nav-toggle {
    z-index: 9999 !important; /* 确保层级最高 */
}

@media (max-width: 768px) {
    .respond {
        padding: 15px;
    }
}
