body {
    margin: 0;
    font-family: sans-serif;
    cursor: none;
    overflow: hidden;
}

#controls {
    padding: 10px;
    background-color: #333;
    text-align: center;
    position: relative;
    z-index: 2000;
    transition: transform 0.3s ease-in-out;
}

#controls.hidden {
    transform: translateY(-100%);
}

#controls button {
    padding: 10px 20px;
    border: none;
    background-color: #555;
    color: white;
    cursor: pointer;
    margin: 0 5px;
    font-size: 16px;
}

#controls button.active {
    background-color: #3498db;
}

/* 新的獨立切換按鈕樣式 */
#toggle-controls-btn {
    position: fixed; /* 固定在畫面上 */
    top: 10px;
    right: 10px;
    z-index: 5000; /* 確保在最最上層 */
    padding: 10px 15px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#game-container {
    width: 100vw;
    height: 100vh;
    background-color: #f0f0f0;
    position: absolute;
    top: 0;
    left: 0;
    border: 10px solid #888;
    box-sizing: border-box;
}

#score {
    position: absolute;
    top: 60px;
    left: 20px;
    font-size: 24px;
    z-index: 10;
    color: #333;
    display: none;
    transition: top 0.3s ease-in-out;
}

#custom-cursor {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 87, 34, 0.7);
    border-radius: 50%;
    position: absolute;
    pointer-events: none;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    z-index: 3000;
}

/* --- Popup --- */
#popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 4000;
    display: flex;
    justify-content: center;
    align-items: center;
}

#popup-overlay.hidden {
    display: none;
}

#popup-content {
    background: white;
    padding: 30px 40px;
    border-radius: 10px;
    text-align: center;
    font-size: 24px;
}

#popup-content button {
    padding: 10px 30px;
    margin-top: 20px;
    font-size: 20px;
    cursor: pointer;
    border: none;
    background: #2ecc71;
    color: white;
    border-radius: 5px;
}

/* --- 遊戲元素 --- */
.target, .ball {
    position: absolute;
    box-sizing: border-box;
}

.target {
    width: 80px;
    height: 80px;
    background-color: #3498db;
    border-radius: 50%;
    transition: top 0.2s, left 0.2s;
}

.target:hover {
    background-color: #2980b9;
}

.basket {
    position: absolute;
    width: 150px;
    height: 150px;
    border: 5px dashed #555;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.basket.hover {
    border-color: #2ECC71;
    box-shadow: 0 0 20px rgba(46, 204, 113, 0.7);
}

.ball {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    z-index: 100;
    user-select: none;
}

.ball.dragging {
    z-index: 200;
    opacity: 0.7;
    transform: scale(1.1);
}
