* {
    box-sizing: border-box;
}

/* 全局滚动条美化 */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(57, 197, 187, 0.1);
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #39c5bb, #66ccff);
    border-radius: 12px;
    border: 2px solid transparent;
    background-clip: content-box;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(57, 197, 187, 0.3);
    opacity: var(--page-scrollbar-opacity, 0.8);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #66ccff, #39c5bb);
    box-shadow: 0 0 15px rgba(57, 197, 187, 0.6);
    transform: scale(1.05);
    opacity: 1;
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(45deg, #2ea89e, #5aa3e6);
    box-shadow: 0 0 20px rgba(57, 197, 187, 0.8);
    transform: scale(1.1);
}

::-webkit-scrollbar-corner {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    transition: all 0.3s ease;
}

/* Firefox 滚动条样式 */
html {
    scrollbar-width: thin;
    scrollbar-color: rgba(57, 197, 187, 0.8) rgba(255, 255, 255, 0.1);
    --page-scrollbar-opacity: 0.8;
    --scrollbar-opacity: 0.8;
}

/* CSS变量用于动态控制滚动条透明度 */
:root {
    --page-scrollbar-opacity: 0.8;
    --scrollbar-opacity: 0.8;
}

html,
body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    scroll-behavior: smooth; /* 平滑滚动 */
    overflow-x: hidden; /* 隐藏水平滚动条 */
}

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #e0e6ed;
}

/* 主容器布局 */
.container {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 40px);
    gap: 20px;
    padding: 20px;
    max-width: 95%;
    margin: 0 auto;
}

/* 主要内容区域 - 左右布局 */
.main-content {
    display: flex;
    flex: 1; /* 占据剩余所有垂直空间 */
    gap: 30px;
    min-height: 0; /* 允许flex子项收缩 */
    height: calc(100vh - 60px); /* 设置固定高度 */
}

/* 左侧区域 - 包含作品列表和评论区 */
.left-section {
    flex: 1 1 auto; /* 可伸缩，占据主要空间 */
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0; /* 防止内容溢出 */
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* 优化的缓动函数 */
    /* 添加性能优化 */
    will-change: flex-basis, width, gap;
    /* 使用 GPU 加速 */
    transform: translateZ(0);
}

/* 当评论区隐藏时，左侧区域缩小到只显示作品列表 */
.left-section.comment-hidden {
    flex: 0 0 auto; /* 改为自动宽度，而不是固定百分比 */
    gap: 20px; /* 保持作品列表和按钮之间的适当间距 */
    width: auto; /* 自适应内容宽度 */
    min-width: 0; /* 允许收缩 */
    max-width: fit-content; /* 最大宽度适应内容 */
    height: auto; /* 高度自适应 */
    min-height: 0; /* 允许高度完全收缩 */
    align-items: flex-start; /* 顶部对齐 */
    position: relative; /* 确保可以设置层级 */
    z-index: 10; /* 提高层级，确保不被右侧区域遮挡 */
}

/* 更强制的布局控制：当评论区隐藏时 */
.left-section.comment-hidden {
    /* 重置flex属性确保区域缩小 */
    flex: 0 0 auto !important;
    /* 使用flex-shrink确保可以收缩 */
    flex-shrink: 1 !important;
    /* 移除最小宽度限制 */
    min-width: 0 !important;
    /* 让宽度完全由内容决定，但给予更多空间 */
    width: max-content !important;
    /* 确保高度适应内容 */
    height: auto !important;
    /* 垂直布局，间距紧凑 */
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    /* 确保层级高于右侧区域 */
    position: relative !important;
    z-index: 15 !important;
}

/* 确保隐藏的评论容器完全不占用空间 */
.left-section.comment-hidden #commentContainer.hidden {
    display: none !important; /* 完全移除布局影响 */
}

/* 作品列表区域 - 现在在左上角 */
.works-section {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap; /* 允许换行 */
    flex-shrink: 0; /* 防止被压缩 */
}

/* 当评论区隐藏时，作品列表区域垂直排列以节省空间 */
.left-section.comment-hidden .works-section {
    flex-direction: column;
    gap: 15px;
    width: auto;
    min-width: max-content; /* 按内容宽度 */
    flex-shrink: 0; /* 防止被压缩 */
    position: relative; /* 确保定位正确 */
    z-index: 20; /* 确保作品区域在最高层级 */
}

/* 评论区域容器 */
.comment-section {
    flex: 1; /* 占据左侧剩余空间 */
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 30px;
    min-height: 0; /* 允许flex子项收缩 */
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* 统一缓动函数 */
}

