.game-container {
    width: 100vw;
    height: 100vh;
    margin: 0;
    position: relative;
    overflow: hidden;
    font-family: 'Arial', sans-serif;
}

.game-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('bg.png');
    background-size: cover;
    background-position: center;
    filter: brightness(0.9);
    z-index: 0;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 5px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

.avatar {
    width: 40px;
    height: 40px;
    background-color: #ff4757;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.energy-bar {
    width: 150px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    overflow: hidden;
}

.energy-fill {
    height: 100%;
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    transition: width 0.3s ease;
}

.chances {
    display: flex;
    gap: 12px;
    padding: 5px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

.heart {
    width: 25px;
    height: 25px;
    background-color: #ff4757;
    position: relative;
    transform: rotate(45deg);
    transition: all 0.3s ease;
}

.heart:before,
.heart:after {
    content: '';
    width: 25px;
    height: 25px;
    background-color: #ff4757;
    border-radius: 50%;
    position: absolute;
    transition: all 0.3s ease;
}

.heart[style*="opacity: 0.3"],
.heart[style*="opacity: 0.3"]:before,
.heart[style*="opacity: 0.3"]:after {
    background-color: rgba(255, 71, 87, 0.3);
}

#gameCanvas {
    width: 100%;
    height: 100%;
    border: none;
    position: relative;
    z-index: 1;
}

.score-display {
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 20px;
    align-items: center;
}

.accuracy {
    font-size: 24px;
    color: #2ecc71;
    border-left: 2px solid rgba(255, 255, 255, 0.2);
    padding-left: 20px;
    display: flex;
    gap: 8px;
}

.wind-display {
    display: none;
}

.controls-container {
    display: flex;
    gap: 25px;
    align-items: center;
    justify-content: center;
    margin: 0 20px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 15px;
}

.control-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.control-item label {
    font-size: 13px;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.control-item input[type="range"] {
    width: 120px;
    height: 6px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
}

.control-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #2ecc71;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.control-item input[type="range"]::-webkit-slider-thumb:hover {
    background: #27ae60;
    transform: scale(1.1);
}

.wind-indicator {
    position: fixed;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2;
}

.wind-value {
    font-size: 42px;
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.wind-arrow {
    width: 40px;
    height: 40px;
    border: none;
    position: relative;
    transition: transform 0.3s ease;
}

.wind-arrow::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
    border-left: 40px solid #3498db;
    left: 0;
    top: 0;
    transform-origin: center;
    transition: border-left-color 0.3s;
}

.wind-label {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* 風速強度的顏色變化 */
.wind-strength-low .wind-arrow::after {
    border-left-color: #2ecc71;
}

.wind-strength-medium .wind-arrow::after {
    border-left-color: #f1c40f;
}

.wind-strength-high .wind-arrow::after {
    border-left-color: #e74c3c;
}

.touch-count {
    position: fixed;
    top: 80px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 18px;
    font-weight: bold;
    z-index: 9999;
    pointer-events: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.game-over {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 20px 40px;
    border-radius: 30px;
    font-size: 24px;
    font-weight: bold;
    z-index: 10000;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
} 