*{
    margin: 0;
    padding: 0;
}
:root {
    --color-1: #71C9CE;
    --color-101: #a6e3e987;
    --color-3: #CBF1F5;
    --color-4: #d8f8f8;
}
body{
    background-image: url(../images/repeatingbg.png);
    background-size: cover;
    min-height: 100vh;
    display: grid;
    grid-template-areas: 
    "header"
    "nav"
    "main"
    "topics";
    grid-template-rows: auto auto 1fr 1fr;
    background-color: var(--color-4);
}

header{
    background-color: var(--color-1);
    grid-area: header;
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 999;
    border-bottom: var(--color-1) 2px solid;
    border-top: var(--color-1) 3px solid;

}
#logo {
    color: black;
    text-decoration: none;
    font-family: "Science Gothic", sans-serif;
    font-size: 8vmin;
    margin-right: 3vmin;
    margin-left: 2vmin;
}
.navigationbuttons{
    margin-right: 2vmin;
    text-decoration: none;
    color: black;
    font-family: "Outfit", sans-serif;
    font-size: 5vmin;
}
.navigationbuttons2{
    margin-left: 2vmin;
    text-decoration: none;
    color: black;
    font-family: "Outfit", sans-serif;
    font-size: 5vmin;
}
nav{
    display: none;
    background-color: var(--color-1);
}
#logo:active{
    transition: 0.1s;
    color: rgba(14, 191, 29, 0.371);
    text-shadow: rgb(14, 191, 29) 0px 0px 10px;
}
.navigationbuttons:active{
    transition: 0.1s;
    color: rgba(14, 191, 29, 0.371);
    text-shadow: rgb(14, 191, 29) 0px 0px 10px;
}
.navigationbuttons2:active{
    transition: 0.1s;
    color: rgba(14, 191, 29, 0.371);
    text-shadow: rgb(14, 191, 29) 0px 0px 10px;
}
#welcometextcontainer{
    background-color: rgba(255, 255, 255, 0.008);
    backdrop-filter: blur(5px);
}
.lessonsheading{
font-family: "Science Gothic", serif;
text-shadow: #2d9eca 0px 0px 10px;
font-weight: normal;
color: #0459bb;
font-size: 5vmin;
display: flex;
text-align: center;
justify-content: center;
margin-bottom: 1.5vmin;
}
.uloflevels{
    list-style-type: none;
}
.levelbutton{
    text-align: center;
    width: 19vmin;
    height: 14vmin;
    border: solid rgba(128, 128, 128, 0.56) 1vmin;
    background-color: #2d9eca;
    box-shadow: 0px 1.3vmin 1px #18607c ;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.872);
    text-decoration: none;
    font-size: 12vmin !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-bottom: 3.5vmin;
}
.levelbuttonsactive:active{
    box-shadow: 0px 0vmin 0px #0d404e ;
    position: relative;
    top: 1.5vmin;
}
#testbutton{
    text-align: center;
    width: 19vmin;
    height: 14vmin;
    border: solid rgba(128, 128, 128, 0.56) 1vmin;
    background-color: #d80808;
    box-shadow: 0px 1.3vmin 1px #610321 ;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.872);
    text-decoration: none;
    font-size: 12vmin !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
#testbutton:active{
    box-shadow: 0px 0vmin 0px #0d404e ;
    position: relative;
    top: 1.5vmin;
}
.rowcenter{
    display: flex;
    justify-content: center;
}

    .uloflevels{
    list-style: none;
    display: flex;
    gap: 3vw;

    justify-content: center; 
    }
    .scrollRow{
    overflow-x: auto;
    overflow-y: hidden;

    scroll-padding-left: 2vw;  
    scroll-padding-right: 2vw;
    overflow-x: auto;
    overflow-y: hidden;

    padding: 0 3vw; 
    margin: 0;
    display: flex;
    justify-content: flex-start;
 
    }


