/* 小一视频播放器 - 全屏覆盖 */
.xiaoyi-video-wrapper {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: #000;
    z-index: 9999;
}

.xiaoyi-video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 跳过按钮 - 科技感 */
.xiaoyi-skip-btn {
    position: fixed;
    top: 15px;
    right: 30px;
    z-index: 10000;
    padding: 10px 28px;
    background: rgba(0, 200, 255, 0.05);
    border: 1px solid rgba(0, 200, 255, 0.4);
    color: rgba(0, 200, 255, 0.9);
    font-size: 14px;
    font-family: 'Courier New', monospace;
    letter-spacing: 4px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s;
    backdrop-filter: blur(4px);
}

.xiaoyi-skip-btn:hover {
    border-color: rgba(0, 200, 255, 0.9);
    background: rgba(0, 200, 255, 0.12);
    box-shadow: 0 0 20px rgba(0, 200, 255, 0.3), inset 0 0 20px rgba(0, 200, 255, 0.05);
    text-shadow: 0 0 8px rgba(0, 200, 255, 0.5);
}

/* 扫描光线 */
.xiaoyi-skip-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 200, 255, 0.15), transparent);
    animation: xiaoyiSweep 3s ease-in-out infinite;
}

@keyframes xiaoyiSweep {
    0% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

/* 角标装饰 */
.xiaoyi-skip-btn::before {
    content: '[ ]';
    position: absolute;
    top: -1px;
    left: -1px;
    font-size: 8px;
    line-height: 1;
    color: rgba(0, 200, 255, 0.3);
    letter-spacing: 0;
}

/* 过渡画布 */
#xiaoyiCanvas {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
}

/* GIF助手 - 右下角固定 */
.xiaoyi-gif-mascot {
    position: fixed;
    bottom: 20px;
    right: 8px;
    width: 200px;
    z-index: 9997;
    opacity: 0;
    transform: scale(0.2);
    cursor: pointer;
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.xiaoyi-gif-mascot.visible {
    opacity: 1;
    transform: scale(1);
}

.xiaoyi-gif-mascot:hover {
    transform: scale(1.08);
}

.xiaoyi-gif-mascot img {
    width: 100%;
    display: block;
}

/* 关闭按钮：贴近人物头部右侧（头部中心约在容器水平50%、垂直30%处），
   避免按钮停在容器右上角而与人物距离过远 */
.xiaoyi-close-btn {
    position: absolute;
    top: 20px;
    right: 48px;
    width: 20px;
    height: 20px;
    background: rgba(0, 200, 255, 0.15);
    border: 1px solid rgba(0, 200, 255, 0.3);
    color: #00c8ff;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
    padding: 0;
}

.xiaoyi-gif-mascot:hover .xiaoyi-close-btn {
    opacity: 1;
}

.xiaoyi-close-btn:hover {
    background: rgba(0, 200, 255, 0.3);
}

/* 小一聊天抽屉遮罩 */
.xiaoyi-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    z-index: 10001;
}

.xiaoyi-drawer-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* 小一聊天抽屉：右侧固定，默认滑出屏幕外，打开时从右向左滑入 */
.xiaoyi-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: calc(100vw / 3); /* 宽度占屏幕三分之一 */
    min-width: 300px; /* 超窄屏下限保护，避免内容过挤 */
    max-width: 560px;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10002;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15);
}

.xiaoyi-drawer.visible {
    transform: translateX(0);
}

/* 聊天页面 iframe，铺满整个抽屉 */
.xiaoyi-drawer-iframe {
    flex: 1;
    width: 100%;
    border: 0;
}