/* 当评论区隐藏时，评论区域容器也要收缩 */
.left-section.comment-hidden .comment-section {
    flex: 0 0 auto; /* 不再占用额外空间 */
    min-height: 0; /* 完全收缩高度 */
    height: auto; /* 高度自适应内容，仅包含按钮 */
    gap: 0; /* 移除间距 */
    margin: 0; /* 移除边距 */
    width: auto; /* 只占据按钮实际需要的宽度 */
    overflow: visible; /* 允许按钮正常显示 */
    min-width: 0; /* 允许宽度收缩 */
    max-height: fit-content; /* 最大高度适应内容 */
    align-items: flex-start; /* 按钮左对齐 */
}

/* 评论区按钮样式 */
#commentBtn {
    background: linear-gradient(45deg, #39c5bb, #66ccff);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(57, 197, 187, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: flex-start; /* 按钮左对齐 */
}

#commentBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(57, 197, 187, 0.5);
}

#commentBtn:active {
    transform: translateY(0);
}

/* 当评论区隐藏时，按钮显示"展开"状态 */
#commentBtn.expand-mode {
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

#commentBtn.expand-mode:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
}

/* 动画进行中时禁用按钮交互 */
#commentBtn.animating {
    pointer-events: none;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

/* 评论容器样式 */
#commentContainer {
    display: block;
    padding: 20px;
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(57, 197, 187, 0.2);
    min-height: 400px;
    overflow: hidden; /* 隐藏内容溢出 */
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    flex: 1;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* 统一缓动函数 */
    max-height: 1000px; /* 设置最大高度便于动画 */
    height: auto; /* 高度自适应 */
    opacity: 1;
    transform: translateY(0) scale(1); /* 使用更自然的变换 */
    transform-origin: top center; /* 从顶部中心开始变换 */
    width: 100%; /* 确保宽度 */
    /* 添加性能优化 */
    will-change: max-height, opacity, transform, padding, height;
    /* 使用 GPU 加速 */
    backface-visibility: hidden;
    perspective: 1000px;
}

/* 隐藏状态 - 默认隐藏评论区 */
#commentContainer.hidden {
    max-height: 0 !important; /* 强制高度为0 */
    min-height: 0 !important; /* 强制最小高度为0 */
    height: 0 !important; /* 强制高度为0 */
    padding: 0 !important; /* 完全移除内边距 */
    opacity: 0;
    transform: translateY(-15px) scale(0.98); /* 减少变换幅度，使动画更自然 */
    transform-origin: top center; /* 从顶部中心开始变换 */
    border-width: 0;
    margin: 0 !important; /* 完全移除外边距 */
    overflow: hidden; /* 隐藏溢出内容 */
    /* 添加性能优化 */
    will-change: max-height, opacity, transform, padding, height;
    /* 完全移除容器的布局影响 */
    flex: 0 0 0 !important;
    width: 0 !important;
    flex-basis: 0 !important;
}

/* 评论容器内部滚动区域 */
#commentContainer #tcomment {
    overflow-y: auto;
    height: 100%;
    max-height: 400px;
    transition: opacity 0.25s ease-out 0.1s; /* 延迟显示内容，确保容器动画先完成 */
    transform: translateZ(0); /* GPU 加速 */
}

/* 当容器隐藏时，内容立即透明 */
#commentContainer.hidden #tcomment {
    opacity: 0;
    transition: opacity 0.15s ease-in; /* 快速但平滑隐藏内容 */
}

/* 右侧区域 - 日记区域 */
.right-section {
    flex: 0 0 30%; /* 改为百分比初始宽度 */
    padding: 25px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    height: fit-content;
    min-height: calc(100vh - 80px);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* 统一缓动函数 */
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(57, 197, 187, 0.8) rgba(255, 255, 255, 0.1);
    /* 添加性能优化 */
    will-change: flex-grow, box-shadow, border-color, background-color;
    /* 使用 GPU 加速 */
    transform: translateZ(0);
    /* 确保不会遮挡左侧内容 */
    position: relative;
    z-index: 1; /* 设置较低的层级 */
}

/* 当评论区隐藏时，右侧区域扩展占据所有剩余空间 */
.right-section.expanded {
    flex: 1 1 auto; /* 扩展到占据所有剩余空间 */
    max-width: none; /* 移除最大宽度限制 */
    /* 分离变换和阴影动画以减少抖动 */
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.4),
        0 0 24px rgba(57, 197, 187, 0.15); /* 更强烈的阴影 */
    border-color: rgba(57, 197, 187, 0.3); /* 边框颜色变化 */
    background: rgba(255, 255, 255, 0.05); /* 轻微提亮背景 */
    /* 使用 will-change 优化动画性能 */
    will-change: flex-grow, box-shadow, border-color, background-color;
    /* 确保扩展时不会遮挡左侧内容 */
    position: relative;
    z-index: 1; /* 保持较低的层级，不遮挡左侧 */
}

