/* =========================================
   GLOBAL RESET
========================================= */

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


/* =========================================
   BODY
========================================= */

body {
    font-family: Arial, Helvetica, sans-serif;

    background:
        linear-gradient(
            to bottom,
            #9ad9ff,
            #e6f7ff
        );

    height: 100vh;
    width: 100vw;

    overflow: hidden;

    color: #2b3a42;
}


/* =========================================
   GAME CONTAINER
========================================= */

#game-container {
    position: relative;

    width: 100vw;
    height: 100vh;

    overflow: hidden;
}


/* =========================================
   CANVAS
========================================= */

#gameCanvas {
    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    display: block;

    background:
        linear-gradient(
            to bottom,
            #7fd6ff,
            #e9faff
        );

    z-index: 1;
}


/* =========================================
   GAME UI
========================================= */

#game-ui {
    position: absolute;

    top: 0;
    left: 0;

    width: 100%;

    z-index: 10;

    pointer-events: none;
}


/* =========================================
   TOP HUD
========================================= */

#score-display,
#level-display,
#timer-display,
#attempts-display {

    position: absolute;

    top: 20px;

    background:
        rgba(255, 255, 255, 0.94);

    padding: 12px 18px;

    border-radius: 12px;

    font-size: 20px;

    font-weight: bold;

    color: #1d3d57;

    box-shadow:
        0 5px 12px rgba(0, 0, 0, 0.12);

    white-space: nowrap;
}


/* =========================================
   HUD POSITIONS
========================================= */

#score-display {
    left: 20px;
}

#level-display {
    left: 160px;
}

#timer-display {
    right: 160px;
}

#attempts-display {
    right: 20px;
}


/* =========================================
   HUD VALUES
========================================= */

#score {
    color: #d99a00;
    margin-left: 5px;
}

#level {
    color: #3478b8;
    margin-left: 5px;
}

#timer {
    color: #e74c3c;
    margin-left: 5px;
}

#attempts {
    color: #3478b8;
    margin-left: 5px;
}


/* =========================================
   MUTE BUTTON
========================================= */

#mute-btn {
    position: absolute;

    top: 85px;
    right: 20px;

    width: 48px;
    height: 48px;

    padding: 0;

    border: none;
    border-radius: 50%;

    background:
        rgba(255, 255, 255, 0.94);

    font-size: 22px;

    cursor: pointer;

    pointer-events: auto;

    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.15);

    z-index: 20;
}

#mute-btn:hover {
    transform: scale(1.05);
}


/* =========================================
   BOTTOM DEFINITION PANEL
========================================= */

#target-display {

    position: absolute;

    left: 0;
    bottom: 0;

    width: 100%;

    min-height: 140px;

    padding: 16px 30px 20px;

    background:
        rgba(255, 255, 255, 0.97);

    border-top:
        4px solid #cde7f5;

    box-shadow:
        0 -5px 15px rgba(0, 0, 0, 0.12);

    text-align: center;

    z-index: 15;

    pointer-events: none;
}


/* =========================================
   DEFINITION LABEL
========================================= */

#target-display::before {
    content: "FIND THE WORD FOR:";

    display: block;

    margin-bottom: 8px;

    font-size: 17px;

    font-weight: bold;

    color: #5a6d7c;
}


/* =========================================
   DEFINITION TEXT
========================================= */

#target-word {

    display: block;

    max-width: 1000px;

    margin: 0 auto;

    font-size: 26px;

    line-height: 1.25;

    font-weight: bold;

    color: #123a52;

    letter-spacing: 0.5px;

    text-transform: none;
}


/* =========================================
   HIDDEN TEACHER PANEL
========================================= */

#teacher-panel {
    display: none !important;
}


/* =========================================
   MOBILE / SMALL SCREENS
========================================= */

@media (max-width: 900px) {

    #score-display,
    #level-display,
    #timer-display,
    #attempts-display {

        top: 10px;

        padding: 8px 10px;

        font-size: 15px;

        border-radius: 9px;
    }


    #score-display {
        left: 8px;
    }


    #level-display {
        left: 90px;
    }


    #timer-display {
        right: 90px;
    }


    #attempts-display {
        right: 8px;
    }


    #mute-btn {
        top: 58px;
        right: 10px;

        width: 40px;
        height: 40px;

        font-size: 18px;
    }


    #target-display {

        min-height: 120px;

        padding:
            12px
            15px
            15px;
    }


    #target-display::before {
        font-size: 14px;
        margin-bottom: 6px;
    }


    #target-word {
        font-size: 20px;
    }
}


/* =========================================
   VERY SMALL SCREENS
========================================= */

@media (max-width: 500px) {

    #score-display,
    #level-display,
    #timer-display,
    #attempts-display {

        font-size: 12px;

        padding: 7px 8px;
    }


    #level-display {
        left: 78px;
    }


    #timer-display {
        right: 78px;
    }


    #target-word {
        font-size: 18px;
    }
}
