:root {
    --godaBlue: #1796B7;
    --algGreen: #77de73;
    --godaBlack: #535353;
    --godaGreen: #3F826D;
    --godaRed: #E2725B;
    --godaGrey: #707070;
    --godaWhite: #F0F0F0;
    --godaBG: #E1E6E1;
    --godaGradient: #EAF3EA;
}

body, html {
    max-width: 100vw;
}

* {
    box-sizing: border-box;
}

button, .btn {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 16px;
}

.modal {
    --bs-modal-bg: var(--godaBG);
    --bs-modal-header-border-color: var(--godaRed);
    --bs-modal-footer-border-color: var(--godaGrey);
}
@font-face {
    font-family: 'MainFont';
    src: url('font/arial_rounded_mt_regular-webfont.woff2') format('woff2'),
    url('font/arial_rounded_mt_regular-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;

}
@font-face {
    font-family: 'MyNunito';
    src: url('font/nunito-variablefont_wght-webfont.woff2') format('woff2'),
    url('font/nunito-variablefont_wght-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'MyNunito';
    src: url('font/nunito-italic-variablefont_wght-webfont.woff2') format('woff2'),
    url('font/nunito-italic-variablefont_wght-webfont.woff') format('woff');
    font-weight: normal;
    font-style: italic;

}

body{
    font-family: 'Nunito', 'MyNunito', 'MainFont', "Comic Sans MS", Arial, sans-serif;
    color: var(--godaGrey);
    background: var(--godaBG);
}

.top-buffer { margin-top:20px; }
.lastRow{
    height: 100%;
}
.img-fluid {
    max-height: 40vh;
}
.searchGame .img-fluid{
    max-height: 100%;
    width: auto;
}
.searchGame {
    height: 100px;
}
#legend{
    position: fixed;
    width: 220px;
    height: 100px;
    top: calc(50% - 50px);
    right: -220px;
    /* Animation */
    transition-property: all;
    transition-duration: .5s;
    transition-timing-function: cubic-bezier(0,1,0.5,1);
}
#legendTab{
    margin-top: 20px;
    position: absolute;
    left:-40px;
    height: 80px;
    width: 40px;
    -webkit-box-shadow: 0 5px 15px rgb(0, 0, 0, .5);
    box-shadow: 0 5px 15px rgb(0, 0, 0, .5);
    border-radius: 15px 0 0 15px;
    background-color: var(--godaGradient);
}
#legendTab div {
    text-align: center;
    position: relative;
    right: 70px;
    top: 30px;
    width: 180px;
    -webkit-transform: rotate(270deg);
    -moz-transform: rotate(270deg);
    -o-transform: rotate(270deg);
    writing-mode: lr-tb;
}
.showLegend{
    right: 0 !important;
}
#legendBody{
    -webkit-box-shadow: 0 5px 15px rgb(0, 0, 0, .5);
    box-shadow: 0 5px 15px rgb(0, 0, 0, .5);
    border-radius: 15px 0 0 15px;
    background: #6c757d;
}
#titleRow{
    background: var(--godaWhite);
}
#dateCol{
    padding-top: 10px;
    font-size: 18px;
    font-weight: bold;
}
#title{
    font-size: 24px;
}
#titleCol{
    font-weight: 1000;
    font-size: 48px;
    text-shadow: -1px -1px 0 var(--godaBlack), 1px -1px 0 var(--godaBlack), -1px 1px 0 var(--godaBlack), 1px 1px 0 var(--godaBlack);
}
#titleLetters{
    color: var(--godaRed)
}
#helpCol{
    text-align: end;
    color: var(--godaGreen);
    padding-top: 10px;
}
#helpCol.col-sm-12{
    text-align: center;
}
.btn-help {
    --bs-btn-font-weight: 600;
    --bs-btn-color: var(--godaGreen);
    /*--bs-btn-bg: var(--bd-violet-bg);*/
    --bs-btn-border-color: var(--godaBlack);
    --bs-btn-hover-color: var(--godaRed);
    --bs-btn-hover-bg: #{shade-color($godaGreen, 10%)};
    --bs-btn-hover-border-color: #{shade-color($godaGreen, 10%)};
    --bs-btn-focus-shadow-rgb: var(--godaBlack);
    --bs-btn-active-color: var(--bs-btn-hover-color);
    --bs-btn-active-bg: #{shade-color($godaGreen, 20%)};
    --bs-btn-active-border-color: #{shade-color($godaGreen, 20%)};
}
.btn-title{
    font-size: 1.8rem;
    padding: 0 0 0 0;
    --bs-btn-border-width: 2px;
    --bs-btn-border-radius: 1rem;
}
.titleBtnIcon{
    display: flex;
}
#loginIcon{
    font-size: 42px;
    padding: 3px 5px 3px 1px;
}
.gameBox{
    border: 2px solid var(--godaBlack);
    border-left: 1px solid var(--godaBlack);
    background: linear-gradient(180deg,var(--godaWhite), var(--godaGradient));
    margin-top: 10px;
}
.gameBox > * {
    min-width: 0;
}
.cellBorderTop{
    border-top: 1px solid var(--godaBlack);
}
.cellBorderBot{
    border-bottom: 1px solid var(--godaBlack);
}
.cellBorderLeft{
    border-left: 1px solid var(--godaBlack);
}
.cellBorderRight{
    border-right: 1px solid var(--godaBlack);
}
.correct{
    color: var(--godaGreen);
    font-weight: bold;
}
.higher{
    color: var(--godaRed);
}
.lower{
    color: var(--godaBlue);
}
.progress-bar{
    background-color: var(--godaGreen);
}
#guessCounterCol{
    border: 2px solid var(--godaBlack);
    background: linear-gradient(180deg,var(--godaWhite), var(--godaGradient));
    margin: 0;
    display: flex;
    justify-content: center;
    flex-direction: column;
}
#searchInput{
    border: 2px solid var(--godaBlack);
    background: linear-gradient(180deg,var(--godaWhite), var(--godaGradient));
}
#searchResults{
    border: 2px dotted var(--godaBlack);
    background-color: var(--godaWhite);
}
#legendBody li{
    background: var(--godaWhite);
}
.centerItem{
    display: flex;
    align-items: center;
    justify-content: center;
}
#winScreen{
    width: 550px;
    background: linear-gradient(45deg, var(--godaWhite), var(--godaGradient));
    margin-top: calc(50vh - 120px);
    font-size: 24px;
    font-weight: bold;
}
#loginScreen{
    width: 400px;
    background: linear-gradient(90deg, var(--godaWhite), var(--godaGradient));
    margin-top: calc(50vh - 60px);
    border: 3px solid var(--godaBlack);
    font-size: 24px;
    font-weight: bold;
}
#welcomeScreen{
    width: 760px;
    background: linear-gradient(135deg, var(--godaWhite), var(--godaGradient));
    margin-top: 10vh;
    border: 3px solid var(--godaBlack);
}
.tutorialImage{
    max-width: 95%;
    height: auto;
}
@media only screen and (max-width: 768px){
    #welcomeScreen, #loginScreen, #winScreen{
        width: 540px;
    }
}