.backbutton{
    text-align: center;
    align-content: center;
    width: 8vmin;
    height: 8vmin;
    border: solid rgba(128, 128, 128, 0.56) 1vmin;
    background-color: #2d9eca;
    box-shadow: 0px 1.3vmin 1px #18607c ;
    border-radius: 10%;
    color: rgba(255, 255, 255, 0.872);
    text-decoration: none;
    font-size: 6vmin !important;
    cursor: pointer;
    margin-left: 2vw;
    margin-right: 2vw;
}
.backbuttonactive:active{
    box-shadow: 0px 0vmin 0px #0d404e ;
    position: relative;
    top: 1.5vmin;
}
#backcontainer{
    display: flex;
    justify-content: start;

}
#title111{
    font-family: 'Science Gothic', sans-serif;
    font-weight: 300;
    font-size: 7vmin;
    text-shadow: black 0px 0px 3px;
    color: rgb(0, 14, 212);
    background-color: beige;
    backdrop-filter: blur(5px);
    padding-left: 2vmin;
    border-radius: 10px;
    border-style: solid;
    margin: 2vmin;
    text-align: center;
}
.simpletext{
    font-family: 'Science Gothic', sans-serif;
    font-weight: 300;
    font-size: 5vmin;
    color: #0044ff ;
    text-shadow: rgba(38, 3, 3, 0.768) 0px 1px 10px;
    margin: 1vmin;
    margin-left: 2vw
}
#description{
    font-size: 3vmin;
    font-family: 'outfit', sans-serif;
    background-color:beige;
    border-radius: 10px;
    margin: 2vmin;
    border-style: solid;
    color: black;
    padding-left: 1vw;
    padding-right: 1vw;
    padding-top: 1vh;
    padding-bottom: 1vh;
}

/* ========================================
   FOOTER MODAL STYLING - IMPROVED
   ======================================== */
footer {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 3vmin;
    background: linear-gradient(135deg, #71C9CE 0%, #5ab3b8 100%) !important;
    grid-area: footer;
    border-radius: 20px !important;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.2) !important;
    z-index: 1000 !important;
}

#modal-container {
    display: none;
}

.modal-content-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.fontsformodal {
    font-family: 'Science Gothic', serif;
    text-shadow: rgba(0, 0, 0, 0.3) 0px 2px 4px;
    font-weight: normal;
    color: #ffffff;
    text-align: center;
    margin: 5px 0;
    font-size: clamp(20px, 4vw, 28px);
}

.fontsformodal:last-of-type {
    font-size: clamp(16px, 3vw, 20px);
    opacity: 0.95;
}

.modal-back-btn {
    align-self: flex-start;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(14px, 2.5vw, 16px);
    font-weight: 600;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-back-btn:hover {
    background: rgba(0, 0, 0, 0.25);
    transform: translateX(-3px);
}

.modal-start-btn {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(16px, 3vw, 20px);
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #0b8a9d 0%, #097a8a 100%);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50px;
    padding: 15px 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    margin-top: 10px;
}

.modal-start-btn:hover {
    background: linear-gradient(135deg, #097a8a 0%, #086c7a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.modal-start-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

@media(max-width: 540px) {

    
    .modal-content-box {
        gap: 12px;
    }
    
    .modal-start-btn {
        padding: 12px 35px;
        width: 100%;
        max-width: 280px;
    }
    body{
        grid-template-rows: auto auto 1fr auto auto;
        grid-template-columns: 100vw;
    }
    nav{
        display:block;
        font-size: 6.5vmin;        
    }
    .navigationbuttons{
        display: none;
    }
.scrollRow { scroll-snap-type: x mandatory; }
.uloflevels > * { scroll-snap-align: start; }

}

/* Keep this global safety */
html, body { max-width: 100%; overflow-x: hidden; }
* { box-sizing: border-box; }


#testbuttondiv{
    display: flex;
    justify-content: center;
    margin: 2vh;
}
