@font-face {
    font-family: 'broken';
    font-style: normal;
    font-weight: 400;
    src: url('./res/nba.otf') format('opentype');
}

@font-face {
    font-family: 'NBA';
    font-style: normal;
    font-weight: 400;
    src: url('./res/nba-numbers.otf') format('opentype');
}

@font-face {
    font-family: 'NBA-numbers';
    font-style: normal;
    font-weight: 400;
    src: url('./res/nba-numbers.otf') format('opentype');
}

@font-face {
    font-family: 'Lalezar';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(./res/lalezar.woff2) format('woff2');
}

* {
    margin: 0;
    padding: 0;
    font-family: 'NBA', Impact;

}

.__empty__ {
    color: inherit;
}

:root {
    --gray-1: #828282;
    --gray-2: #e6e6e6;
    --green: #155012;
    --pale-green: #afd3ae;
    --legacy-blue: #2074c6;
    --tstn: 0.2s ease-in-out;
    --header-height: 40px;
    scroll-behavior: smooth;
}

span {
    font: inherit
}

.display-none {
    display: none !important;
}

.flex-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}

img {
    user-select: none;
}

#main-container {
    width: 100%;
    min-height: calc(var(--board-size) + 40px);
    margin-bottom: 200px;
}

#game-board {
    width: var(--board-size);
    height: var(--board-size);
    background-color: #BBB;
    /* background-color: var(--gray-1); */
    /* background-image: linear-gradient(to bottom right, #A0A0A0, #A0A0A0); */
    border-radius: min(20px, 4vw);
    gap: 20px;
    padding: 20px;
    position: relative;
    box-shadow: 0 3px 4px 2px #00000080;

}

#tile-container:empty::before {
    /* loading circle */
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 4px solid var(--green);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

#game-board[complete="true"] {
    pointer-events: none;
}

#board-message-container {
    position: absolute;
    /* background-color: red; */
    z-index: 2;
    width: var(--board-size);
    height: var(--board-size);
    user-select: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity var(--tstn);
}

#board-message-content {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    font-size: 40px;
    font-family: 'NBA', Impact;
    width: 100%;
    text-align: center;
    height: 60px;
    box-shadow: 0 3px 4px 2px #00000080;
    background-image: linear-gradient(to right, transparent 0%, var(--green) 20%, var(--green) 80%, transparent 100%);
    color: white;
    padding-top: 10px;
    gap: 20px;
}

#board-message-container.hidden-message {
    opacity: 0;
    pointer-events: none;
}


#tile-container {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--board-size);
    height: var(--board-size);
    padding: 20px;
    overflow: hidden;
}

.game-tile {
    width: var(--tile-size);
    height: var(--tile-size);
    border-radius: min(10px, 2vw);
    background-color: white;
    position: absolute;
    /* box-shadow: 0px 0px 4px 4px rgba(0, 0, 0, 0.1); */
    cursor: pointer;
    /* scale: 1; */
    transition: box-shadow var(--tstn), scale var(--tstn), top var(--tstn), left var(--tstn);
    user-select: none;
    color: white;
    text-align: center;
    display: flex;
    justify-content: center;
    word-break: break-word;
    align-items: center;
    font-family: 'NBA', Impact;
    font-size: min(4vw, 16px);
    box-shadow: inset 0 0 0 0 transparent, 0 0 0 0 transparent;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}



.game-tile.selected {
    scale: 1.1;
    box-shadow: inset 0 0 0 0 transparent, 0px 0px 3px 6px rgba(255, 255, 255, 0.5);
}

.game-tile:not(.correct, .almost) {
    background-color: white !important;
    color: black !important;
}

.game-tile.correct.almost {
    box-shadow: 0px 0px 4px 4px #eed256, inset 0 0 0 0 transparent;
}



.game-tile.almost:not(.correct):is(.almost4, .almost3.almost4) {
    background-color: #e8c83a !important;
    color: black !important;
}

.game-tile.almost:not(.correct).almost3 {
    background-color: #f4e395 !important;
    color: black !important;
}

.three-sections {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

#header {
    width: calc(100% - 20px);
    height: var(--header-height);
    background-color: var(--green);
    color: white;
    padding: 10px;
    min-width: fit-content;
}