/* 右侧区域滚动条样式 */
.right-section::-webkit-scrollbar {
    width: 12px;
    transition: all 0.3s ease;
}

.right-section::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin: 10px;
    border: 1px solid rgba(57, 197, 187, 0.1);
    transition: all 0.3s ease;
}

.right-section::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #39c5bb, #66ccff);
    border-radius: 12px;
    border: 2px solid transparent;
    background-clip: content-box;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(57, 197, 187, 0.3);
    opacity: var(--scrollbar-opacity, 0.8);
}

.right-section::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #66ccff, #39c5bb);
    box-shadow: 0 0 15px rgba(57, 197, 187, 0.6);
    transform: scale(1.05);
    opacity: 1;
}

/* 按钮样式 */
#btn {
    background: linear-gradient(45deg, #39c5bb, #66ccff);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(57, 197, 187, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap; /* 防止按钮文字换行 */
    flex-shrink: 0; /* 防止按钮被压缩 */
}

#btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(57, 197, 187, 0.5);
}

#btn:active {
    transform: translateY(0);
}

/* 表格样式 */
#myTable {
    display: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease-out;
    min-width: 280px; /* 减小最小宽度，使用相对单位 */
    max-width: 100%; /* 使用百分比最大宽度 */
    width: 100%; /* 自适应宽度 */
    flex-shrink: 0; /* 防止表格被压缩 */
    position: relative; /* 确保可以设置z-index */
    z-index: 10; /* 提高层级，避免被其他元素遮挡 */
}

/* 当评论区隐藏时，表格宽度适应紧凑布局 */
.left-section.comment-hidden #myTable {
    width: auto;
    min-width: 300px; /* 增加最小宽度，确保内容有足够空间 */
    max-width: 450px; /* 增加最大宽度，给表格更多展示空间 */
    position: relative; /* 确保定位正确 */
    z-index: 15; /* 在隐藏状态下提高层级 */
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 1000px;
    }
}

#myTable tr {
    transition: all 0.3s ease;
}

#myTable tr:hover {
    background: rgba(255, 255, 255, 0.08);
}

td {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #FFA500;
    font-weight: 500;
}

td:first-child {
    border-left: 4px solid #39c5bb;
    font-weight: 600;
}

td.state {
    color: #39c5bb;
    text-align: center;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(57, 197, 187, 0.2);
    margin: 5px;
    display: inline-block;
}

#myTable tr:last-child td {
    border-bottom: none;
}

/* 评论区域 - Twikoo 样式定制 */
#tcomment {
    background: linear-gradient(145deg, rgba(57, 197, 187, 0.08), rgba(102, 204, 255, 0.05));
    border-radius: 15px;
    padding: 20px; /* 减少内边距 */
    backdrop-filter: blur(15px);
    border: 1px solid rgba(57, 197, 187, 0.2);
    color: #39c5bb;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%; /* 占满父容器高度 */
    width: 100%; /* 充分利用宽度 */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

/* Twikoo 主容器样式 */
#tcomment .el-input__inner,
#tcomment .el-textarea__inner {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 2px solid rgba(57, 197, 187, 0.2) !important;
    border-radius: 12px !important;
    color: #e0e6ed !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
}

#tcomment .el-input__inner:focus,
#tcomment .el-textarea__inner:focus {
    border-color: #39c5bb !important;
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 0 0 3px rgba(57, 197, 187, 0.2) !important;
}

#tcomment .el-input__inner::placeholder,
#tcomment .el-textarea__inner::placeholder {
    color: rgba(224, 230, 237, 0.5) !important;
}

/* Twikoo 提交按钮 */
#tcomment .el-button--primary {
    background: linear-gradient(45deg, #39c5bb, #66ccff) !important;
    border: none !important;
    border-radius: 25px !important;
    padding: 12px 30px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(57, 197, 187, 0.3) !important;
}

#tcomment .el-button--primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(57, 197, 187, 0.5) !important;
}

#tcomment .el-button--primary:active {
    transform: translateY(0) !important;
}

/* Twikoo 评论列表样式 */
#tcomment .tk-comments-container {
    margin-top: 30px !important;
}

/* Twikoo 单条评论 */
#tcomment .tk-comment {
    background: rgba(255, 255, 255, 0.03) !important;
    border-radius: 15px !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
    border-left: 4px solid #66ccff !important;
    transition: all 0.3s ease !important;
    position: relative !important;
}

