@font-face {
    font-family: 'Pusab';
    src: url('assets/Pusab.ttf') format('truetype');
}

.font-pusab {
    font-family: 'Pusab', sans-serif;
    color: #ffffff;
}

.font-golden {
    font-family: 'Pusab', sans-serif;
    background: linear-gradient(rgb(255, 170, 25) 40%, rgb(255, 220, 65) 60%) padding-box text;
    -webkit-text-fill-color: transparent;
}

.font-helvetica {
    font-family: 'Helvetica', Arial, sans-serif;
}

.font-tag {
    font-family: 'Pusab', sans-serif;
}

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

:root {
    --bg-card-odd: #C2723E;
    --bg-card-even: #A1582C;
    --text-primary: #e8e8ff;
    --checkbox-size: 40px;
    /*--bounce-out: cubic-bezier(0.34, 1.56, 0.64, 1);*/
    --bounce-out: linear(0, 0.532 20.8%, 1 37.8%, 0.877 44.2%, 0.847 47.2%, 0.838 50.1%, 0.846 52.8%, 0.869 55.6%, 1 65.5%, 0.965 69.4%, 0.954 73.1%, 0.961 76.5%, 1 84.5%, 0.992 89.3%, 1);
}

body {
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    zoom: 0.9;
    background: fixed linear-gradient(0deg, #002E74 0%, #0065FD 100%);
    color: var(--text-primary);
    font-family: 'Helvetica', Arial, sans-serif;
}

/* GRID VIEW FONTS */
.view-grid .card-name {
    font-size: 2.3rem;
    -webkit-text-stroke: 6px black;
    filter: drop-shadow(2px 3px 0px rgba(0, 0, 0, 0.25));
    paint-order: stroke fill;
}

.view-grid .card-author {
    font-size: 1.6rem;
    -webkit-text-stroke: 1.2px black;
    filter: drop-shadow(1.5px 2px 0px rgba(0, 0, 0, 0.3));
    margin-top: 0.2rem;
}

.view-grid .card-author .font-golden {
    -webkit-text-stroke: 1px black;
}

.view-grid .card-desc {
    font-size: 0.8rem;
    margin-top: 6px;
}

/* LIST VIEW FONTS */
.view-list .card-name {
    font-size: 3rem;
    -webkit-text-stroke: 7.5px black;
    filter: drop-shadow(5px 4px 0px rgba(0, 0, 0, 0.25));
    margin-top: 0;
    margin-bottom: -4px;
    paint-order: stroke fill;
}

.view-list .card-author {
    font-size: 2.3rem;
    -webkit-text-stroke: 1.9px black;
    margin-bottom: -2px;
    filter: drop-shadow(3.5px 2.5px 0px rgba(0, 0, 0, 0.3));
}

.view-list .card-author .font-golden {
    -webkit-text-stroke: 1.9px black;
}

.view-list .card-desc {
    font-size: 1rem;
    margin-top: 4px;
    max-width: 90%;
}

/* shared styles */
.card-desc {
    color: #e0e0e0;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    padding: 6px 12px;
    display: inline-block;
}

.filter-label {
    font-size: 2rem;
    -webkit-text-stroke: 1.8px black;
    filter: drop-shadow(2px 2px 0px rgba(0, 0, 0, 0.3));
    margin-bottom: -5px;
    margin-top: 10px;
}

.popup-title {
    font-size: 3.4rem;
    -webkit-text-stroke: 1.8px black;
    filter: drop-shadow(3px 4px 0px rgba(0, 0, 0, 0.3));
    margin-bottom: 10px;
}

.checkbox-wrap {
    font-size: 1.55rem;
    -webkit-text-stroke: 1px black;
    filter: drop-shadow(2px 2px 0px rgba(0, 0, 0, 0.5));
}

.stats-label {
    position: absolute;
    top: 15px;
    right: 30px;
    z-index: 40;
    text-align: right;
    font-size: 1.8rem;
    -webkit-text-stroke: 1.4px black;
    filter: drop-shadow(2px 3px 0px rgba(0, 0, 0, 0.3));
    pointer-events: none;
}

/* TAGS */
.tag {
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--tag-main, #ffffff);
    background: var(--tag-bg, #111111);
    border: 2.5px solid var(--tag-outline, #444444);
    -webkit-text-stroke: 0.5px black;
}

.tag-project {
    --tag-main: #FF94FF;
    --tag-bg: #4A154A;
    --tag-outline: #A758E3;
}

.tag-vanilla {
    --tag-main: #55FF55;
    --tag-bg: #002200;
    --tag-outline: #008800;
}

.tag-more-icons {
    --tag-main: #55AAFF;
    --tag-bg: #001133;
    --tag-outline: #0044AA;
}

.tag-cube {
    --tag-main: #07FF3C;
    --tag-bg: #0F3007;
    --tag-outline: #2C701A;
}

.tag-ship {
    --tag-main: #FF51FF;
    --tag-bg: #421E49;
    --tag-outline: #7E3A8C;
}

.tag-ball {
    --tag-main: #FF4D1F;
    --tag-bg: #4C1311;
    --tag-outline: #BC2C23;
}

.tag-ufo {
    --tag-main: #FFBB00;
    --tag-bg: #4C0700;
    --tag-outline: #DE3824;
}

.tag-wave {
    --tag-main: #75EBFF;
    --tag-bg: #002D15;
    --tag-outline: #00B8E2;
}

.tag-robot {
    --tag-main: #FFFFFF;
    --tag-bg: #262626;
    --tag-outline: #585858;
}

.tag-spider {
    --tag-main: #B14AFF;
    --tag-bg: #431764;
    --tag-outline: #3806FF;
}

.tag-swing {
    --tag-main: #FFFF50;
    --tag-bg: #2D2D00;
    --tag-outline: #535300;
}

.tag-jetpack {
    --tag-main: #FF51FF;
    --tag-bg: #421E49;
    --tag-outline: #7E3A8C;
}

/* MAIN AREA */
.logo-area {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    pointer-events: none;
}

.gd-frame-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1331px;
    height: 948px;
    background-image: url('assets/frame.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    z-index: 20;
}

.gd-list-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1190px;
    height: 728px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 10;
    background: rgba(0, 0, 0, 0.2);
}

.gd-list-container::-webkit-scrollbar {
    width: 8px;
}

.gd-list-container::-webkit-scrollbar-track {
    background: transparent;
}

.gd-list-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.state-message {
    text-align: center;
    margin-top: 230px;
    font-size: 2rem;
    -webkit-text-stroke: 1.5px black;
    filter: drop-shadow(3px 3px 0px rgba(0, 0, 0, 0.5));
}

/* UI MENUS */
.menu-gamemodes {
    position: absolute;
    bottom: calc(50% - 445px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    z-index: 30;
}

.menu-views {
    position: absolute;
    top: calc(50% - 200px);
    left: calc(51% - 760px);
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 30;
}

.menu-filters {
    position: absolute;
    top: 170px;
    left: 1%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 30;
    width: 270px;
}

.menu-toggles {
    position: absolute;
    bottom: 30px;
    left: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 30;
}

/* BUTTONS AND STUFF */
.btn-search-corner {
    position: absolute;
    top: 70px;
    right: 30px;
    z-index: 30;
    cursor: pointer;
}

.btn-submit-corner {
    position: absolute;
    bottom: 30px;
    right: 30px;
    z-index: 30;
    cursor: pointer;
}

.btn-settings-corner {
    position: absolute;
    bottom: 150px;
    left: 30px;
    z-index: 30;
    cursor: pointer;
}

.gd-btn,
.gd-big-btn,
.mode-btn,
.view-btn,
.color-swatch-wrap,
.btn-search-corner,
.btn-submit-corner,
.btn-settings-corner,
.popup-close,
.btn-back-corner {
    transition: transform 0.3s var(--bounce-out);
}

.gd-btn:active,
.gd-big-btn:active,
.mode-btn:active,
.view-btn:active,
.color-swatch-wrap:active,
.btn-search-corner:active,
.btn-submit-corner:active,
.btn-settings-corner:active,
.popup-close:active,
.btn-back-corner:active {
    transform: scale(1.26);
}

.gd-btn {
    cursor: pointer;
    padding: 5px 15px;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    border: none;
    border-style: solid;
    border-width: 5px;
    box-shadow: 0 0 0 2px #000000, 0 0 0 4px #ffffff;
    color: white;
    font-size: 2rem;
    -webkit-text-stroke: 1.5px black;
    text-shadow: 2px 3px 0px rgba(0, 0, 0, 0.3);
}

.gd-big-btn {
    cursor: pointer;
    padding: 5px 15px;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    border: none;
    border-style: solid;
    border-width: 5px;
    box-shadow: 0 0 0 3px #000000, 0 0 0 5.5px #ffffff;
    color: white;
    -webkit-text-stroke: 2px black;
    filter: drop-shadow(4px 4px 0px rgba(0, 0, 0, 0.3));
}

.btn-green {
    background-color: #7ADE2D;
    border-top-color: #C6F249;
    border-left-color: #C6F249;
    border-bottom-color: #49851B;
    border-right-color: #49851B;
}

.btn-blue {
    background-color: #24E5E4;
    border-top-color: #47FFD9;
    border-left-color: #47FFD9;
    border-bottom-color: #158988;
    border-right-color: #158988;
}

.btn-pink {
    background-color: #FF94FF;
    border-top-color: #FDC3FF;
    border-left-color: #FDC3FF;
    border-bottom-color: #A758E3;
    border-right-color: #A758E3;
}

.checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.checkbox-wrap input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkmark {
    width: var(--checkbox-size);
    height: var(--checkbox-size);
    background-image: url('assets/checkOff.png');
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.5s var(--bounce-out);
}

.checkbox-wrap:active .checkmark {
    transform: scale(1.26);
}

.checkbox-wrap input:checked~.checkmark {
    background-image: url('assets/checkOn.png');
}

.mode-btn,
.view-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    width: 75px;
    height: 75px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.mode-btn[data-mode="all"] {
    background-image: url('assets/allBtn.png');
}

.mode-btn[data-mode="all"].active {
    background-image: url('assets/allBtnOn.png');
}

.mode-btn[data-mode="Cube"] {
    background-image: url('assets/cubeBtn.png');
}

.mode-btn[data-mode="Cube"].active {
    background-image: url('assets/cubeBtnOn.png');
}

.mode-btn[data-mode="Ship"] {
    background-image: url('assets/shipBtn.png');
}

.mode-btn[data-mode="Ship"].active {
    background-image: url('assets/shipBtnOn.png');
}

.mode-btn[data-mode="Ball"] {
    background-image: url('assets/ballBtn.png');
}

.mode-btn[data-mode="Ball"].active {
    background-image: url('assets/ballBtnOn.png');
}

.mode-btn[data-mode="UFO"] {
    background-image: url('assets/ufoBtn.png');
}

.mode-btn[data-mode="UFO"].active {
    background-image: url('assets/ufoBtnOn.png');
}

.mode-btn[data-mode="Wave"] {
    background-image: url('assets/waveBtn.png');
}

.mode-btn[data-mode="Wave"].active {
    background-image: url('assets/waveBtnOn.png');
}

.mode-btn[data-mode="Robot"] {
    background-image: url('assets/robotBtn.png');
}

.mode-btn[data-mode="Robot"].active {
    background-image: url('assets/robotBtnOn.png');
}

.mode-btn[data-mode="Spider"] {
    background-image: url('assets/spiderBtn.png');
}

.mode-btn[data-mode="Spider"].active {
    background-image: url('assets/spiderBtnOn.png');
}

.mode-btn[data-mode="Swing"] {
    background-image: url('assets/swingBtn.png');
}

.mode-btn[data-mode="Swing"].active {
    background-image: url('assets/swingBtnOn.png');
}

.mode-btn[data-mode="Jetpack"] {
    background-image: url('assets/jetpackBtn.png');
}

.mode-btn[data-mode="Jetpack"].active {
    background-image: url('assets/jetpackBtnOn.png');
}

#viewGrid {
    background-image: url('assets/gridBtn.png');
}

#viewGrid.active {
    background-image: url('assets/gridBtnOn.png');
}

#viewList {
    background-image: url('assets/listBtn.png');
}

