* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #000;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

.slideshow-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: #000;
    overflow: hidden;
    cursor: pointer;
}

.slideshow-container.drawing-mode {
    cursor: crosshair;
}

.slide {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.slide.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.slide img,
.slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    user-select: none;
    pointer-events: none;
}

/* 视频特殊样式 */
.slide video {
    background: #000;
}

/* 隐藏视频控制栏 */
.slide video::-webkit-media-controls {
    display: none !important;
}

.slide video::-webkit-media-controls-enclosure {
    display: none !important;
}

.slide video::-webkit-media-controls-panel {
    display: none !important;
}

.slide video::-webkit-media-controls-play-button {
    display: none !important;
}

.slide video::-webkit-media-controls-timeline {
    display: none !important;
}

.slide video::-webkit-media-controls-current-time-display {
    display: none !important;
}

.slide video::-webkit-media-controls-time-remaining-display {
    display: none !important;
}

.slide video::-webkit-media-controls-mute-button {
    display: none !important;
}

.slide video::-webkit-media-controls-volume-slider {
    display: none !important;
}

.slide video::-webkit-media-controls-fullscreen-button {
    display: none !important;
}

/* 幻灯片提示文字 - 左下角 */
.slide-prompt {
    position: absolute;
    bottom: 60px;
    left: 40px;
    font-size: 36px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    z-index: 60;
    max-width: 700px;
    line-height: 1.5;
    background: rgba(0, 0, 0, 0.5);
    padding: 25px 35px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

/* 幻灯片提示文字 - 右下角 */
.slide-prompt-right {
    position: absolute;
    bottom: 60px;
    right: 40px;
    font-size: 36px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    z-index: 60;
    max-width: 700px;
    line-height: 1.5;
    background: rgba(0, 0, 0, 0.5);
    padding: 25px 35px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

/* 幻灯片答案文字 */
.slide-answer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 80px;
    font-weight: bold;
    color: #ff0000;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    z-index: 60;
    transition: opacity 0.8s ease-in-out;
    letter-spacing: 15px;
}

/* 幻灯片标题 - 左上偏中间 */
.slide-title {
    position: absolute;
    top: 12%;
    left: 40%;
    transform: translateX(-50%);
    font-size: 96px;
    font-weight: bold;
    color: #000000;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.3);
    z-index: 60;
    letter-spacing: 12px;
}

/* 幻灯片中间文字 */
.slide-center-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 64px;
    font-weight: 600;
    color: #000000;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.3);
    z-index: 60;
    text-align: center;
    line-height: 1.8;
    max-width: 90%;
}

.slide-answer.show {
    opacity: 1;
}

/* 响应式提示和答案文字 */
@media (max-width: 1366px) {
    .slide-prompt {
        font-size: 28px;
        padding: 20px 30px;
        bottom: 50px;
        left: 30px;
        max-width: 600px;
    }

    .slide-prompt-right {
        font-size: 28px;
        padding: 20px 30px;
        bottom: 50px;
        right: 30px;
        max-width: 600px;
    }

    .slide-answer {
        font-size: 60px;
        letter-spacing: 12px;
    }

    .slide-title {
        font-size: 72px;
        letter-spacing: 10px;
    }

    .slide-center-text {
        font-size: 52px;
        max-width: 85%;
    }
}

@media (max-width: 768px) {
    .slide-prompt {
        font-size: 22px;
        padding: 15px 25px;
        bottom: 80px;
        left: 20px;
        max-width: calc(100% - 40px);
    }

    .slide-prompt-right {
        font-size: 22px;
        padding: 15px 25px;
        bottom: 150px;
        right: 20px;
        max-width: calc(100% - 40px);
    }

    .slide-answer {
        font-size: 40px;
        letter-spacing: 8px;
    }

    .slide-title {
        font-size: 48px;
        letter-spacing: 6px;
        top: 10%;
    }

    .slide-center-text {
        font-size: 32px;
        max-width: 90%;
        line-height: 1.6;
    }
}