@media only screen and (max-width: 576px){
    #welcomeScreen, #loginScreen, #winScreen{
        width: 320px;
    }
}
#sharePopup{
    background-color: var(--godaWhite);
    width: 50%;
}

.frontPage{
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 0 100px rgb(0, 0, 0, .5);
    padding: 35px calc(35px - var(--bs-gutter-x) * 0.5) 10px 10px;
    border: 3px solid var(--godaBlack);
}
.greenBG{
    background-color: var(--godaGreen);
    color: var(--godaBlue);
    --bs-btn-hover-bg: var(--godaGreen);
}
#shadeCover{
    width: 100%;
    height: 100%;
}
.filter{
    text-decoration: var(--godaBlue) wavy underline;
}
#hintCounter{
    color: var(--godaBlue)
}
.winSmallerFont{
    padding: 5px;
    font-size: 1rem;
}
#curtain{
    background: var(--godaBG);
    width: 100%;
    height: 100%;
    z-index: 5;
}
#curtainTitle{
    position: absolute;
    width: 300px;
    height: 120px;
    left: 50%;
    top: 50%;
    margin: -60px auto 0 -150px;
    font-size: 100px;
    font-weight: bold;
}
.lds-ring {
    display: inline-block;
    width: 80px;
    height: 80px;
    position: absolute;
    left: 50%;
    top: calc(50% + 150px);
    margin: -40px auto 0 -40px;
}
.lds-ring div {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 64px;
    height: 64px;
    margin: 8px;
    border: 8px solid var(--godaRed);
    border-radius: 50%;
    animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-color: var(--godaRed) transparent transparent transparent;
}
.lds-ring div:nth-child(1) {
    animation-delay: -0.45s;
}
.lds-ring div:nth-child(2) {
    animation-delay: -0.3s;
}
.lds-ring div:nth-child(3) {
    animation-delay: -0.15s;
}
@keyframes lds-ring {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.close{
    position: absolute;
    right: 0;
    top: 0;
}
#winLogin, #winLoggedIn{
    padding-top: 2px;
}
.tutorialLabel{
    color: var(--godaGreen);
}
.fakeBtn{
}
.btnCheckOff{
    background-color: var(--godaRed);
    color: var(--godaWhite);
    text-decoration: line-through;
    text-decoration-color: var(--godaBlue);
}
.btnCheckOn{
    background-color: var(--godaGreen);
    color: var(--godaWhite);
    text-decoration: none;
}
.modal-title{
    font-weight: bold;
}
#bggLogo{
    height: 55px;
}
/* ===== MOBILE ===== */