#tcomment .tk-comment:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    transform: translateX(5px) !important;
    border-left-color: #39c5bb !important;
}

/* Twikoo 评论头部信息 */
#tcomment .tk-meta {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 12px !important;
    gap: 15px !important;
}

#tcomment .tk-avatar {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: linear-gradient(45deg, #39c5bb, #66ccff) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
    font-weight: bold !important;
    font-size: 16px !important;
}

#tcomment .tk-nick {
    color: #39c5bb !important;
    font-weight: 600 !important;
    font-size: 16px !important;
}

#tcomment .tk-time {
    color: #66ccff !important;
    font-size: 12px !important;
    opacity: 0.7 !important;
    margin-left: auto !important;
}

/* Twikoo 评论内容 */
#tcomment .tk-content {
    color: #e0e6ed !important;
    line-height: 1.6 !important;
    font-size: 14px !important;
    margin: 15px 0 !important;
}

#tcomment .tk-content p {
    margin: 0 0 10px 0 !important;
}

/* Twikoo 操作按钮 */
#tcomment .tk-action {
    display: flex !important;
    gap: 10px !important;
    margin-top: 15px !important;
}

#tcomment .tk-action-icon {
    background: rgba(57, 197, 187, 0.2) !important;
    color: #39c5bb !important;
    border: 1px solid rgba(57, 197, 187, 0.3) !important;
    border-radius: 20px !important;
    padding: 6px 15px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

#tcomment .tk-action-icon:hover {
    background: rgba(57, 197, 187, 0.3) !important;
    transform: translateY(-1px) !important;
}

/* Twikoo 回复评论 */
#tcomment .tk-replies {
    margin-left: 30px !important;
    margin-top: 15px !important;
    border-left: 2px solid rgba(102, 204, 255, 0.3) !important;
    padding-left: 20px !important;
}

/* Twikoo 表单标题 */
#tcomment .tk-submit-title {
    color: #e0e6ed !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    margin-bottom: 20px !important;
    padding: 15px !important;
    background: rgba(57, 197, 187, 0.1) !important;
    border-radius: 15px !important;
    border: 1px solid rgba(57, 197, 187, 0.2) !important;
    text-align: center !important;
}

/* Twikoo 加载状态 */
#tcomment .tk-loading {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 50px !important;
    flex-direction: column !important;
}

#tcomment .tk-loading::before {
    content: '' !important;
    width: 40px !important;
    height: 40px !important;
    border: 3px solid rgba(57, 197, 187, 0.2) !important;
    border-top: 3px solid #39c5bb !important;
    border-radius: 50% !important;
    animation: twikoo-spin 1s linear infinite !important;
    margin-bottom: 15px !important;
}

@keyframes twikoo-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Twikoo 空状态 */
#tcomment .tk-expand {
    text-align: center !important;
    padding: 50px 20px !important;
    color: #66ccff !important;
    opacity: 0.7 !important;
}

/* Twikoo 统计信息 */
#tcomment .tk-comments-count {
    color: #66ccff !important;
    font-size: 14px !important;
    opacity: 0.8 !important;
    margin-bottom: 20px !important;
}

/* 重写所有Twikoo默认样式 */
#tcomment * {
    font-family: inherit !important;
    color: inherit !important;
}

#tcomment .tk-row {
    background: transparent !important;
}

#tcomment .tk-submit {
    background: rgba(255, 255, 255, 0.03) !important;
    border-radius: 15px !important;
    padding: 25px !important;
    margin-bottom: 30px !important;
    border: 1px solid rgba(102, 204, 255, 0.2) !important;
}

/* Twikoo 文本域和输入框通用样式 */
#tcomment input,
#tcomment textarea {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 2px solid rgba(57, 197, 187, 0.2) !important;
    border-radius: 12px !important;
    color: #e0e6ed !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    padding: 12px 16px !important;
}

#tcomment input:focus,
#tcomment textarea:focus {
    outline: none !important;
    border-color: #39c5bb !important;
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 0 0 3px rgba(57, 197, 187, 0.2) !important;
}

#tcomment input::placeholder,
#tcomment textarea::placeholder {
    color: rgba(224, 230, 237, 0.5) !important;
}

/* 标题样式 */
#title {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(57, 197, 187, 0.3);
}

#title h1 {
    margin: 0;
    font-size: 2.5em;
    background: linear-gradient(45deg, #39c5bb, #66ccff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(57, 197, 187, 0.5);
}

#title p {
    margin: 10px 0 0 0;
    font-style: italic;
    opacity: 0.8;
}

