/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    color: #333;
}

/* Canvas样式 */
canvas {
    position: fixed;
    top: 0;
    left: 0;
    outline: none;
    z-index: 1;
}

/* 按钮容器样式 */
.button-container {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.7); /* 70% 透明度 */
    backdrop-filter: blur(10px);
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 100;
    min-width: 260px;
    transition: all 0.3s ease;
}

.button-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* 按钮基础样式 */
.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    margin: 4px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    opacity: 0.7; /* 70% 透明度 */
}

.btn.active {
    opacity: 1;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

.btn.full-width {
    width: 100%;
    margin: 8px 0;
}

.btn.compact {
    padding: 6px 12px;
    font-size: 12px;
    margin: 2px;
}

/* 按钮行样式 */
.button-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 10px 0;
}

/* 控制面板样式 */
.control-panel {
    margin: 10px 0;
    padding: 12px;
    background: rgba(248, 250, 252, 0.7); /* 70% 透明度 */
    border-radius: 8px;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.control-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0;
}

.control-label {
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
    min-width: 80px;
}

.control-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
}

.control-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.control-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.control-value {
    font-size: 12px;
    color: #718096;
    font-weight: 500;
    min-width: 30px;
    text-align: right;
}

/* 树状结构容器样式 */
.tree-container {
    position: absolute;
    top: 60px;
    left: 20px;
    width: 340px;
    max-height: 360px;
    background: rgba(255, 255, 255, 0.7); /* 70% 透明度 */
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow-y: auto;
    overflow-x: hidden;
    font-size: 13px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    z-index: 100;
    transition: all 0.3s ease;
}

.tree-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* 自定义滚动条 */
.tree-container::-webkit-scrollbar {
    width: 8px;
}

.tree-container::-webkit-scrollbar-track {
    background: rgba(241, 245, 249, 0.8);
    border-radius: 4px;
}

.tree-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

.tree-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* 聊天容器样式 */
.chat-container {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 350px;
    height: calc(100vh - 40px);
    background: rgba(255, 255, 255, 0.7); /* 70% 透明度 */
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: all 0.3s ease;
}

.chat-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* 聊天标题 */
.chat-title {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

/* 聊天消息区域 */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 15px;
    padding-right: 5px;
}

/* 聊天输入区域 */
.chat-input-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid rgba(226, 232, 240, 0.8);
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    background: rgba(248, 250, 252, 0.7); /* 70% 透明度 */
}

.chat-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.chat-send-btn {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.chat-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
}

/* 消息样式 */
.message {
    margin-bottom: 12px;
    padding: 12px 15px;
    border-radius: 12px;
    word-wrap: break-word;
    max-width: 100%;
    line-height: 1.4;
    animation: fadeInUp 0.3s ease;
}

.message.user {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-left: 20px;
    border-bottom-right-radius: 4px;
}

.message.ai {
    background: rgba(248, 250, 252, 0.9);
    color: #2d3748;
    margin-right: 20px;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .tree-container {
        left: 20px;
        top: 380px;
        width: 320px;
        max-height: 350px;
    }
    
    .chat-container {
        width: 300px;
        right: 20px;
    }
}

@media (max-width: 768px) {
    .button-container {
        top: 10px;
        left: 10px;
        padding: 12px;
        min-width: 240px;
    }
    
    .tree-container {
        left: 10px;
        top: 320px;
        width: 280px;
        max-height: 300px;
        padding: 15px;
    }
    
    .chat-container {
        width: 280px;
        right: 10px;
        top: 10px;
        height: calc(100vh - 20px);
        padding: 15px;
    }
}

/* 特殊元素样式 */
.acupoint-item {
    margin: 8px 0;
    padding: 12px 16px;
    background: rgba(248, 250, 252, 0.7); /* 70% 透明度 */
    border-radius: 8px;
    border-left: 3px solid #48bb78;
    transition: all 0.3s ease;
    text-align: left;
    line-height: 1.5;
}

.acupoint-item:hover {
    background: rgba(248, 250, 252, 1);
    transform: translateX(5px);
}

.acupoint-item input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.1);
}

.acupoint-item .camera-icon {
    cursor: pointer;
    margin-right: 8px;
    font-size: 16px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.acupoint-item .camera-icon:hover {
    opacity: 1;
}

/* 高亮状态 */
.acupoint-item.highlighted {
    background: rgba(72, 187, 120, 0.1);
    border-left-color: #48bb78;
}

.acupoint-item.marked {
    color: #e53e3e;
    text-decoration: underline;
    font-weight: 500;
}

/* 搜索框样式 */
.search-input {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 15px;
    border: 2px solid rgba(226, 232, 240, 0.8);
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    transition: all 0.3s ease;
    background: rgba(248, 250, 252, 0.7); /* 70% 透明度 */
    box-sizing: border-box;
}

.search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 清除按钮样式 */
.clear-btn {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    box-shadow: 0 4px 15px rgba(245, 101, 101, 0.3);
}

.clear-btn:hover {
    box-shadow: 0 6px 20px rgba(245, 101, 101, 0.4);
}