div:not(.export), a, span, img, button, br, svg {
    -webkit-touch-callout: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    user-drag: none;
    -moz-user-select: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

@font-face {
    font-family: 'play-regular';
    font-family: "Play", sans-serif;
  font-weight: 400;
  font-style: normal;
 
}

/* Body Styling */
body {
    z-index: 2;
    overflow: hidden;
    background: url("../images/teacherweb.png");
    background-size: cover;
}

html, body {
    font-family: 'Jua';
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

html {
  /*  background: #3ea8f3; */
}



.teacherhassen_panel {
  display: block;
  background: url("../images/mainpanel.png") top right no-repeat;
    width: 1280px;
    height: 960px;
    position: relative;
}

.teacherhassen_screen {
    width: 1280px;
    height: 960px;
    position: relative;
    transform-origin: top left;
}

.teacherhassen_btns {
    position: relative;
    text-align: center;
    width: 100%;
    padding-top: 400px;
}

/*.logo {
    padding-top: 65px;
}*/

.button.confirmMode {
  font-weight: 700;
}


/* Shared Button Styles */
.button {
    cursor: pointer;
    text-align: center;
    font-family: "Play", serif;
    font-size: 50px;
    letter-spacing: 3px;
    width: 370px;
    height: 77px;
    border-radius: 40px;
    border: 6px solid #ffffff;
    background: linear-gradient(135deg, #0881b7, #2fbbac);
    line-height: 77px;
    margin: 20px auto;
    box-shadow: 0 0 20px rgba(110, 130, 251, 0.7), 0 0 40px rgba(110, 130, 251, 0.5), 0 0 60px rgba(110, 130, 251, 0.3);
    -moz-box-shadow: 0 0 20px rgba(110, 130, 251, 0.7), 0 0 40px rgba(110, 130, 251, 0.5), 0 0 60px rgba(110, 130, 251, 0.3);
    -webkit-box-shadow: 0 0 20px rgba(110, 130, 251, 0.7), 0 0 40px rgba(110, 130, 251, 0.5), 0 0 60px rgba(110, 130, 251, 0.3);
    transition: all 0.3s ease;
    color: #000000;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    font-variation-settings: "MORF" 15, "SHLN" 30;
}


.button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: -100%;
    width: 50%;
    height: 200%;
    background: rgba(255, 255, 255, 0.2);
    transform: skewX(-25deg) translateY(-50%);
    transition: left 0.5s ease;
}

.button:hover::after {
    left: 150%;
}

.button:hover {
    box-shadow: 0 12px 20px rgba(0, 114, 255, 0.4);
}

.button:active {
    transform: scale(0.95);
    box-shadow: 0 4px 10px rgba(0, 114, 255, 0.2);
}

/* Specific Styles for Exit Back from Level Button */
.exit_btn {
    background: linear-gradient(135deg, #ff7e5f, #feb47b);
}
.back_level {
    background: linear-gradient(135deg, #ff7e5f, #feb47b);
}

.lb_back {
    background: linear-gradient(135deg, #ff7e5f, #feb47b);
}

/* Optional: Container to manage button layout */
.button-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}



.teacherhassen_wordpanel {
    display: none;
    background: url("../images/background.png") top right no-repeat;
    width: 1280px;
    height: 960px;
    position: relative;
    font-family: Jua;
    font-size: 26px;
    overflow: hidden;
}

.letter {
    padding: 14px;
    cursor: pointer;
    font-family:Jua;
}

[data-findletter] {
    margin: 0px 10px;
}

    [data-findletter]:after {
        content: "_";
    }

[data-findletter-space] {
    margin: 0px 10px;
}

    [data-findletter-space]:after {
        content: " ";
    }

.th_guessedword {
    margin-bottom: 65px;
    color: white;
    text-shadow: 2px 3px 3px rgba(0, 0, 0, 0.7);
    margin-top: 5px;
}


.alphabets {
    color: #c8c8c8;
    line-height: 126px;
    text-shadow: 4px 4px 4px rgba(0 0 0 / 60%);
    margin-top: 15px;
}
/* Hide the numeric counter */
.attemptnumber {
    display: none;
}

/* Position the attempts panel at the top of its parent container */
.th_attempts {
    position: absolute;
    top: 20px; /* Adjust as needed */
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    z-index: 10; /* Ensure it overlays other elements if necessary */
}

/* Flex container for the circles */
.attemptsboard {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px; /* Increased gap for larger circles */
    margin-top: 10px;
}

/* Base styling for each attempt circle */
.attempt-circle {
    width: 80px;
    height: 80px;
    border: 4px solid #e4410d;
    border-radius: 50%;
    background-color: #fff; /* Inactive attempts are white */
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

    /* When an attempt is used, immediately set background to red */
    .attempt-circle.attemptsboard_active {
        background-color: #e44a0d;
    }

        /* Use pseudo-elements to draw the complete X */
        .attempt-circle.attemptsboard_active::before,
        .attempt-circle.attemptsboard_active::after {
            content: "";
            position: absolute;
            background-color: #fff; /* Color of the X */
            height: 7px; /* Thickness of the line */
            width: 60px; /* Final length of each line */
            top: 50%;
            left: 50%;
            /* Set the transform origin to the center so the animation grows outward in both directions */
            transform-origin: center;
            /* Start with the line collapsed (scaleX(0)) */
            transform: translate(-50%, -50%) scaleX(0);
        }

        /* First stroke: rotated 45° (diagonal from top-left to bottom-right) */
        .attempt-circle.attemptsboard_active::before {
            transform: translate(-50%, -50%) rotate(45deg) scaleX(0);
            animation: drawX1 1s ease forwards;
            animation-delay: 0.2s;
        }

        /* Second stroke: rotated -45° (diagonal from top-right to bottom-left) */
        .attempt-circle.attemptsboard_active::after {
            transform: translate(-50%, -50%) rotate(-45deg) scaleX(0);
            animation: drawX2 1s ease forwards;
            animation-delay: 0.4s;
        }

@keyframes drawX1 {
    to {
        transform: translate(-50%, -50%) rotate(45deg) scaleX(1);
    }
}

@keyframes drawX2 {
    to {
        transform: translate(-50%, -50%) rotate(-45deg) scaleX(1);
    }
}



.displayscore {
    top: 40px;
    left: 60px;
    position: absolute;
    width: 220px;
}


.img_solved {
    margin-top: 20px;
}

.img_solved2 {
    max-height: 210px;
    width: auto;
    height: auto;
    margin-top: 17px;
    border: 10px solid #d5bd73 ;
}

.correct-letter {
    color: #78aa58;
}

.wrong-letter {
    color: #e44a0d;
}

.correct-word {
    color: #78aa58;
}

.failed-letter {
    color: #e44a0d;
}


#playingTeam {
    /* text-shadow: 0 0 70px #F5E60A; */
}

.th_scorepanel {
    display: none;
    /*    background: url("../images/background4.png") top right no-repeat;
*/ width: 1280px;
    height: 960px;
    position: relative;
    color: #4d5eaa;
    font-family: Jua;
    font-size: 70px;
    text-align: center;
}

.scoredata {
    padding-top: 234px;
    line-height: 70px;
}


.th_continue {
    position: absolute;
    top: 834px;
    left: 30px;
    cursor: pointer;
    text-align: center;
    font-weight: normal;
    font-family: Jua;
    font-size: 43px !important;
    width: 320px;
    height: 77px;
    border-radius: 80px;
    background: white;
    border: 4px solid black;
    line-height: 81px;
    box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.8);
    -moz-box-shadow: 0 2px 2px rgba(0, 0, 0, 0.8);
    -webkit-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.8);
    margin: 30px auto;
    color: black;
}



.th_gameset {
    margin: 198px 110px;
    text-align: center;
    font-family: Jua;
     font-family: "Jua", serif;
     font-size: 100px;
    margin-bottom: 0px;
}

.back_questions {
    margin-left: -870px;
    margin-top: -45px;
}


.th_howtoplayscreen {
    display: none;
    background: url("../images/howtobg.png") top right no-repeat;
    width: 1280px;
    height: 960px;
    position: relative;
}

.th_howtoplaydata {
margin: 0 auto;
width: 680px;
padding-top: 318px;
}


.howtotext {
    margin-top: -70px;
    font-family: Jua;
    font-size: 28px;
    line-height: 38px;
}

    .howtotext ul {
        width: 743px;
    }

.th_back , .continue, .lb_level_back {
    position: absolute;
    top: 757px;
    left: 30px;
    cursor: pointer;
    text-align: center;
    font-weight: normal;
    font-family: "Play", serif;
    font-size: 43px !important;
    width: 320px;
    height: 77px;
    border-radius: 40px;
    border: 6px solid #ffffff;
    background: linear-gradient(135deg, #3ea8f3, #6a82fb);
    line-height: 83px;
    margin: 105px auto;
    color: black;
}


/* Countdown Timer Styles - Left */
.timerDisplayContainer {
    position: fixed;
    top: 30px;
    left: 20px; /* Positioned on the left side */
    width: 150px;
    height: 150px;
    z-index: 1000;
}

/* Countdown Timer Styles - Right */
.timerDisplayContainerRight {
    position: fixed;
    top: 30px;
    right: 20px; /* Positioned on the right side */
    width: 150px;
    height: 150px;
    z-index: 1000;
}

/* Style the img_solved elements to center the images */
/* Image Containers */
.img_solved_right {
    right: 20px; /* Positioned on the right side */
    position: fixed;
    top: 40px;
    width: 200px;
    height: 200px;
    z-index: 1000;
}

.img_solved_left {
    left: 20px; /* Positioned on the left side */
    position: fixed;
    top: 40px;
    width: 200px;
    height: 200px;
    z-index: 1000;
}

.img_solved {
    width: 100%;
    height: calc(100vh - 200px); /* Adjust based on sidebar height minus other elements */
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin-top: -90px; /* Adjust position slightly */
    pointer-events: none; /* Ignore pointer interactions */
}

    .img_solved img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain; /* Ensures the image scales without distortion */
        pointer-events: none; /* Ignore pointer interactions */
    }

#countdownCanvasLeft, #countdownCanvasRight {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 0, 255, 0);
    background: white;
}

/* Volume Control Styles */
.volumeControl {
    position: fixed;
    bottom: 20px;
    left: 20px; /* Changed from right to left */
    z-index: 1001;
    font-family: Play;
    color: black;
    display: flex;
    align-items: center;
    font-size: 20px;
}

#toggleVolume {
    margin-left: 10px;
    padding: 5px 10px;
    font-size: 18px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background: orange;
    color: black;
    transition: background 0.3s, color 0.3s;
}

    #toggleVolume:hover {
        background: black;
        color: white;
    }
    
    /* Alphabet Mode Switch Styles */
