/* ====== 🌍 GLOBAL STYLES ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    text-align: center;
    color: #1b1b1b;
}

/* ==== HOME SCREEN STYLES ====== */
#homeScreen {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    
    /* background image path */
    background-image: url('../assets/images/homeScreenBg.png'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

#homeScreen::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.15));
}

#homeContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 24px;
}

/* Start Game Button */
#startGameBtn {
    margin-top: 20px;
    padding: 14px 34px;
    font-size: 18px;
    background: linear-gradient(135deg, #ffd54f, #ffb300);
    color: #1b1b1b;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

#startGameBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.25);
}

.home-card {
    max-width: 520px;
    width: 100%;
    padding: 28px 30px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
    text-align: left;
}

.home-card h1 {
    font-size: 40px;
    margin-bottom: 8px;
}

.home-tagline {
    font-size: 16px;
    margin-bottom: 16px;
    color: #3c3c3c;
}

.home-controls {
    list-style: none;
    padding: 0;
    margin: 0 0 8px 0;
}

.home-controls li {
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 15px;
}

.home-note {
    margin-top: 10px;
    font-size: 14px;
    color: #4d4d4d;
}
/* ====== 💬 DIALOGUE SCREEN STYLES ====== */
#dialogueContainer {
    position: fixed;
    inset: 0;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(24, 24, 24, 0.92), rgba(38, 60, 34, 0.92)),
        radial-gradient(circle at top, rgba(255, 255, 255, 0.18), rgba(0, 0, 0, 0.5));
    backdrop-filter: blur(6px);
}

/* Dialogue Box */
#dialogueBox {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(10, 10, 10, 0.92);
    padding: 26px 28px;
    border-radius: 22px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(5px); /* Adds a nice blur effect */
    max-width: 620px;
    width: min(90%, 640px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dialogue-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

#skipButton {
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.15);
    color: #f5f5f5;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s ease, background 0.2s ease;
}

#skipButton:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.25);
}
/* Chat Bubble Layout */
#dialogueContent {
    display: flex;
    align-items: flex-start;
    width: 100%;
    padding: 10px 6px;
    border-radius: 10px;
    max-width: 500px;
}

/* Speaker Image */
#speakerImage {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 10px;
    border: 3px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}

/* Speech Bubble */
#dialogueText {
    padding: 14px 16px;
    border-radius: 15px;
    font-size: 17px;
    max-width: 80%;
    text-align: left;
    line-height: 1.5;
}

/* Manager's Message (Left Side) */
.manager {
    background: linear-gradient(to right, #007BFF, #0056b3);
    color: white;
    align-self: flex-start;
    box-shadow: 2px 6px 14px rgba(0, 0, 255, 0.35);
}

/* Mike's Message (Right Side) */
.mike {
    background: linear-gradient(to right, #28A745, #1c7430);
    color: white;
    align-self: flex-end;
    box-shadow: 2px 6px 14px rgba(0, 128, 0, 0.35);
}

/* Next Button */
#nextButton {
    padding: 10px 20px;
    background: linear-gradient(135deg, #ffd54f, #ffb300);
    color: black;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0px 4px 8px rgba(255, 204, 0, 0.3);
}

#nextButton:hover {
    transform: translateY(-2px);
    box-shadow: 0px 8px 16px rgba(255, 204, 0, 0.35);
}
/* ====== GAME INTERFACE STYLES ====== */
#gameContainer {
    width: 100vw;
    height: 100vh;
    background-color: #D0E1AD;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}
/* Forcefully hide dialogue container when the game starts */

/* Game Canvas */
canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#hud {
    position: absolute;
    top: 20px;
    left: 20px;
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 160px));
    gap: 12px;
    z-index: 5;
    width: 100%;
    justify-content: center;
}

.hud-card {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 16px;
    padding: 10px 14px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    text-align: left;
}

.hud-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #5f5f5f;
}

.hud-value {
    font-size: 22px;
    font-weight: 700;
    color: #1b1b1b;
}

@media (max-width: 720px) {
    #hud {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }
}


/* ====== GAME RESULT SCREEN (OVERLAY) ====== */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.overlay-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Restart Button */
#restartBtn {
    margin-top: 20px;
    padding: 10px 20px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

#restartBtn:hover {
    background: #218838;
}

/* ====== 🕹️ GAMEPLAY UI ELEMENTS ====== */
/* Timer Display */
.timer {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 18px;
    font-weight: bold;
    color: black;
}

/* NPC Styling */
.npc {
    background: orange;
    border-radius: 10px;
}

/* Player Jump Shadow (Visual Indicator) */
.player-shadow {
    position: absolute;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* Responsive Adjustments */
@media (max-width: 600px) {
    #chatMessages {
        max-height: 200px;
    }

    .message {
        font-size: 14px;
    }

    #dialogueNextBtn {
        font-size: 14px;
        padding: 8px 15px;
    }

    .dialogue-text {
        font-size: 16px;
    }
}
/* Hide game overlay until the game ends */
.hidden {
    display: none !important; /* Ensures it's fully removed */
} 
