* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 顶部工具栏样式 */
.toolbar {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

.btn-primary {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-secondary {
    background: linear-gradient(45deg, #f44336, #d32f2f);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.game-status {
    margin-left: auto;
    display: flex;
    gap: 20px;
}

.game-status span {
    font-weight: bold;
    color: #666;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 20px;
}

/* 主内容区域 */
.main-content {
    display: flex;
    gap: 20px;
    height: calc(100vh - 140px);
}

/* 游戏区域 */
.game-area {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameCanvas {
    border: 3px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    cursor: none; /* 隐藏默认鼠标指针 */
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
}

.game-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: bold;
    color: #666;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    z-index: 10;
}

/* 控制面板 */
.control-panel {
    width: 300px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.control-panel h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-size: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.parameter-group {
    margin-bottom: 20px;
}

.parameter-group label {
    display: block;
    font-weight: bold;
    color: #555;
    margin-bottom: 8px;
    font-size: 14px;
}

.parameter-group input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    margin-bottom: 8px;
    -webkit-appearance: none;
}

.parameter-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.parameter-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.parameter-group span {
    display: inline-block;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 12px;
    min-width: 40px;
    text-align: center;
}

.info-panel {
    margin-top: 30px;
    padding: 20px;
    background: rgba(103, 126, 234, 0.1);
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.info-panel h4 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 16px;
}

.info-panel ul {
    list-style: none;
    padding-left: 0;
}

.info-panel li {
    color: #555;
    margin-bottom: 8px;
    font-size: 13px;
    position: relative;
    padding-left: 15px;
}

.info-panel li:before {
    content: "•";
    color: #667eea;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .main-content {
        flex-direction: column;
    }
    
    .control-panel {
        width: 100%;
    }
    
    #gameCanvas {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .toolbar {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .game-status {
        margin-left: 0;
        justify-content: center;
    }
    
    #gameCanvas {
        width: 100%;
        max-width: 600px;
    }
}

/* 页脚样式 */
.footer {
    text-align: center;
    padding: 15px 0;
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 4px;
}

.footer a:hover {
    background: rgba(103, 126, 234, 0.1);
    color: #764ba2;
    text-decoration: underline;
}