/* Body & Base Styles */
body {
    background: linear-gradient(135deg, #000428, #0164ba);
    color: #eee;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Main container to center Landing Page */
.main-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
}

/* Landing Page Styles */
.landing-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 600px;
    background: rgba(10, 10, 30, 0.85);
    padding: 30px 40px;
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
    box-sizing: border-box;
    height: auto;
    max-height: 90vh;
}

/* All children except start button have bottom margin for spacing */
.landing-container> :not(.start-button) {
    margin-bottom: 20px;
}

/* Push start button to bottom */
.start-button {
    margin-top: auto;
    background-color: #00d4ff;
    border: none;
    padding: 15px 40px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #001f3f;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 0 20px #00ffff;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.start-button:hover {
    background-color: #00ffff;
    transform: scale(1.1);
}

/* Game Title */
.game-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 10px;
    text-shadow: 0 0 10px #00ffff;
}

/* Blurb */
.blurb {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    line-height: 1.4;
    color: #cceeff;
}

/* Instructions */
.instructions {
    text-align: left;
    color: #a0d8f7;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
}

.instructions h2 {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    margin-bottom: 10px;
    text-shadow: 0 0 5px #00cccc;
}

.instructions ul {
    list-style: inside disc;
    line-height: 1.5;
}

/* Game Area Wrapper */
.game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Updated Game Area (larger) */
.game-area {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    box-sizing: border-box;
    width: 80vw;
    max-width: 770px;
    height: 95vh;
    max-height: 1000px;

    padding: 3%;
    margin-bottom: 20px;

    border: 5px solid #333;
    border-radius: 10px;
    background-color: #1a1a1a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);

    display: flex;
    justify-content: center;
    align-items: center;
}

/* Canvas inside game area */
canvas#canvas {
    width: 93%;
    height: 100%;
    display: block;
    border: 2.5px solid #fff;
    background: url("../images/background.jpg");
    background-size: cover;
    background-position: center;
    object-fit: contain;
    box-sizing: border-box;
}

/* Updated Score Area - under game, left/right aligned */
.score-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 85vw;
    max-width: 900px;
    margin: 0 auto 30px auto;
    padding: 0 20px;
    font-size: 2rem;
    font-weight: bold;
    color: #eee;
    user-select: none;
}

.score-area .score span {
    color: rgb(245, 17, 17);
}

.score-area .health span {
    color: pink;
}

/* Game Over Screen */
#game-over-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-family: sans-serif;
    font-size: 32px;
    text-align: center;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    z-index: 20;
}

#restart-button {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 20px;
    cursor: pointer;
}

.hidden {
    display: none !important;
}

footer {
    position: fixed;
    bottom: 10px;
    left: 10px;
    color: #fff;
    font-size: 0.9rem;
    z-index: 100;
}

/* Media Queries for Laptops (1024px to 1440px) */
@media (min-width: 1024px) and (max-width: 1440px) {
    .landing-container {
        padding: 25px 35px;
    }

    .game-title {
        font-size: 2.5rem;
    }

    .blurb {
        font-size: 1.1rem;
    }

    .instructions {
        font-size: 1rem;
    }

    .game-area {
        width: 85vw;
        height: 65vh;
    }

    .score-area {
        width: 90vw;
        padding: 0 15px;
        font-size: 1.8rem;
    }
}