/* Prevent iOS zoom on input focus */
input, select, textarea {
    font-size: 16px !important;
}

/* Make images more responsive */
.img-fluid {
    max-height: 30vh; /* Reduced from 40vh for mobile */
}



/* Fix legend on mobile - hide or make it overlay properly */
@media only screen and (max-width: 768px) {
    #legend {
        width: 180px;
        right: -180px;
        z-index: 1000;
    }

    #legendTab {
        left: -35px;
        width: 35px;
        height: 60px;
    }

    #legendTab div {
        right: 60px;
        top: 20px;
        width: 140px;
        font-size: 14px;
    }

    #legendBody {
        font-size: 14px;
        padding: 10px;
    }
}

/* Improve title section for tablets */
@media only screen and (max-width: 768px) {
    #titleCol {
        font-size: 36px; /* Reduced from 48px */
    }

    #title {
        font-size: 20px; /* Reduced from 24px */
    }

    #dateCol {
        font-size: 16px; /* Reduced from 18px */
    }

    #loginIcon {
        font-size: 32px; /* Reduced from 42px */
    }

    .btn-title {
        font-size: 1.4rem; /* Reduced from 1.8rem */
    }

    /* Stack the title row vertically */
    #titleRow {
        text-align: center;
    }

    #helpCol {
        text-align: center !important;
        margin-top: 10px;
    }
}

@media only screen and (max-width: 576px) {
    #titleCol {
        font-size: 28px;
        padding-bottom: 10px;
    }

    #title {
        font-size: 16px;
    }
    #dateCol {
        font-size: 14px;
        padding-top: 5px;
    }
    #loginIcon {
        font-size: 28px;
        padding: 2px 4px 2px 1px;
    }
    .btn-title {
        font-size: 1rem;
        padding: 8px 12px;
    }

    .imageCol {
        flex-direction: column !important;
        max-width: 100%;
        flex: 0 0 100%;
        margin-bottom: 10px;
    }

    .searchGame {
        height: 80px; /* Reduced from 100px */
    }

}