.alphabetModeControl {
    position: fixed;
    bottom: 60px; /* Stack above the volume control */
    left: 20px;
    z-index: 1001;
    font-family: Play;
    color: black;
    display: flex;
    align-items: center;
    font-size: 20px;
}

#toggleAlphabetMode {
    margin-left: 10px;
    padding: 5px 10px;
    font-size: 18px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background: #c8c8c8;
    color: black;
    transition: background 0.3s, color 0.3s;
}

#toggleAlphabetMode:hover {
    background: black;
    color: white;
}



/* Blue Glow Effects */
.blue-glow {
    animation: redGlow 2s infinite;
}

@keyframes redGlow {
    0% {
        background-color: black;
    }

    50% {
        background-color: blue;
    }

    100% {
        background-color: black;
    }
}

/*#red-glow-fast {
    animation: redGlowFast 0.5s infinite;
}

@keyframes redGlowFast {
    0% {
        background-color: black;
    }

    50% {
        background-color: red;
    }

    100% {
        background-color: black;
    }
} */

#gamescore {
    color: black;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
    font-family: Jua;
    font-size: 45px;
    padding: 0px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

/* Leaderboard Panel Styles */
.leaderboardPanel h2 {
    font-family: "Play", serif;
    font-size: 70px;
    margin: 0 0 20px 0; /* Add space below the heading */
    color: #000000;
    /* Optional: center the heading horizontally */
    text-align: center;
}