/* 日期样式 */
div.data {
    color: #39c5bb;
    font-size: 0.9em;
    font-weight: 600;
    margin: 30px 0 10px 0;
    padding: 8px 15px;
    background: rgba(57, 197, 187, 0.1);
    border-left: 4px solid #39c5bb;
    border-radius: 0 10px 10px 0;
    display: inline-block;
}

/* 文本内容样式 */
.text {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 15px;
    margin: 10px 0 20px 0;
    border-left: 3px solid #66ccff;
    color: #e0e6ed;
    line-height: 1.8;
    transition: all 0.3s ease;
}

.text:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

/* 新年祝福样式 */
.Happy_New_Year {
    margin: 40px 20px;
    text-align: center;
    color: #FFA500;
    font-weight: bold;
    font-size: 1.2em;
    background: linear-gradient(45deg, rgba(255, 165, 0, 0.1), rgba(255, 215, 0, 0.1));
    padding: 20px;
    border-radius: 15px;
    border: 2px dashed #FFA500;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 10px rgba(255, 165, 0, 0.3);
    }
    to {
        box-shadow: 0 0 20px rgba(255, 165, 0, 0.6);
    }
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .container {
        padding: 15px;
        gap: 15px;
        max-width: none;
    }
    
    .main-content {
        flex-direction: column;
        gap: 15px;
        height: auto; /* 在小屏幕上自动高度 */
    }
    
    .left-section {
        order: 1;
        gap: 15px;
        /* 在移动端保持更快的动画速度 */
        transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    /* 在小屏幕上禁用评论隐藏时的特殊布局 */
    .left-section.comment-hidden {
        flex: 1;
        max-width: none;
    }
    
    .works-section {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .right-section {
        flex: none;
        width: 100%;
        order: 2;
        /* 在移动端保持更快的动画速度 */
        transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    /* 在小屏幕上禁用右侧扩展 */
    .right-section.expanded {
        flex: none;
        width: 100%;
    }
      .comment-section {
        min-height: auto;
        flex: none;
        height: auto;
        gap: 15px;
        /* 在移动端保持更快的动画速度 */
        transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    #commentContainer {
        min-height: 300px;
        height: auto;
        padding: 15px;
        /* 在移动端保持更快的动画速度 */
        transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
      #tcomment {
        min-height: 300px;
        height: auto;
    }
    
    .right-section {
        height: auto;
        min-height: auto;
        max-height: none;
    }
    
    #title h1 {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px 10px 0 10px;
    }
      .left-section {
        gap: 10px;
    }
    
    .comment-section {
        gap: 10px;
    }
    
    #commentContainer {
        padding: 10px;
        min-height: 250px;
    }
    
    .right-section {
        padding: 20px;
        height: auto;
        min-height: auto;
    }
    
    #tcomment {
        padding: 15px;
        min-height: 250px;
    }
    
    #title h1 {
        font-size: 1.8em;
    }
    
    .text {
        padding: 15px;
    }
    
    #myTable {
        min-width: 280px;
        max-width: 100%;
    }
}

/* 加载动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.text, div.data {
    animation: fadeIn 0.6s ease-out;
}

/* 美化评论区域外层的滚动条 */
#commentContainer::-webkit-scrollbar {
    width: 12px;
    transition: all 0.3s ease;
}

#commentContainer::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin: 10px;
    border: 1px solid rgba(57, 197, 187, 0.1);
    transition: all 0.3s ease;
}

#commentContainer::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #39c5bb, #66ccff);
    border-radius: 12px;
    border: 2px solid transparent;
    background-clip: content-box;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(57, 197, 187, 0.3);
    opacity: var(--scrollbar-opacity, 0.9);
}

#commentContainer::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #66ccff, #39c5bb);
    box-shadow: 0 0 15px rgba(57, 197, 187, 0.6);
    transform: scale(1.05);
    opacity: 1;
}

#commentContainer::-webkit-scrollbar-thumb:active {
    background: linear-gradient(45deg, #2ea89e, #5aa3e6);
    box-shadow: 0 0 20px rgba(57, 197, 187, 0.8);
    transform: scale(1.1);
}

#commentContainer::-webkit-scrollbar-corner {
    background: transparent;
    transition: all 0.3s ease;
}

/* 为Firefox浏览器优化滚动条 */
#commentContainer {
    scrollbar-width: thin;
    scrollbar-color: rgba(57, 197, 187, 0.8) rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

/* 滚动时的额外效果 */
#commentContainer:hover {
    scrollbar-color: rgba(57, 197, 187, 1) rgba(255, 255, 255, 0.15);
}