/* 绘图画布 */
#drawingCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    pointer-events: none;
}

#drawingCanvas.active {
    pointer-events: auto;
}

/* 导航按钮 */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 150;
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.prev {
    left: 20px;
}

.next {
    right: 100px;
}

/* 页码指示器 */
.page-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    color: white;
    font-weight: 600;
    backdrop-filter: blur(10px);
    z-index: 150;
}

/* 点指示器 */
.dots-container {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 150;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.dot:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.2);
}

.dot.active {
    background: white;
    width: 30px;
    border-radius: 8px;
}

/* 工具栏 */
.toolbar {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 200;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px 15px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tool-btn {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    position: relative;
}

.tool-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.tool-btn.active {
    background: rgba(66, 153, 225, 0.6);
    border-color: rgba(66, 153, 225, 0.8);
    box-shadow: 0 0 20px rgba(66, 153, 225, 0.5);
}

.tool-btn svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
}

/* 工具提示 */
.tool-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 65px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.tool-btn:hover::before {
    opacity: 1;
}

/* 颜色选择器 */
.color-picker {
    display: none;
    position: absolute;
    right: 70px;
    background: rgba(0, 0, 0, 0.9);
    padding: 10px;
    border-radius: 10px;
    gap: 8px;
    flex-wrap: wrap;
    width: 140px;
}

.color-picker.show {
    display: flex;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.color-option:hover {
    transform: scale(1.2);
    border-color: white;
}

.color-option.selected {
    border-color: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* 提示信息 */
.hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 14px;
    opacity: 0;
    animation: hintFade 3s ease-in-out;
    pointer-events: none;
    z-index: 5;
}

@keyframes hintFade {
    0%, 100% { opacity: 0; }
    10%, 90% { opacity: 1; }
}

/* AI智能体容器 */
.ai-chat-container {
    position: fixed;
    bottom: 40px;
    right: 40px;
    display: none;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
    cursor: move;
}

.ai-chat-container.show {
    display: flex;
}

/* AI角色容器 */
.ai-character {
    position: relative;
    width: 220px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: breathe 3s ease-in-out infinite;
    cursor: pointer;
    transition: transform 0.3s ease;
}

/* 呼吸动画 - 待机状态 */
@keyframes breathe {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-12px) scale(1.03); }
}

/* 说话动画 - 语音播报时 */
.ai-character.talking {
    animation: talking 0.5s ease-in-out infinite;
}

@keyframes talking {
    0%, 100% { 
        transform: translateY(0) scale(1) rotate(0deg); 
    }
    25% { 
        transform: translateY(-10px) scale(1.05) rotate(-3deg); 
    }
    75% { 
        transform: translateY(-10px) scale(1.05) rotate(3deg); 
    }
}

/* 思考动画 - AI处理中 */
.ai-character.thinking {
    animation: thinking 1.2s ease-in-out infinite;
}

@keyframes thinking {
    0%, 100% { 
        transform: translateY(0) rotate(0deg); 
    }
    25% { 
        transform: translateY(-8px) rotate(-6deg); 
    }
    50% { 
        transform: translateY(0) rotate(0deg); 
    }
    75% { 
        transform: translateY(-8px) rotate(6deg); 
    }
}

/* AI图片 */
.ai-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    filter: drop-shadow(0 8px 24px rgba(102, 126, 234, 0.3));
}


/* 思考泡泡 */
.thinking-bubbles {
    position: absolute;
    top: -50px;
    right: 20px;
    display: none;
    pointer-events: none;
}

.ai-character.thinking .thinking-bubbles {
    display: block;
}

.thinking-bubble {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    position: absolute;
    animation: bubbleFloat 2s ease-in-out infinite;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.4);
}

.thinking-bubble:nth-child(1) {
    width: 12px;
    height: 12px;
    right: 0;
    bottom: 0;
    animation-delay: 0s;
}

.thinking-bubble:nth-child(2) {
    width: 15px;
    height: 15px;
    right: 18px;
    bottom: 18px;
    animation-delay: 0.4s;
}

