* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
}

body {
    background: linear-gradient(135deg, #0f1424 0%, #1e293b 100%);
    overflow: hidden;
    color: #f8fafc;
}

#container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

/* 加载动画 */
#loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 215, 0, 0.3);
    border-top: 5px solid #ffd700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 面板样式 */
.panel {
    background: rgba(15, 20, 36, 0.85);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

#infoPanel {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 320px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

#infoPanel h2 {
    color: #ffd700;
    font-size: 1.5rem;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 10px;
}

#defaultInfo p {
    line-height: 1.8;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

#defaultInfo .tip {
    color: #38bdf8;
    font-weight: bold;
}

/* 可视化Canvas */
#visualizationCanvas {
    width: 100vw;
    height: 100vh;
    display: block;
    cursor: grab;
}

#visualizationCanvas:active {
    cursor: grabbing;
}

/* 控制栏 */
#controlBar {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    padding: 12px 25px;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #f8fafc;
    padding: 8px 18px;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: #ffd700;
    color: #0f1424;
    transform: translateY(-2px);
}

.control-btn i {
    font-size: 1rem;
}

/* 提示框 */
#tooltip {
    position: absolute;
    background: rgba(15, 20, 36, 0.95);
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 0.9rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 150;
    max-width: 220px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* 滚动条样式优化 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.5);
}

/* 响应式调整 */
@media (max-width: 768px) {
    #infoPanel {
        width: calc(100vw - 40px);
        max-height: 30vh;
    }
    
    #controlBar {
        flex-wrap: wrap;
        justify-content: center;
        bottom: 10px;
        padding: 10px;
    }
    
    .control-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}