*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}
html{
    scroll-behavior: smooth;
}
body{
    background:#0f172a;
    color:#e2e8f0;
    font-family: "Microsoft Yahei",system-ui,sans-serif;
    line-height:1.7;
    overflow-x:hidden;
}
.container{
    width:1400px;
    margin:0 auto;
    padding:24px 16px;
    position:relative;
}
.top-nav{
    background:#1e293b;
    border-radius:10px;
    padding:16px 24px;
    margin-bottom:20px;
    display:flex;
    align-items:center;
    gap:30px;
}
.logo{
    font-size:20px;
    font-weight:bold;
    color:#fff;
}
.top-nav a{
    color:#94a3b8;
    text-decoration:none;
}
.top-nav a:hover{
    color:#3b82f6;
}
.bread{
    margin-bottom:16px;
    font-size:14px;
    color:#94a3b8;
}
.bread a{
    color:#3b82f6;
    text-decoration:none;
}
.main-box{
    display:grid;
    grid-template-columns:78% 20%;
    gap:2%;
}
.card{
    background:#1e293b;
    border-radius:10px;
    padding:24px;
    margin-bottom:20px;
}
.video-wrap{
    width:100%;
    aspect-ratio:16/9;
    background:#000;
    border-radius:8px;
    overflow:hidden;
}
video{
    width:100%;
    height:100%;
    display:block;
}
h1{
    font-size:24px;
    margin:6px 0 10px;
    color:#fff;
}
.info-row{
    display:flex;
    gap:20px;
    font-size:14px;
    color:#94a3b8;
    margin-bottom:18px;
}
.btns-group{
    display:flex;
    gap:12px;
}
.btn{
    background:#2563eb;
    color:#fff;
    border:0;
    padding:9px 18px;
    border-radius:6px;
    cursor:pointer;
    font-size:15px;
}
.btn:hover{
    background:#3b82f6;
}
pre{
    background:#0f172a;
    padding:14px;
    border-radius:6px;
    margin:12px 0;
    overflow-x:auto;
    color:#a5f3fc;
}
h2{
    font-size:20px;
    margin-bottom:16px;
    color:#fff;
}
h3{
    font-size:17px;
    margin:14px 0 8px;
    color:#cbd5e1;
}
.download-item{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:10px 0;
    border-bottom:1px solid #334155;
}
.side-block{
    margin-bottom:20px;
}
.side-block ul{
    list-style:none;
}
.side-block li{
    padding:6px 0;
}
.side-block a{
    color:#94a3b8;
    text-decoration:none;
}
.side-block a:hover{
    color:#3b82f6;
}

/* ========== 全局右侧贴边快速定位按钮(抖音样式) ========== */
.douyin-style-sidebar{
    position:fixed;
    right:12px;
    top:50%;
    transform:translateY(-50%);
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:18px;
    z-index:999;
}
.dy-btn-item{
    display:flex;
    flex-direction:column;
    align-items:center;
    cursor:pointer;
    color:#ffffff;
    text-decoration:none;
}
.dy-icon{
    width:36px;
    height:36px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:26px;
    margin-bottom:4px;
}
.dy-text{
    font-size:12px;
}
.dy-btn-item:hover .dy-icon{
    transform:scale(1.12);
    transition:0.18s ease;
}