#title {
    cursor: default;
    padding-top: 8px;
}

#logo {
    height: var(--header-height);
    margin-right: 10px;
}

header .left-side {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: start;
}

header .right-side {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: end;
    gap: 20px;
}

header .middle-side {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: relative;
    justify-content: start;
    top: -10px;
    height: calc(100% + 20px);
}

.middle-side {
    flex-grow: 1;
}

#main-container {
    position: relative;
    z-index: -3;
}

body {
    position: relative;
    z-index: -3;
    background-color: #c37e4a;
    background-image: url(res/background-tile.jpg);
    background-size: 55px 55px;
    background-repeat: repeat;
    padding: 0 !important;
}

.circle-button {
    padding: 10px;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    background-color: #FFFFFF30;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color var(--tstn);
}



#main-container>* {
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
}

#footer {
    width: 100%;
    height: 100px;
    background-color: var(--green);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding-block: 30px;
    position: relative;
    z-index: -4;
    padding-bottom: 150px;
}

#footer :is(a, a:visited) {
    color: white;
}


.button {
    background-color: var(--green);
    /* background-color: var(--primary); 
    backdrop-filter: blur(var(--dark-blur));
    -webkit-backdrop-filter: blur(var(--dark-blur)); */
    color: white;
    border: none;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 5px;
}

.refer-cont {
    position: relative;
    margin-top: 20px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    /* z-index: -2; */
}

.refer {
    background-color: var(--green);
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 5px;
    width: 80px;
    height: 20px;
}

#legacy-refer {
    font-family: 'lalezar';
    background-color: var(--legacy-blue);
}

#classic-refer,
#help-button {
    font-family: 'Helvetica Neue', Helvetica, sans-serif;
}

header .middle-side .page-link {
    margin-left: 20px;
    /* text-decoration: none; */
}

.page-link {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    color: white;
}


header .right-side .report-link {
    margin-right: 20px;
    /* text-decoration: none; */
}

#correct-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 60px;
    margin-top: 20px;
}

.correct-row {
    width: var(--board-size);
    height: 40px;
    display: flex;
    flex-direction: row;
    justify-content: start;
    align-items: center;
    border-radius: 10px;
    gap: 20px;
    white-space: nowrap;
    filter: drop-shadow(0 3px 4px #00000080);
}

.correct-row-img {
    width: 70px;
    height: 70px;
    object-fit: contain;
}

.correct-row-inline-img {
    height: 30px;
    width: auto;
    margin-left: 5px;
    object-fit: contain;
    filter: drop-shadow(0px 0px 2px #fff);
}

.correct-left-cont {
    display: flex;
    flex-direction: column;
}

.correct-year-label {
    text-align: center;
    color: white;
}

.correct-row-names {
    display: flex;
    flex-direction: row;
    justify-content: start;
    /* flex-grow: 1; */
    max-width: calc(100% - 70px);
    /* min-width: fit-content; */
    overflow-x: scroll;
    align-items: center;
    font-family: 'NBA', Impact;
    overflow-x: scroll;
    color: white;
    padding-right: 10px;
    scrollbar-width: none;
}

.correct-row-names::-webkit-scrollbar {
    display: none;
}

#end-game-tools {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    width: var(--board-size);
    height: fit-content;
    padding-top: 20px
}

#end-game-tools .tool-button {
    cursor: pointer;
    font-family: 'NBA', Impact;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: end;
    gap: 10px;
    padding: 8px 8px;
    border-radius: 10px;
    border: none;
    font-size: 20px;
    text-align: center;
}

#show-solution-button,
#show-yours-button {
    color: var(--green);
    background-color: var(--pale-green);
    line-height: 20px;
}

#restart-button {
    background-color: var(--green);
    color: white;
}

#restart-button img {
    height: 24px;
    width: 24px;
    width: auto;
    object-fit: contain;
    object-position: center;
}

#restart-button span {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.tools-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: start;
    width: var(--board-size);
    gap: 20px;
}

.evaporate {
    visibility: hidden;
    pointer-events: none;
}

#share-button,
#share-twin {
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}



.share-text {
    color: black;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    align-items: end;
    margin-bottom: -3px;
}

.share-img {
    height: 20px;
    object-fit: contain;
}