.thinking-bubble:nth-child(3) {
    width: 18px;
    height: 18px;
    right: 32px;
    bottom: 40px;
    animation-delay: 0.8s;
}

@keyframes bubbleFloat {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-12px) scale(1.1);
    }
    100% {
        opacity: 0;
        transform: translateY(-25px) scale(0.8);
    }
}

/* ========== 麦克风录音指示器 ========== */
.mic-indicator {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 10;
}

.mic-indicator.active {
    display: flex;
    animation: micPulse 0.3s ease-out;
}

@keyframes micPulse {
    0% {
        transform: translateX(-50%) scale(0.8);
        opacity: 0;
    }
    100% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
}

.mic-icon {
    width: 40px;
    height: 40px;
    padding: 8px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    border-radius: 50%;
    fill: white;
    box-shadow: 0 4px 15px rgba(255, 82, 82, 0.5);
    animation: micGlow 1.5s ease-in-out infinite;
}

@keyframes micGlow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(255, 82, 82, 0.5);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 4px 25px rgba(255, 82, 82, 0.8),
                    0 0 30px rgba(255, 82, 82, 0.4);
        transform: scale(1.1);
    }
}

/* 录音波形动画 */
.recording-wave {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 30px;
}

.recording-wave span {
    display: block;
    width: 4px;
    background: linear-gradient(180deg, #ff6b6b 0%, #ff5252 100%);
    border-radius: 2px;
    animation: wave 1s ease-in-out infinite;
}

.recording-wave span:nth-child(1) {
    height: 8px;
    animation-delay: 0s;
}

.recording-wave span:nth-child(2) {
    height: 16px;
    animation-delay: 0.1s;
}

.recording-wave span:nth-child(3) {
    height: 24px;
    animation-delay: 0.2s;
}

.recording-wave span:nth-child(4) {
    height: 16px;
    animation-delay: 0.3s;
}

.recording-wave span:nth-child(5) {
    height: 8px;
    animation-delay: 0.4s;
}

@keyframes wave {
    0%, 100% {
        transform: scaleY(1);
        opacity: 0.7;
    }
    50% {
        transform: scaleY(1.5);
        opacity: 1;
    }
}

/* 对话气泡 */
.ai-speech-bubble {
    position: relative;
    max-width: 350px;
    min-width: 250px;
    background: white;
    border-radius: 20px;
    padding: 20px 25px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 3px solid #667eea;
}

.ai-speech-bubble.show {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.ai-speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 20px solid white;
}

.ai-speech-bubble::before {
    content: '';
    position: absolute;
    bottom: -26px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 23px solid transparent;
    border-right: 23px solid transparent;
    border-top: 23px solid #667eea;
}

.ai-speech-text {
    font-size: 16px;
    line-height: 1.6;
    color: #2d3436;
    margin: 0;
}

/* 输入区域（隐藏式） */
.ai-input-container {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 350px;
    background: white;
    border-radius: 25px;
    padding: 10px 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    gap: 10px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    border: 2px solid #667eea;
}

.ai-chat-container:hover .ai-input-container {
    opacity: 1;
    pointer-events: auto;
}

.ai-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    padding: 8px 12px;
    background: transparent;
    color: #2d3436;
}

.ai-send-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.ai-send-btn:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.ai-send-btn svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* 响应式 */
@media (max-width: 768px) {
    .ai-character {
        width: 160px;
        height: 220px;
    }

    .ai-speech-bubble {
        max-width: 250px;
        min-width: 200px;
        font-size: 14px;
        padding: 15px 20px;
    }

    .ai-input-container {
        width: 280px;
    }

    .thinking-bubbles {
        top: -40px;
        right: 15px;
    }

    .thinking-bubble:nth-child(1) {
        width: 10px;
        height: 10px;
    }

    .thinking-bubble:nth-child(2) {
        width: 12px;
        height: 12px;
    }

    .thinking-bubble:nth-child(3) {
        width: 15px;
        height: 15px;
    }
}

