@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: #dcdcdc;
    /* Light gray from screenshot */
    color: #333;
    font-family: 'Outfit', sans-serif;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    transition: background 1s ease;
}

body.hard-mode {
    background: #f8d7da;
    /* Light red/pinkish background */
    animation: pulseBG 3s infinite alternate;
}

@keyframes pulseBG {
    0% {
        background: #f8d7da;
    }

    100% {
        background: #f5c6cb;
    }
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    pointer-events: none;
    z-index: 100;
}

.top-bar > * {
    pointer-events: auto;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.stats {
    font-size: 1.5rem;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.6);
    padding: 8px 15px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.level-indicator {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 10px 30px;
    border-radius: 30px;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: #333;
}

.glass-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
    color: #333;
}

.glass-panel.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -40%) scale(0.9);
}

.glass-panel h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.game-over-title {
    color: #e74c3c;
}

.glass-panel p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.reward-text {
    font-size: 1.5rem !important;
    color: #f39c12;
    font-weight: bold;
}

.settings-modal {
    width: 90%;
    max-width: 400px;
    z-index: 1000;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.setting-item label {
    font-size: 1.1rem;
    font-weight: 500;
}

.setting-item input[type="color"] {
    width: 50px;
    height: 30px;
    border: none;
    cursor: pointer;
    background: none;
}

button {
    background: #2B2E3D;
    border: none;
    color: white;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-family: inherit;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(43, 46, 61, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(43, 46, 61, 0.6);
}

button:active {
    transform: translateY(1px) scale(0.95);
}