* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Meiryo', sans-serif;
}

body {
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 90%;
    max-width: 500px;
}

h1 {
    color: #ff6b6b;
    margin-bottom: 10px;
}

.instructions {
    margin-bottom: 20px;
    color: #555;
    text-align: left;
}

.game-area {
    width: 100%;
    height: 400px;
    border: 2px solid #ddd;
    border-radius: 5px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    background-color: #e6f7ff;
}

#bird {
    width: 50px;
    height: 40px;
    position: absolute;
    top: 20px;
    left: calc(50% - 25px);
    z-index: 10;
}

.poop {
    width: 15px;
    height: 15px;
    position: absolute;
    z-index: 5;
    background-color: white;
    border-radius: 50%;
    border: 1px solid #ddd;
}

.target {
    width: 40px;
    height: 60px;
    position: absolute;
    bottom: 0;
    z-index: 1;
}

.person {
    background-color: #ff9800;
    border-radius: 50% 50% 0 0;
}

.object {
    background-color: #4caf50;
    border-radius: 5px;
}

.lucky {
    animation: lucky 0.5s infinite;
}

.white {
    background-color: white !important;
    transition: background-color 0.2s;
}

@keyframes lucky {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.score-area {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    font-size: 18px;
}

#start-btn, .sound-btn {
    padding: 10px 20px;
    background-color: #ff6b6b;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    transition: background-color 0.3s;
    margin: 0 5px;
}

.sound-btn {
    background-color: #4caf50;
    padding: 8px 15px;
    margin: 0;
    width: 100%;
}

.sound-btn:hover {
    background-color: #3d9140;
}

#start-btn:hover {
    background-color: #fa5252;
}

#start-btn:disabled {
    background-color: #adb5bd;
    cursor: not-allowed;
}

.controls {
    background-color: #f8f8f8;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    font-size: 14px;
}

.controls p {
    margin: 5px 0;
}

.audio-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    width: 100%;
}

#volume-slider {
    width: 60%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: #ddd;
    border-radius: 5px;
    outline: none;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #4caf50;
    cursor: pointer;
}

#volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #4caf50;
    cursor: pointer;
}

#volume-level {
    width: 40px;
    text-align: right;
}

/* モーダルスタイル */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 400px;
    text-align: center;
}

.modal-content h2 {
    color: #ff6b6b;
    margin-bottom: 15px;
}

.modal-content p {
    margin-bottom: 10px;
    font-size: 18px;
}

#close-modal {
    padding: 10px 20px;
    background-color: #ff6b6b;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 15px;
}

#close-modal:hover {
    background-color: #fa5252;
}