#viewList.active {
    background-image: url('assets/listBtnOn.png');
}

.mode-btn img,
.mode-btn span {
    display: none !important;
}

.gd-select {
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(0, 0, 0, 0.8);
    border-width: 4px;
    -webkit-text-stroke: 3.8px black;
    border-radius: 6px;
    color: #ffffff;
    font-family: 'Pusab', sans-serif;
    font-size: 1.4rem;
    cursor: pointer;
    paint-order: stroke fill;
}

OPTION {
    font-family: Helvetica;
    background: rgba(0, 0, 0, 0.4);
    font-size: 1.2rem;
}

/* GALLERY CELLS */
.icon-card:nth-child(odd) {
    background: var(--bg-card-odd);
}

.icon-card:nth-child(even) {
    background: var(--bg-card-even);
}

.icon-grid.view-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0;
}

.icon-grid.view-grid .icon-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.view-grid .card-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.view-grid .card-tags {
    margin-bottom: 15px;
    justify-content: center;
}

.view-grid .btn-container {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.icon-grid.view-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.icon-grid.view-list .icon-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    padding-left: 15px;
    gap: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.card-canvas-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.icon-canvas {
    image-rendering: pixelated;
    max-width: 100%;
}

.card-info {
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    text-align: center;
}

.view-list .card-info {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto auto;
    align-items: center;
    gap: 2px 14px;
    text-align: left;
}

.view-list .card-name {
    grid-column: 1;
    grid-row: 1;
}

.view-list .card-author {
    grid-column: 1;
    grid-row: 2;
}

.view-list .card-desc {
    grid-column: 1;
    grid-row: 3;
    justify-self: start;
}

.view-list .card-tags {
    grid-column: 1;
    grid-row: 4;
    justify-content: flex-start;
}

.view-list .btn-container {
    grid-column: 2;
    grid-row: 1 / 5;
    align-self: center;
    margin-right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* POPUPS */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.58);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.popup-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.popup-box {
    background: #995533;
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    text-align: center;
    border-top: 5px solid #FFAA55;
    border-bottom: 6px solid #553311;
    box-shadow: 0 0 0 4px #000000, 0 0 0 6px #ffffff, 0 10px 40px rgba(0, 0, 0, 0.8);
}

.popup-box .gd-btn {
    align-self: center;
    padding: 6px 12px;
}

.popup-close {
    position: absolute;
    top: -35px;
    left: -35px;
    width: 81px;
    height: 81px;
    background: url('assets/close.png') center/contain no-repeat;
    border: none;
    cursor: pointer;
    color: transparent;
    font-size: 0;
}

.color-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 6px;
    font-size: 2rem;
    -webkit-text-stroke: 5.4px black;
    text-shadow: 5px 6px rgba(0, 0, 0, 0.25);
    paint-order: stroke fill;
}