.leaderboardPanel {
    display: none;
  /* background: url("../images/BG.jpg") top right no-repeat; */
    background-size: cover;
    width: 1280px;
    height: 960px;
    position: relative;
    font-size: 22px;
    overflow: hidden;
}


.leaderboardContent {
    position: absolute;
    left: 277px;
    width: 720px;
    height: 509px;
    /* Enhanced vibrant gradient background 
    background: linear-gradient(135deg, #ff00ff 0%, /* Bright magenta */
    /*#ff0090 25%, #bf00ff 50%, #6200ea 75%, #3b00b2 100%);
    text-align: center;
    border: 4px solid #e600ff;*/ /* Slightly thicker neon border */
    /*border-radius: 12px;*/ /* Increased rounding for a smoother look */
    /* Enhanced box shadow for depth and glow */
/*    box-shadow: 0 4px 15px rgba(230, 0, 255, 0.6), 0 0 25px rgba(230, 0, 255, 0.4);
*/    /* Optional smooth transition for hover effects */
    /*transition: transform 0.3s ease, box-shadow 0.3s ease;*/
}

    /* Optional hover effect for interactivity */
/*    .leaderboardContent:hover {
        transform: scale(1.02);
        box-shadow: 0 8px 25px rgba(230, 0, 255, 0.8), 0 0 40px rgba(230, 0, 255, 0.6);
    }
*/

