* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

body {
    background: url('assets/bg.jpg') center/cover no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
}

@media (min-width: 800px) {
    #game-container {
        /* No constraints, let it fill the whole screen */
    }
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#top-bar {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: auto;
}

.icon-btn {
    background: rgba(40, 20, 10, 0.6);
    border: 2px solid rgba(255, 200, 100, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    color: #ffd27f;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.icon-btn:hover {
    background: rgba(60, 30, 15, 0.8);
    transform: scale(1.1);
    border-color: rgba(255, 200, 100, 0.8);
}

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

#level-display {
    color: #fff0d4;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    background: rgba(40, 20, 10, 0.6);
    padding: 10px 30px;
    border-radius: 30px;
    border: 2px solid rgba(255, 200, 100, 0.3);
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

#level-complete {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(30, 15, 5, 0.95);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    border: 2px solid #f39c12;
    pointer-events: auto;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.9);
    display: flex;
    flex-direction: column;
    gap: 20px;
    opacity: 1;
    transition: opacity 0.3s;
    z-index: 100;
}

#level-complete.hidden {
    opacity: 0;
    pointer-events: none;
}

#level-complete h2 {
    color: #f1c40f;
    font-size: 36px;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.primary-btn {
    background: linear-gradient(135deg, #f39c12, #d35400);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 20px;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4);
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.6);
}

.primary-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(243, 156, 18, 0.4);
}