/* ========== 抖音右侧弹出评论面板 ========== */
.comment-panel{
    position:fixed;
    right:0;
    top:0;
    width:420px;
    height:100vh;
    background:#161823;
    z-index:1000;
    transform:translateX(100%);
    transition:transform 0.3s ease-out;
    display:flex;
    flex-direction:column;
    will-change:transform;
}
.comment-panel.active{
    transform:translateX(0);
}
/* 遮罩层 */
.mask{
    position:fixed;
    left:0;
    top:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0);
    z-index:998;
    display:none;
    pointer-events:none;
}
.mask.active{
    display:block;
    pointer-events:auto;
}
/* 评论头部 */
.comment-head{
    padding:18px 20px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    border-bottom:1px solid #272936;
}
.comment-head h3{
    margin:0;
    color:#fff;
}
.close-comment{
    font-size:22px;
    color:#999;
    cursor:pointer;
}
/* 评论列表滚动区域 */
.comment-list-wrap{
    flex:1;
    overflow-y:auto;
    padding:16px 20px;
}
/* 单条评论 */
.comment-item{
    margin-bottom:24px;
}
.comment-user{
    display:flex;
    gap:10px;
    margin-bottom:8px;
    align-items:center;
}
.comment-avatar{
    width:40px;
    height:40px;
    border-radius:50%;
    background:#333;
    overflow:hidden;
}
.comment-avatar img{
    width:100%;
    height:100%;
    object-fit:cover;
}
.comment-name{
    color:#ccc;
    font-size:15px;
}
.comment-time-loc{
    font-size:12px;
    color:#666;
    margin-top:2px;
}
.comment-content{
    color:#eee;
    margin:8px 0;
    font-size:15px;
}
.comment-img{
    max-width:180px;
    border-radius:6px;
    margin:6px 0;
}
/* 评论操作按钮 */
.comment-actions{
    display:flex;
    gap:22px;
    font-size:14px;
    color:#888;
    margin-top:6px;
}
.action-btn{
    display:flex;
    align-items:center;
    gap:4px;
    cursor:pointer;
}
/* 底部输入框 */
.comment-input-box{
    padding:14px 20px;
    border-top:1px solid #272936;
    display:flex;
    gap:10px;
    align-items:center;
}
.comment-input-box input{
    flex:1;
    background:#272936;
    border:none;
    border-radius:22px;
    padding:10px 16px;
    color:#fff;
    outline:none;
}
.send-btn{
    background:#2563eb;
    color:#fff;
    border:none;
    width:70px;
    height:36px;
    border-radius:18px;
    cursor:pointer;
}
/* 图片查看器 */
.image-viewer{
    position:fixed;
    top:0;
    left:0;
    width:100vw;
    height:100vh;
    z-index:2000;
    display:flex;
    align-items:center;
    justify-content:center;
}
.image-viewer-mask{
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.85);
}
.image-viewer-content{
    position:relative;
    z-index:1;
    max-width:90vw;
    max-height:90vh;
}
.image-viewer-content img{
    max-width:100%;
    max-height:90vh;
    border-radius:8px;
    box-shadow:0 0 30px rgba(0,0,0,0.5);
}
.image-viewer-close{
    position:absolute;
    top:-40px;
    right:0;
    color:#fff;
    font-size:32px;
    cursor:pointer;
    padding:8px;
}
.comment-img{
    cursor:pointer;
}
.emoji-panel .emoji-item {
    font-size:28px;
    padding:8px 10px;
    border-radius:8px;
    cursor:pointer;
    transition:all 0.15s ease;
    background:#0f172a;
}
.emoji-panel .emoji-item:hover {
    transform:scale(1.25);
    background:#3b82f6;
}

/* ========== 播放器样式 - 与player.html一致 ========== */
.video-wrapper {
    position: relative;
    background: #000;
    border-radius: 0;
    overflow: hidden;
    aspect-ratio: 16/9;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    cursor: none;
}
.video-wrapper:hover {
    cursor: default;
}
video {
    width: 100%;
    height: 100%;
    display: block;
}

/* 加载提示 */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 30;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.loading-overlay.show {
    opacity: 1;
    pointer-events: auto;
}
.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: #fb7299;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.loading-text {
    margin-top: 12px;
    font-size: 14px;
    color: rgba(255,255,255,0.8);
}

/* 顶部信息栏 */
.video-info-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: linear-gradient(180deg, rgba(0,0,0,0.8), transparent);
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: space-between;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.video-wrapper:hover .video-info-bar {
    opacity: 1;
    transform: translateY(0);
}
.video-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.video-badge {
    background: rgba(255,144,0,0.9);
    color: #fff;
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
}
.video-views {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
}

/* 弹幕容器 */
.danmaku-container {
    position: absolute;
    top: 50px;
    left: 0;
    right: 0;
    bottom: 30px;
    overflow: hidden;
    pointer-events: none;
    z-index: 10;
}
.danmaku {
    position: absolute;
    white-space: nowrap;
    font-size: 18px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8), 0 0 10px rgba(0,0,0,0.5);
    animation: danmaku-scroll linear forwards;
    line-height: 1.4;
}
.danmaku.top {
    animation: none;
    text-align: center;
    left: 50%;
    transform: translateX(-50%);
}
.danmaku.bottom {
    animation: none;
    text-align: center;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
}
@keyframes danmaku-scroll {
    from {
        transform: translateX(100vw);
    }
    to {
        transform: translateX(-100%);
    }
}