.leaderTitle {
    font-size: 55px;
    margin-top: 40px;
    color: white;
}

.leaderboardContent span {
    color: #000000; /* Sets text color to white */
    font-size: 100px;
    font-family: Play;
    font-variation-settings: "MORF" 15, "SHLN" 30;
}



/* CSS FOR LEADERBOARD */
/* CSS FOR LEADERBOARD */

/* Import Elegant Fonts from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Roboto:wght@400;500&display=swap');

/* Global Styling for Leaderboard */
.leaderTitle {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    position: relative;
}

    .leaderTitle::after {
        content: '';
        width: 80px;
        height: 4px;
        background: linear-gradient(90deg, #6a82fb, #fc5c7d);
        display: block;
        margin: 15px auto 0;
        border-radius: 2px;
    }

/* Top Three Players Section */
.leaderTopThree {
    display: flex;
    justify-content: space-around;
    gap: 30px;
    margin-bottom: 40px;
    position: relative;
}

.leaderCard {
    position: relative;
    flex: 1;
    background: linear-gradient(135deg, #f503fe 0%, #f8f8f8 25%, #44d1fd 50%, #8a4afb 75%, #f0f0f0 100%);
    padding: 25px 20px;
    border-radius: 15px;
    text-align: center;
    color: #34495e;
    font-family: 'Roboto', sans-serif;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    /* Removed overflow: hidden; to prevent cropping of rank badges */
    /* overflow: hidden; */
}

    .leaderCard:hover {
        transform: translateY(-10px) scale(1.02);
        box-shadow: 0 15px 25px rgba(0, 0, 0, 0.2);
    }

    /* Rank Badge */
    .leaderCard .rank {
        position: absolute;
        top: -20px;
        left: 50%;
        transform: translateX(-50%);
        background: #FEE101;
        width: 50px;
        height: 50px;
        line-height: 50px;
        border-radius: 50%;
        font-size: 1.5rem;
        font-weight: bold;
        color: white;
        border: 3px solid blue;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        z-index: 1; /* Ensures the rank badge appears above other elements */
    }

.secondPlace .rank {
    background: #A7A7AD;
}

.thirdPlace .rank {
    background: #A77044;
}

/* Player Name */
.leaderCard .name {
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 15px;
    font-family: 'Playfair Display', serif;
    color: #2c3e50;
}

/* Player Score */
.leaderCard .score {
    font-size: 1.4rem;
    margin-top: 5px;
    color: black;
    font-family: 'Roboto', sans-serif;
    position: relative;
}

    /* Decorative Line Under Score */
    .leaderCard .score::after {
        content: '';
        display: block;
        width: 60%;
        height: 2px;
        background: linear-gradient(90deg, #6a82fb, #fc5c7d);
        margin: 10px auto 0;
        border-radius: 1px;
    }

/* Ranks 4 to 10 Section */
.leaderGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    background: #ffffff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.gridItem {
    background: #f9f9f9;
    padding: 15px 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

    .gridItem:hover {
        transform: translateY(-5px);
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    }

    /* Rank Styling for Grid Items */
    .gridItem .rank {
        font-size: 1.2rem;
        font-weight: 700;
        color: #ffffff;
        position: absolute;
        top: -15px;
        left: 50%;
        transform: translateX(-50%);
        background: #6a82fb;
        width: 35px;
        height: 35px;
        line-height: 35px;
        border-radius: 50%;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
        z-index: 1; /* Ensures the rank badge appears above other elements */
    }

    .gridItem:nth-child(2) .rank {
        background: #6a82fb;
    }

    .gridItem:nth-child(3) .rank {
        background: #6a82fb;
    }

    /* Player Name */
    .gridItem .name {
        font-size: 1.2rem;
        font-weight: 600;
        margin: 20px 0 5px;
        color: #34495e;
        font-family: 'Roboto', sans-serif;
    }

    /* Player Score */
    .gridItem .score {
        font-size: 1rem;
        color: #7f8c8d;
        font-family: 'Roboto', sans-serif;
        position: relative;
    }

        /* Decorative Line Under Score */
        .gridItem .score::after {
            content: '';
            display: block;
            width: 50%;
            height: 1.5px;
            background: linear-gradient(90deg, #6a82fb, #fc5c7d);
            margin: 8px auto 0;
            border-radius: 1px;
        }

/* Responsive Design */
@media (max-width: 1024px) {
    .leaderTitle {
        font-size: 2.5rem;
    }

    .leaderTopThree {
        gap: 20px;
    }

    .leaderCard {
        padding: 20px;
    }

        .leaderCard .name {
            font-size: 1.6rem;
        }

        .leaderCard .score {
            font-size: 1.2rem;
        }

    .leaderGrid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .gridItem .rank {
        width: 30px;
        height: 30px;
        line-height: 30px;
        font-size: 1rem;
    }

    .gridItem .name {
        font-size: 1.1rem;
    }

    .gridItem .score {
        font-size: 0.9rem;
    }
}

@media (max-width: 600px) {
    .leaderTitle {
        font-size: 2rem;
    }

    /* Keep the top three as a row on mobile */
    .leaderTopThree {
        display: flex;
        flex-direction: row;     /* Ensure the 3 cards sit next to each other */
        flex-wrap: wrap;        /* Allows wrapping if the screen is very narrow */
        justify-content: space-around; 
        gap: 15px;
    }

    .leaderCard {
        padding: 15px;
    }
    .leaderCard .rank {
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 1.3rem;
    }
    .leaderCard .name {
        font-size: 1.4rem;
    }
    .leaderCard .score {
        font-size: 1rem;
    }

    /* Ranks 4+ appear in a grid layout below */
    .leaderGrid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .gridItem {
        padding: 12px 15px;
    }
    .gridItem .rank {
        width: 25px;
        height: 25px;
        line-height: 25px;
        font-size: 0.9rem;
    }
    .gridItem .name {
        font-size: 1rem;
    }
    .gridItem .score {
        font-size: 0.8rem;
    }
}




.masked-text {
    font-size: 8rem;
    font-weight: bold;
    color: #4d5eaa;
    background-image: url('https://images.unsplash.com/photo-1732535725600-f805d8b33c9c?q=80&w=1470&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
    background-size: 200%; /* Enlarged for smooth animation */
    background-position: 0 50%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: animate-background 5s infinite alternate linear;
}
.masked-won {
    font-size: 12rem;
    font-weight: bold;
    color: #5c00ff;
    background-size: 200%; /* Enlarged for smooth animation */
    background-position: 0 50%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: red;
    animation: animate-background 5s infinite alternate linear;
}

@keyframes animate-background {
    0% {
        background-position: 0 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}


.nameEntry {
    font-size: 28px;
    color: #4d5eaa;
    margin-top: 30px;
    text-align: center;
    animation: float 2s infinite ease-in-out;
}




    .nameEntry h3 {
        font-family: 'Orbitron', sans-serif;
        font-size: 36px;
        margin-bottom: 10px;
    }

    .nameEntry p {
        font-family: Jua;
        font-size: 22px;
        margin-bottom: 20px;
    }

    .nameEntry input {
        width: 60%;
        padding: 10px 15px;
        margin-bottom: 20px;
        font-size: 20px;
        border: 2px solid #ffffff;
        border-radius: 8px;
        text-align: center;
        transition: border-color 0.3s ease;
    }

        .nameEntry input:focus {
            border-color: #6a82fb;
            outline: none;
        }

    .nameEntry .submitName {
        padding: 10px 30px;
        font-size: 22px;
        background: #6a82fb;
        border: none;
        border-radius: 10px;
        color: white;
        cursor: pointer;
        transition: background 0.3s ease, transform 0.2s ease;
    }

        .nameEntry .submitName:hover {
            background: #9eb2d9;
            transform: translateY(-2px);
        }

/* ------------------- Modal Styling ------------------- */

/* Modal Container */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: hidden; /* Disable scroll */
    background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
    /* Removed display: flex; */
    /* These properties are now in .modal.show */
    /* justify-content: center; */ /* Removed from here */
    /* align-items: center; */ /* Removed from here */
    animation: fadeIn 0.3s ease-in-out;
}

/* Modal Content Box */
.modal-content {
    background-color: #f44336;
    color: white;
    padding: 30px 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: fixed; /* Ensure it appears in the center */
    top: 50%; /* Center vertically */
    left: 50%; /* Center horizontally */
    transform: translate(-50%, -50%); /* Adjust for the element's dimensions */
    transition: all 0.3s ease-in-out;
}


/* Error Message Text */
#errorMessageText {
    font-size: 20px;
    margin: 0;
}

/* Success Message Styling */
.endGameMsg {
    display: none; /* Hidden by default */
    position: fixed; /* Make it a modal-like element */
    top: 50%; /* Center vertically */
    left: 50%; /* Center horizontally */
    transform: translate(-50%, -50%); /* Center both vertically and horizontally */
    background-color: #4CAF50; /* Green background for success */
    color: white;
    padding: 30px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1001;
    text-align: center;
    font-size: 22px;
    /* Removed fadeInUp animation */
    /* animation: fadeInUp 0.5s ease-in-out; */
}

    .endGameMsg.show {
        display: block;
        /* Removed animation property */
        /* animation: fadeInUp 0.5s ease-in-out; */
    }

    .endGameMsg p {
        margin: 0;
        font-size: 1.2em;
    }

/* Animation Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Optional: Fade Out Animation */
@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* Show Modal */
.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Show Success Message with Animation */
.endGameMsg.show {
    display: block;
    /* Removed animation property */
    /* animation: fadeInUp 0.5s ease-in-out forwards; */
}

/* Additional Enhancements for .endGameMsg */

/* Responsive Design */
@media (max-width: 600px) {
    .modal-content {
        padding: 20px 25px;
    }

    .endGameMsg {
        padding: 15px;
        font-size: 1em;
        width: 90%;
    }

    .nameEntry input {
        width: 90%;
        font-size: 18px;
    }

    .nameEntry .submitName {
        width: 100%;
        font-size: 20px;
    }
}

/* Ensure the success message is properly styled  */
.th_scorepanel .endGameMsg {
    /* Any additional styles specific to .endGameMsg  can go here */
}

/* Optional: Transition for modal */
.modal-content, .endGameMsg {
    transition: all 0.3s ease-in-out;
}

/* Consistent Font for Headings */
h3 {
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
}

/* Button Enhancements */
button, .button {
    font-family: "Play", serif;
    transition: all 0.3s ease;
}

    button:focus, .button:focus {
        outline: none;
        box-shadow: 0 0 10px #6a82fb;
    }

/* Highlight Input on Error */
.inputError {
    border-color: #ff0000;
    box-shadow: 0 0 5px #ff0000;
}

/* Smooth Animations */
.button:hover, button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(110, 130, 251, 0.7);
}

.modal-content, .endGameMsg {
    transition: all 0.3s ease-in-out;
}




/* Style for the Confetti Canvas */
canvas#canvas {
    position: fixed; /* Fixed positioning to overlay the viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Ensures full coverage */
    pointer-events: none; /* Allows clicks to pass through */
    z-index: 1000; /* High z-index to stay on top */
    display: none; /* Hidden by default */
    overflow: hidden;
}

/**************************************************************
   A) Make the #levelSelectionPanel fill its container and center its contents
**************************************************************/
#levelSelectionPanel {
    /* If you want it full-size like the main panel: */
    width: 1280px; /* or 100% if you prefer */
    height: 960px; /* or 100% if you prefer */
    position: relative;
    background: none; /* Or a different background */
    /* 
    If you want the same background as the main panel, set it here.
    e.g. background: url("../images/background-main.jpg") no-repeat center/cover;
  */
    /* If the panel is absolutely positioned, ensure it’s top/left:0
     or however you have it in main panel styling. 
     Or you can let .teacherhassen_screen handle it. */
}

/* Center everything inside #levelSelectionPanel */
/* Center everything inside #levelSelectionPanel */
.levelSelectionContainer {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column; /* Stack heading, buttons in a column */
    align-items: center; /* Center horizontally */
    justify-content: flex-start; /* Align items to the top */
    padding-top: 30px; /* Add some padding to push content down a bit */
}

/**************************************************************
   B) Heading (h2) for “Select a Level” & Leaderboard
**************************************************************/
#levelSelectionPanel h2 {
    font-family: "Play", serif;
    font-size: 70px;
    margin: 0 0 20px 0; /* Add space below the heading */
    color: #000000;
    /* Optional: center the heading horizontally */
    text-align: center;
}


.levelSelection {
    position: relative;
    text-align: center;
    width: 100%;
    padding-top: 20px; /* Optional: adjust this value if needed */
}

.levelSelection .button {
   /**margin: 0 auto; /* Centers the button horizontally */
}

/* Smaller override for level buttons */
.levelBtn {
    cursor: pointer;
    display: list-item;
    padding: 1px 0px;
    font-family: "Play", serif;
    font-size: 40px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #fff;
    border-radius: 40px;
    border: 4px solid #ffffff;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    /* Animated shine effect */
    .levelBtn::after {
        content: "";
        position: absolute;
        top: 50%;
        left: -100%;
        width: 50%;
        height: 200%;
        background: rgba(255, 255, 255, 0.2);
        transform: skewX(-25deg) translateY(-50%);
        transition: left 0.5s ease;
    }

    .levelBtn:hover::after {
        left: 150%;
    }

    .levelBtn:hover {
        box-shadow: 0 12px 20px rgba(0, 114, 255, 0.4);
    }

    .levelBtn:active {
        transform: scale(0.95);
        box-shadow: 0 4px 10px rgba(0, 114, 255, 0.2);
    }


/* Potential Fix for Text Overflow */
.button span {
    display: inline-block;
    vertical-align: middle;
}
