:root {
    --accent-color: rgb(211, 130, 255);
    --accent-color-dark: color-mix(var(--accent-color), black 15%);
    --accent-color-dark-dark: color-mix(var(--accent-color), black 30%);
    --accent-color-dark-dark-dark: color-mix(var(--accent-color), black 50%);
    --accent-color-light-dark: color-mix(var(--accent-color), white 5%);
    --accent-color-light: color-mix(var(--accent-color), white 15%);
    --accent-color-light-light: color-mix(var(--accent-color), white 30%);
    --accent-color-transparent: color-mix(var(--accent-color), transparent 50%);
    --accent-color-transparent-low: color-mix(var(--accent-color), transparent 25%);
    --accent-color-transparent-high: color-mix(var(--accent-color), transparent 75%);
    --bg: #13161a;
    --bg-secondary: #1d264c;
    --bg-accent: color-mix(var(--accent-color), black 75%);
    --border-color: color-mix(var(--accent-color), white 15%);
    --font-color-accent: color-mix(var(--accent-color), black 50%);
    --font-color-accent-light: color-mix(var(--accent-color), black 30%);
    --font-color-accent-dark: color-mix(var(--accent-color), black 75%);

    --danger-color: color-mix(var(--accent-color), red 60%);
}

body,
html {
    user-select: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

#backgroundHolder {
    position: absolute;
    z-index: -2;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg)
}

#topbar {
    display: flex;
    flex-direction: row;

    width: 75vw;
    height: 4rem;
    margin-top: 1.5vmin;
    place-self: center;
    place-items: center;
    border-radius: 999px;
    /* wow using a box shadow looks 10x better than a regular border */
    box-shadow: inset 0 0 0 0.2vmin var(--border-color);
    background-color: var(--accent-color-dark);
}

#searchBar,
#searchInput {
    transition: all .2s;
    opacity: 1
}

#searchBar {
    margin-left: 0.4rem;
    height: 80%;
    width: 60%;
    border-radius: 999px;
    display: flex;
    overflow: hidden;
    background: var(--accent-color);
    transform-origin: left center;
    transform: scaleX(1)
}

#searchInput {
    background-color: transparent;
    border: 0;
    outline: 0;
    text-align: left;
    margin-left: 1rem;
    color: var(--font-color-accent);
    font-size: 2.25rem;
}

#searchInput::placeholder {
    color: var(--font-color-accent-light)
}

#plusIcon {
    margin-right: auto;
    margin-left: -0.1rem;
    color: var(--accent-color-light);
    transition: all .2s;
    /* mostly fix jittering if mouse is on edge by making it a circle */
    border-radius: 50%;
}

#plusIcon:hover {
    color: var(--accent-color-light-light);
    stroke-width: 3;
}

#questionIcon {
    color: var(--accent-color-light);
    transition: all .2s;
    margin-right: -0.25rem;
    border-radius: 50%;
}

#questionIcon:hover {
    color: var(--accent-color-light-light);
    transform: rotatez(-0.5turn) scale(1.1);
}

#settingsIcon {
    margin-right: 1rem;
    color: var(--accent-color-light);
    transition: all .2s;
    border-radius: 50%;
}

#settingsIcon:hover {
    color: var(--accent-color-light-light);
    transform: rotatez(.25turn) scale(1.1);
}

/* all styles */
#grid::-webkit-scrollbar {
    display: none;
}

/* style crab */
#grid {
    scrollbar-width: none;
    overscroll-behavior: auto;
    align-content: start;

    display: grid;
    width: 95%;
    margin: auto;
    height: 100%;

    margin-bottom: 1.5vmin;
    border-radius: 3rem;
    padding: 2.5vmin;

    overflow-y: scroll;
    margin-top: 1.5vmin;
    justify-content: center;

    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
    gap: 2.5rem;
    box-shadow: inset 0 0 0 0.2rem var(--border-color);
}

.game {
    aspect-ratio: 1;
    transition: all 0.3s;
}

.game:hover {
    transition: all 0.00s;
}

.gameImage {
    background-image: url(https://www.shutterstock.com/image-photo/single-fresh-tuna-fish-isolated-260nw-2634483817.jpg);
    background-position: 50%;
    aspect-ratio: 1;
    border-radius: 3rem;
    transition: all 0.2s;
    display: grid;
    overflow: hidden;
}

.game:hover>.gameImage {
    transition: all 0.1s;
}

.gameLabel {
    opacity: 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--font-color-accent);
    background-color: var(--accent-color-transparent-high);
    height: 100%;
    border-radius: 3rem;
    box-shadow: inset 0 0 0 0.15rem var(--border-color);

    transition: all 0.4s;
}

.game:hover>.gameImage>.gameLabel {
    opacity: 1;
    backdrop-filter: blur(0.75px);
    transition: all 0.1s;
}

/* style gn */
#grid.gn {
    scrollbar-width: none;
    overscroll-behavior: auto;

    display: grid;
    width: 95%;
    margin: auto;
    height: 100%;

    margin-bottom: 1.5vmin;
    border-radius: 50px;
    padding: 2.5vmin;

    overflow-y: scroll;
    margin-top: 1.5vmin;
    justify-content: center;

    grid-template-columns: repeat(auto-fit, minmax(4, 600vmin));
    gap: 2.5vmin;
}