/* 进度条容器 - 始终可见 */
.progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 16px;
    z-index: 25;
}
.progress-bar {
    position: relative;
    height: 3px;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.4;
}
.video-wrapper:hover .progress-bar,
.video-wrapper.show-controls .progress-bar {
    height: 5px;
    opacity: 1;
    background: rgba(255,255,255,0.3);
}
.progress-buffered {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255,255,255,0.4);
    border-radius: 2px;
    transition: width 0.1s linear;
}
.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #fb7299;
    border-radius: 2px;
    transition: width 0.05s linear;
}
.progress-bar:hover .progress-fill {
    background: #ff8db3;
}
.progress-dot {
    position: absolute;
    top: 50%;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 0 6px rgba(0,0,0,0.5);
}
.video-wrapper:hover .progress-dot,
.video-wrapper.show-controls .progress-dot {
    opacity: 1;
}

/* 控制栏 */
.controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.95));
    padding: 40px 16px 10px;
    z-index: 20;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.video-wrapper:hover .controls,
.video-wrapper.show-controls .controls {
    opacity: 1;
    transform: translateY(0);
}
.video-wrapper:hover .video-info-bar,
.video-wrapper.show-controls .video-info-bar {
    opacity: 1;
    transform: translateY(0);
}
.controls-row {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
}
.controls-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.controls-center {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
}
.color-picker-inline {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
}
.color-picker-inline::-webkit-color-swatch-wrapper {
    padding: 0;
}
.color-picker-inline::-webkit-color-swatch {
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.3);
}
.mode-select-inline {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    padding: 3px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    outline: none;
}
.danmaku-input-inline {
    flex: 1;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 16px;
    padding: 6px 16px;
    color: #fff;
    font-size: 12px;
    outline: none;
    transition: border-color 0.2s;
}
.danmaku-input-inline:focus {
    border-color: #fb7299;
}
.send-btn-inline {
    background: linear-gradient(135deg, #ff6b9d, #c9487c);
    color: #fff;
    border: none;
    padding: 6px 20px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
}
.send-btn-inline:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 10px rgba(251,114,153,0.4);
}
.controls-right {
    display: flex;
    align-items: center;
    gap: 4px;
}
.control-btn {
    background: transparent;
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
}
.control-btn:hover {
    background: rgba(255,255,255,0.1);
}
.play-btn {
    width: 36px;
    height: 36px;
    font-size: 20px;
}
.play-btn:hover {
    background: rgba(251,114,153,0.8);
}
.time-display {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    min-width: 80px;
    font-variant-numeric: tabular-nums;
}
.volume-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 24px;
    padding: 4px 0;
    position: relative;
}
.volume-slider {
    width: 16px;
    height: 48px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    cursor: pointer;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 4px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 100;
    padding: 2px;
    box-sizing: border-box;
}
.volume-control:hover .volume-slider,
.volume-slider:hover {
    opacity: 1;
    visibility: visible;
}
.volume-fill {
    width: 100%;
    height: 80%;
    max-width: 100%;
    background: #fb7299;
    border-radius: 6px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    transition: height 0.1s ease;
    min-height: 2px;
}
.select-control {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    outline: none;
}
.select-control:hover {
    background: rgba(255,255,255,0.15);
}
.danmaku-toggle {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    padding: 4px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}
.danmaku-toggle:hover {
    background: rgba(255,255,255,0.15);
}
.danmaku-toggle.active {
    background: rgba(251,114,153,0.9);
}

/* 进度条预览缩略图 */
.progress-preview-container {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 12px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.15s ease;
    z-index: 100;
}
.progress-bar:hover .progress-preview-container {
    opacity: 1;
    visibility: visible;
}
.progress-preview {
    width: 180px;
    height: 100px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}
.progress-preview-canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.progress-preview-time {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    padding: 4px 8px;
    font-size: 12px;
    color: #fff;
    text-align: center;
}
.progress-preview-arrow {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(0, 0, 0, 0.8);
}
.preview-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
}
.preview-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fb7299;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.preview-loading span {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    margin-top: 8px;
}

/* ========== 文档教程模块图片样式 ========== */
#docContent img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px 0;
    border-radius: 6px;
}