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

body {
    background: linear-gradient(180deg, #4ec0ca 0%, #2c8a94 100%);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'Arial', 'PingFang SC', sans-serif;
    overflow: hidden;
    touch-action: manipulation;
}

.game-wrapper {
    width: 100%;
    max-width: 500px;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
}

.game-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.game-title {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
}

.back-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.3);
}

.game-info-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.score-container,
.high-score-container,
.info-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.info-placeholder {
    visibility: hidden;
}

.score-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.score-value {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.game-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

#game-canvas {
    background: linear-gradient(180deg, #4ec0ca 0%, #2c8a94 50%, #ded895 50%, #ded895 100%);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.game-tip {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    text-align: center;
    margin-bottom: 20px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.game-over-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(5px);
}

.game-over-overlay.show {
    display: flex;
}

.game-over-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 30px 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.game-over-title {
    font-size: 28px;
    font-weight: 700;
    color: #e74c3c;
}

.final-score-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.final-score-label {
    font-size: 14px;
    color: #666;
}

.final-score-value {
    font-size: 48px;
    font-weight: 700;
    color: #f39c12;
}

.game-over-buttons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.back-to-start-btn {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: #333;
    padding: 14px 35px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 2px;
    transition: all 0.2s ease;
}

.back-to-start-btn:active {
    transform: scale(0.95);
    background: rgba(0, 0, 0, 0.15);
}

.retry-btn {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    border: none;
    color: #fff;
    padding: 14px 22px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 2px;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4);
    transition: all 0.2s ease;
}

.retry-btn:active {
    transform: scale(0.95);
}