* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: fixed;
    background: linear-gradient(135deg, #f5f5f0 0%, #e8e8e3 50%, #f0f0eb 100%);
    touch-action: none;
}

#gameCanvas {
    position: fixed;
    top: 0;
    left: 0;
    display: block;
    width: 100vw;
    height: 100vh;
    cursor: pointer;
}

#soundToggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    cursor: pointer;
    z-index: 100;
    transition: background-color 0.2s;
    outline: none;
}

#soundToggle:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

#soundToggle:active {
    background-color: rgba(255, 255, 255, 0.7);
}

#soundToggle::before {
    content: '🔊';
    font-size: 20px;
    display: block;
    line-height: 44px;
    text-align: center;
}

#soundToggle.muted::before {
    content: '🔇';
}

#volumeControl {
    position: fixed;
    top: 20px;
    right: 80px;
    width: 100px;
    height: 44px;
    display: flex;
    align-items: center;
    z-index: 100;
}

#volumeSlider {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    cursor: pointer;
}

#volumeSlider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

#endButton {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    cursor: pointer;
    z-index: 100;
    transition: background-color 0.2s;
    outline: none;
    font-size: 28px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-family: Arial, sans-serif;
}

#endButton:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

#endButton:active {
    background-color: rgba(255, 255, 255, 0.7);
}

#startScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(245, 245, 240, 0.95) 0%, rgba(232, 232, 227, 0.95) 50%, rgba(240, 240, 235, 0.95) 100%);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
    cursor: pointer;
}

#startScreen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.start-content {
    text-align: center;
    color: #666;
    user-select: none;
}

.start-content h1 {
    font-size: 48px;
    font-weight: 300;
    margin-bottom: 20px;
    color: #888;
    letter-spacing: 2px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.start-content p {
    font-size: 18px;
    margin: 10px 0;
    color: #999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.start-content .hint {
    font-size: 14px;
    color: #bbb;
    margin-top: 30px;
    font-style: italic;
}