.game.gn {
    aspect-ratio: 4 / 5;
    background-color: lime;
    border-radius: 25px;
}

.gameImage.gn {
    background-image: url(https://www.shutterstock.com/image-photo/single-fresh-tuna-fish-isolated-260nw-2634483817.jpg);
    background-position: 50%;
    aspect-ratio: 1;
    border-radius: 25px 25px 0 0;
}

.gameLabel.gn {}

/* popup menus */
#gamePopup {
    display: flex;
    justify-content: center;
    top: 50%;
    left: 50%;
    position: fixed;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%) scale(0.01);
    opacity: 0;
    transform-origin: center;
    background-color: var(--bg);
    transition: all 0.3s;
}

#gamePopup.open {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* game frame */
#gameFrame {
    width: 100%;
    height: 100%;
    border: none;

    z-index: -1;
    position: fixed;
}

/* game toolbar */
#gameToolbar {
    display: flex;
    flex-direction: row;

    width: 75vw;
    height: 5rem;
    margin-bottom: 1.5vmin;
    margin-top: auto;

    place-self: center;
    align-items: center;
    border-radius: 999px;

    box-shadow: inset 0 0 0 0.15rem var(--border-color);
    background-color: var(--accent-color-dark);

    padding-right: 1vh;
}

/* this css is realllly weird because it used to be completely different */
#gameInfo {
    display: flex;
    flex-direction: row;
    place-items: center;

    width: calc-size(auto, size + 1.5rem);
    padding-left: 1.5rem;
    max-width: 40rem;

    border-radius: 999px;
    background-color: var(--accent-color);
    height: 80%;
    transition: background-color 0.1s;

    margin-right: auto;
    margin-left: 0.8vh;
}

#gameInfo:hover {
    background-color: var(--accent-color-light);
}

#gameName {
    text-align: center;
    font-size: 2.25rem;
    color: var(--font-color-accent);

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* rest of game toolbar */
#gameFullscreenIcon {
    margin-right: 2vmin;
    margin-left: auto;
    color: var(--accent-color-light);
    transition: all 0.2s;
}

#gameFullscreenIcon:hover {
    color: var(--accent-color-light-light);
    transform: scale(1.1);
    stroke-width: 3;
}

#gameDownloadIcon {
    color: var(--accent-color-light);
    transition: all 0.2s;
}

#gameDownloadIcon:hover {
    color: var(--accent-color-light-light);
    transform: scale(1.1) scaleY(0.9);
    margin-top: 10%;

}

#gameExitIcon {
    color: var(--accent-color-light);
    transition: all 0.2s;
}

#gameExitIcon:hover {
    color: var(--danger-color);
    transform: scale(1.1);
}

/* repo menu */
#repoMenu {
    pointer-events: none;
    opacity: 0;

    place-self: center;
    position: fixed;
    display: flex;

    width: 100%;
    height: 100%;
    background-color: var(--bg);
    transition: opacity 0.2s;
}

#repoMenu.open {
    pointer-events: all;
    opacity: 1;
}

/* repo left panel */
#repoLeftPanel {
    padding-left: 2vmin;
    padding-top: 2vmin;
    width: 50%;
    height: 100%;
    background-color: var(--bg-accent);
}

#repoUrlInput {
    background-color: var(--accent-color-dark-dark);
    width: calc(100% - 2vmin);
    height: 6.5vh;
    font-size: 3vmin;
    color: var(--font-color-accent-dark);

    box-shadow: inset 0 0 0 0.2vmin var(--border-color);
    border-radius: 3rem;
    padding-left: 1.5vmin;
    outline: none;
    border: none;
}

#repoUrlInput::placeholder {
    color: var(--font-color-accent)
}

#repoType {
    display: grid;
    width: calc(100% - 1.6vmin);
    height: 8%;
    margin-top: 2vmin;
    margin-left: -0.2vmin;
    grid-template-columns: 1fr 1fr 1fr;
}

.repoTypeButton {
    display: grid;
    width: 100%;
    height: 100%;
    color: var(--font-color-accent-dark);
    background-color: var(--accent-color-dark-dark);
    box-shadow: inset 0 0 0 0.2vmin var(--border-color);

    place-content: center;
    font-size: 4vmin;
    transition: all 0.2s;
}

.repoTypeButton:first-child {
    transform: translateX(0.2vmin);
    border-radius: 3rem 0 0 3rem;
}

.repoTypeButton:last-child {
    transform: translateX(-0.2vmin);
    border-radius: 0 3rem 3rem 0;
}

.repoTypeButton:hover {
    background-color: var(--accent-color-dark);
}

.repoTypeButton.selected {
    background-color: var(--accent-color-light-dark);
}

/* repo right panel */
#repoRightPanel {
    width: 50%;
    height: 100%;
    background-color: var(--bg);
}

#repoExitIcon {
    color: var(--accent-color-light);
    transition: all 0.2s;
}

#repoExitIcon:hover {
    
    color: var(--danger-color);
    transform: scale(1.1);
}