.color-swatch-wrap {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border: 3px solid #000;
    box-shadow: 2px 3px 0px rgba(0, 0, 0, 0.4);
}

.color-swatch-wrap input[type="color"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.color-swatch {
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 12px;
    font-family: 'Helvetica', Arial, sans-serif;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid #000;
    color: #fff;
    font-size: 1.1rem;
    border-radius: 6px;
    border: 2px solid #000;
    text-align: center;
}

.search-input:focus {
    outline: none;
    border-color: #ffffff;
}

.search-input::placeholder {
    color: #aaa;
}

.site-footer {
    position: absolute;
    bottom: 10px;
    width: 100%;
    text-align: center;
    opacity: 0.5;
    font-size: 0.75rem;
    z-index: 10;
    pointer-events: none;
}

.site-footer a {
    color: #fff;
    pointer-events: auto;
}

.nav-btn {
    position: absolute;
    top: 50%;
    width: 95px;
    height: 114px;
    background: url('assets/pageNavBtn.png') center/contain no-repeat;
    border: none;
    cursor: pointer;
    z-index: 30;
    transition: transform 0.3s var(--bounce-out);
}

.nav-prev {
    left: calc(45% - 660px);
    transform: translateY(-50%);
}
.nav-prev:active { transform: translateY(-50%) scale(1.26); }

.nav-next {
    right: calc(45% - 660px);
    transform: translateY(-50%) scaleX(-1);
}
.nav-next:active { transform: translateY(-50%) scaleX(-1) scale(1.26); }

.btn-page-corner {
    position: absolute;
    top: 165px;
    right: 34px;
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    padding: 0;
}

.dl-count-box {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 1.4rem;
    margin-left: 20px;
    -webkit-text-stroke: 1px black;
    filter: drop-shadow(1px 2px 0px rgba(0,0,0,0.5));
}

.dl-icon { width: 18px; image-rendering: pixelated; }

.info-btn {
    width: 28px;
    cursor: pointer;
    transition: transform 0.3s var(--bounce-out);
}
.info-btn:active { transform: scale(1.26); }

#portraitWarning {
    display: none;
    position: fixed;
    inset: 0;
    background: linear-gradient(0deg, #001133 0%, #002E74 100%);
    z-index: 10000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


@media screen and (max-width: 900px) and (orientation: portrait) {
    #portraitWarning {
        display: flex;
        transform: scale(2.7);
    }

    .logo-area {
        position: absolute;
        top: 820px;
        left: 57%;
        transform: scale(1.2) translateX(-50%);
        z-index: 50;
        pointer-events: none;
    }

    .stats-label {
        font-size: 4.5rem;
        top: 30px;
        right: 20px;
        -webkit-text-stroke: 3.5px black;
        filter: drop-shadow(7px 6px 0px rgba(0, 0, 0, 0.3));
    }

    .btn-search-corner {
        width: 150px;
        top: 130px;
        right: 20px;
    }

    .btn-submit-corner {
        width: 260px;
        bottom: 40px;
        right: 20px;
    }

    .btn-settings-corner {
        width: 180px;
        bottom: 40px;
        left: 20px;
    }

    .menu-toggles {
        transform: scale(2.25);
        bottom: 330px;
        left: 290px;
    }

    .menu-filters {
        text-align: center;
        position: absolute;
        top: 18%;
        left: 35%;
        display: flex;
        flex-direction: column;
        gap: 10px;
        z-index: 30;
        width: 30rem;
    }

    .filter-label {
        font-size: 4rem;
        -webkit-text-stroke: 3.8px black;
        filter: drop-shadow(6px 5px 0px rgba(0, 0, 0, 0.3));
        margin-bottom: -5px;
        margin-top: 10px;
    }

    .gd-select {
        padding: 8px 10px;
        background: rgba(0, 0, 0, 0.5);
        border: 2px solid rgba(0, 0, 0, 0.8);
        border-width: 6px;
        -webkit-text-stroke: 5.8px black;
        border-radius: 6px;
        color: #ffffff;
        font-family: 'Pusab', sans-serif;
        font-size: 2.5rem;
        cursor: pointer;
        -webkit-text-stroke: 3.8px black;
    }

    .menu-gamemodes {
        position: absolute;
        bottom: calc(27%);
        left: 50%;
        transform: translateX(-50%) scale(1.6);
    }

    .menu-views {
        position: absolute;
        top: 75%;
        left: 45%;
        transform: scale(1.3);
        flex-direction: row;
    }

    .popup-box {
        transform: scale(2);
    }

    .nav-btn {
        position: absolute;
        top: calc(70% + 200px);
        width: 107px;
        height: 129px;
    }

    .nav-prev {
        left: calc(70% - 660px);
    }

    .nav-next {
        right: calc(70% - 660px);
    }

    .btn-page-corner {
        position: absolute;
        top: 340px;
        right: 62px;
        width: 68px;
        height: 68px;
        transform: scale(1.9);
    }
}

/*
@media screen and (max-height: 600px) {
    body { zoom: 0.35; }
}

@media screen and (max-width: 1000px) and (orientation: landscape) {
    body { zoom: 0.3; }
}
*/