body {
    margin: 0;
    overflow: hidden;
}
canvas {
    display: block;
}
#controls-container {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    width: 90%; 
    max-width: 400px;
    gap: 10px;
}

.button-row {
    display: flex;
    gap: 10px;
}

#controls-container button {
    flex: 1; /* 核心：讓按鈕在 flex 容器中自動等分寬度 */
    padding: 10px 5px;
    font-size: 16px; /* 稍微加大字體以清晰顯示 */
    font-family: '微軟正黑體', sans-serif;
    background-color: rgba(30, 30, 30, 0.7);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    white-space: nowrap; 
}
#controls-container button:hover {
    background-color: rgba(0, 0, 0, 0.7);
}
#controls-container button:active {
    transform: scale(0.95);
}
#controls-container button:disabled {
    background-color: rgba(50, 50, 50, 0.5);
    color: #888;
    cursor: not-allowed;
}

/* --- 頁尾樣式 --- */
footer {
    position: absolute;
    bottom: 15px;
    width: 100%;
    text-align: center;
    color: #aaa;
    font-family: sans-serif;
    font-size: 14px;
    z-index: 100;
    text-shadow: 1px 1px 2px #000;
    pointer-events: none;
}

footer a {
    color: #fff;
    text-decoration: none;
    pointer-events: auto;
}

footer a:hover {
    text-decoration: underline;
}

/* --- Gizmo 樣式 --- */
#gizmo-container {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 150px;
    height: 150px;
    z-index: 101;
    pointer-events: none; /* The container itself doesn't capture clicks */
}

#gizmo-container canvas {
    pointer-events: auto; /* The canvas within the container can be interacted with */
}