@media (max-width: 320px) {
    .share-text {
        display: none;
    }
}

#swaps-info {
    font-family: 'NBA', Impact;
    width: var(--board-size);
    text-align: right;
    margin-top: 10px;
    font-size: 20px;
}

.nba-numbers {
    font-family: 'NBA-numbers', Impact;
}

#team-count {
    font-family: 'NBA', Impact;
    font-size: 20px;
    margin-top: 10px;
    width: var(--board-size);
    text-align: left;
    margin-bottom: -40px;
}

.team-number,
#timer {
    letter-spacing: 2px;
}

#game-timer {
    font-size: 30px;
}


.report-link {
    font-family: 'NBA', Impact;
    font-size: 18px;
    color: red !important;
    background-color: white;
    padding: 8px 10px 6px 10px;
    border-radius: 20px;
}


[current-page] {
    padding-inline: 20px;
    color: var(--green);
    background-color: var(--pale-green);
}

[current-page].report-link {
    border-radius: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    position: relative;
    justify-content: start;
    top: -8px;
    padding-top: 20px;
    height: calc(100% + 10px);
}

#header-menu-toggle {
    width: 40px;
    height: 40px;
    background-color: #FFFFFF30;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    transition: background-color var(--tstn);
}


.header-menu-line {
    width: 20px;
    height: 2px;
    background-color: white;
}

#header-menu {
    width: calc(100% - 20px);
    position: absolute;
    top: calc(var(--header-height) + 20px);
    left: 0;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
    height: var(--header-height);
    background-color: var(--green);
    opacity: 0.97;
    padding: 10px;
    z-index: -1;
    transition: opacity var(--tstn), top var(--tstn);
    pointer-events: all !important;
}

:is(a, a:visited):not(:hover) {
    text-decoration: none;
}

#header-menu.hidden-menu {
    top: 0px;
    opacity: 0;
    pointer-events: none;
}

.header-separator {
    width: 1px;
    height: 70%;
    margin-left: 20px;
    background-color: #ffffff80;

}

.rapid-header-link {
    position: relative;
    /* margin-left: 50px !important; */
}

.rapid-header-text {
    animation: bob 1.3s infinite ease-out;
}

.header-flame-container {
    position: absolute;
    bottom: 5px;
    left: 50%;
    translate: calc(-50% - 2px) 0%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 5px;
    pointer-events: none;
}

.hidden-menu .header-flame-container {
    bottom: 2px;
}

.hidden-menu .header-flame {
    width: 15px;
}

.header-flame {
    width: 20px;
    /* flex-grow: 1; */
    object-fit: contain;

}


#tutorial-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: start;
    padding-top: 20px;
    align-items: center;
    z-index: 10;
}

#tutorial-content {
    width: min(98vw, 600px);
    height: fit-content;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    background-color: var(--pale-green);
    border-radius: 20px;
    box-shadow: 0 3px 4px 2px #00000080;

}

#tutorial-title {
    font-family: 'NBA', Impact;
    font-size: 30px;
    text-align: center;
    /* display: flex; */
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 15px 0 10px 0;
    background-color: var(--green);
    color: white;
    border-radius: 20px 20px 0 0;
}

#tutorial-close {
    width: 30px;
    height: 30px;
    object-fit: contain;
    object-position: center;
    cursor: pointer;
    float: right;
    margin-right: 20px;
}

#tutorial-inner-content {
    padding-inline: 20px;
    font-size: 20px;
    color: black;
}

#tutorial-inner-content p {
    word-break: break-word;

}

#tutorial-inner-content img:not(.larger-tutorial-image) {
    height: 100px;
    width: 100%;
    object-fit: contain;
    object-position: center;
}

.larger-tutorial-image {
    height: 200px;
    width: 100%;
    object-fit: contain;
    object-position: center;
}

.tutorial-center {
    text-align: center;
}

.tutorial-row {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
    gap: 10px;
}



#next-puzzle-timer {
    font-size: 24px;
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: end;
}

#next-puzzle-timer-number {
    display: flex;
    flex-direction: row;
    gap: 2px;
    justify-content: center;
    align-items: end;
}

