* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Hind Siliguri', sans-serif;
    background-color: #0b0c10;
    color: #c5c6c7;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}



/* In-Game HUD */
#game-hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Let clicks pass through to canvas */
    z-index: 20;
    font-family: Arial, sans-serif;
}

#game-hud > * {
    pointer-events: auto; /* Enable clicks on HUD elements */
}

/* Top Bar */
.hud-top {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.pause-btn {
    background: linear-gradient(180deg, #1c3d5a, #0b1a2a);
    color: #4facfe;
    border: 2px solid #00f2fe;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
    transition: 0.2s;
}
.pause-btn:active { transform: scale(0.9); }

.boss-hud {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 40%;
}
.boss-title {
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    letter-spacing: 1px;
    margin-bottom: 2px;
}
.health-bar-container {
    width: 100%;
    background: rgba(0,0,0,0.7);
    border: 1px solid #444;
    border-radius: 4px;
    height: 16px;
    position: relative;
    overflow: hidden;
}
.health-fill {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    font-weight: bold;
    transition: width 0.2s;
}
.boss-health .health-fill {
    background: linear-gradient(90deg, #ff416c, #ff4b2b);
}

.score-container {
    text-align: right;
    color: #fff;
}
.score-label {
    color: #a0b0c0;
    font-size: 12px;
}
.score-val {
    color: #ffeb3b;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 235, 59, 0.5);
}
.coin-val {
    font-size: 14px;
    margin-top: 5px;
    font-weight: bold;
}
.coin-icon {
    font-size: 16px;
}



#game-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 100vh;
    background: url('game_bg.png') center/cover no-repeat;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none; /* Important for mobile swiping */
}

#start-screen, #game-over {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 10;
}

#game-over {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 50;
}

.game-over-modal {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
    border: 2px solid #ff416c;
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 0 30px rgba(255, 65, 108, 0.5), inset 0 0 20px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 80%;
    max-width: 400px;
    animation: popIn 0.3s ease-out;
}

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.game-over-title {
    font-family: 'Hind Siliguri', sans-serif;
    font-weight: 700;
    font-size: 42px;
    color: #ff416c;
    text-transform: uppercase;
    text-shadow: 0 0 15px rgba(255, 65, 108, 0.8);
    margin: 0;
    line-height: 1;
}

.game-over-score {
    font-size: 24px;
    color: #cbd5e1;
    margin: 0;
    text-align: center;
}

.final-score-val {
    font-size: 56px;
    font-weight: bold;
    color: #ffeb3b;
    text-shadow: 0 0 20px rgba(255, 235, 59, 0.6);
    display: block;
    margin-top: 10px;
}

/* Image Start Screen */
.bg-image-screen {
    background: url('bg.png') center/cover no-repeat;
    justify-content: flex-end !important;
    padding-bottom: 50px;
}

/* Logo */
.logo-container {
    position: absolute;
    top: 15%;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.bangla-logo {
    font-family: 'Hind Siliguri', sans-serif;
    font-weight: 700;
    font-size: 56px;
    color: #e0e0e0;
    background: linear-gradient(to bottom, #ffffff, #a0b0c0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(0, 150, 255, 0.8));
    margin-bottom: -15px;
    line-height: 1;
}
.bangla-subtitle {
    font-family: 'Hind Siliguri', sans-serif;
    font-weight: 700;
    font-size: 48px;
    background: linear-gradient(to bottom, #4facfe, #00f2fe);
    -webkit-background-clip: text;
    filter: drop-shadow(0 0 8px rgba(0, 242, 254, 0.8));
    margin-bottom: 15px;
    line-height: 1;
}
.logo-wings {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 250px;
    height: 30px;
    position: relative;
}
.wing {
    width: 100px;
    height: 8px;
    background: linear-gradient(90deg, transparent, #00f2fe);
    position: absolute;
}
.wing.left-wing { left: 0; transform: skewX(45deg); }
.wing.right-wing { right: 0; background: linear-gradient(-90deg, transparent, #00f2fe); transform: skewX(-45deg); }
.center-shield {
    width: 40px;
    height: 20px;
    background: #00f2fe;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    box-shadow: 0 0 15px #00f2fe;
}

/* Play Button */
.play-btn {
    background: linear-gradient(180deg, #ffcc00, #d87b00);
    color: white;
    font-size: 28px;
    padding: 15px 30px;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.6);
    box-shadow: 0 0 20px rgba(255, 170, 0, 0.8), inset 0 0 10px rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
    font-family: 'Hind Siliguri', sans-serif;
    cursor: pointer;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    width: max-content;
    min-width: 200px;
    transition: transform 0.2s;
    z-index: 10;
    margin-bottom: 10px;
}
.play-btn:hover {
    transform: scale(1.05);
}
.play-icon { font-size: 24px; margin-top: 2px; }

.hidden {
    display: none !important;
}

h2 {
    font-size: 32px;
    color: #66fcf1;
    margin-bottom: 10px;
}

p {
    font-size: 18px;
    margin-bottom: 20px;
    padding: 0 20px;
}

button {
    padding: 12px 25px;
    font-size: 18px;
    background: #45a29e;
    color: #1f2833;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    font-family: 'Hind Siliguri', sans-serif;
    transition: 0.3s;
}

button:hover {
    background: #66fcf1;
    transform: scale(1.05);
}

@media (max-width: 600px) {
    #game-container {
        height: 100vh;
    }
}