#game-type-title {
    font-size: 40px;
    color: var(--green);
    background-image: linear-gradient(to right, transparent 0%, white 20%, white 80%, transparent 100%);
    padding: 14px 30px 4px 30px;
    margin-bottom: 20px;
}

#bottom-ad-container {
    width: 100%;
    padding-block: 20px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#left-ad-container,
#right-ad-container {
    width: fit-content;
    padding-inline: 5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#daily-index {
    margin-left: -12px
}

.emphasize-button {
    animation: emphasize 1.3s infinite ease-out;
    color: #eed256;
    font-size: 18px;

}

.rapid-promo {
    display: none;
    text-align: center;
    color: black;
    font-size: 30px;
    /* line-height: 35px; */
    /* background-color: #ffffffC0; */
    padding: 14px 12px 8px 12px;
    border-radius: 10px;
    animation: pulse 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
}

.rapid-promo::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff90;
    z-index: -1;
}

#rapid-promo-text {
    color: rgb(253, 83, 0);
}

.rapid-promo:hover #rapid-promo-text {
    text-decoration: solid underline rgb(253, 83, 0);
}

.rapid-promo-background {
    position: absolute;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    bottom: 0;
    animation: slide-flame 1s linear infinite;
    z-index: -2;
}

.promo-flame {
    width: 100px;
    margin-right: -10px
}


@media (hover: hover) {
    .game-tile:hover:not(.selected) {
        box-shadow: inset 0 3px 4px 2px #00000080;
    }

    .game-tile.game-tile.correct.almost:hover {
        box-shadow: 0px 0px 4px 4px #eed256, inset 0 3px 4px 2px #00000080;
    }

    .circle-button:hover {
        background-color: #FFFFFF50;
    }


    #header-menu-toggle:hover {
        background-color: #FFFFFF50;
    }

}

@media (min-width: 846px) {
    #header-menu {
        display: none;
    }

    .right-side .report-link {
        display: flex;
    }

    #header-menu-toggle {
        display: none;
    }
}

/* between 835px and 745 px */
@media (max-width: 845px) and (min-width: 745px) {
    .right-side .report-link {
        display: none;
    }
}

@media (min-width: 745px) {

    #header-menu .page-link {
        display: none;
    }
}

@media (max-width: 505px) {
    .right-side .report-link {
        margin-right: 0px !important;
        font-size: 12px;
        padding: 5px;
    }

    header .right-side {
        gap: 10px;
        justify-content: space-between;
    }

    .hidden-menu .report-link {
        display: none;
    }
}

@media (max-width: 745px) {
    .middle-side .page-link {
        display: none;
    }

    .hidden-menu .report-link {
        display: none;
    }

    #header-menu-toggle {
        display: none;
    }

    .header-separator {
        display: none;
    }

    #header-menu {
        display: flex !important;
        top: calc(var(--header-height) + 20px) !important;
        opacity: 0.97 !important;
        pointer-events: all !important;
    }

    /* #main-container {
        margin-top: 60px;
    } */

    #header {
        margin-bottom: 60px;
    }
}

@media (max-width: 851px) {

    #left-ad-container,
    #right-ad-container {
        display: none;
    }
}

@media (max-width: 545px) {
    .refer-cont {
        gap: 0px !important;
    }
}

@media (max-width: 390px) {
    #title {
        font-size: 20px;
    }
}

@media (max-width: 520px) {
    .larger-tutorial-image {
        width: 180px;
    }
}

@media only screen and (max-device-width: 480px) {
    body {
        background-image: none
    }
}

@media(max-width: 850px) {
    #main-container>*:is(.left-side, .right-side) {
        display: none;
    }
}

@keyframes emphasize {
    0% {
        transform: rotate(0deg) scale(1);
    }

    5% {
        transform: rotate(0deg) scale(1.25);

    }

    10% {
        transform: rotate(-10deg) scale(1.25);

    }

    15% {
        transform: rotate(10deg) scale(1.25);

    }

    25% {
        transform: rotate(0deg) scale(1.25);
    }

    30% {
        transform: rotate(0deg) scale(1);
    }
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%)rotate(360deg);
    }
}

@keyframes bob {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-5px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes slide-flame {

    /* left and right */
    0% {
        transform: translateX(-90px);
    }

    100% {
        transform: translateX(0px);
    }
}