* {
    padding: 0;
    box-sizing: border-box;
    list-style-type: none;
    font-family: sans-serif;
    scroll-behavior: smooth;
}
*:focus{
    outline: 3px solid var(--selection-color);
}
*::selection {
    background-color: var(--selection-color);
}

:root,
    :root.default {
        --bg-color: #47382e;
        --bg-color-lighter: #705848;
        --bg-color-lightest: #947561;
        --poke-dark-blue: #3c5aa6;
        --poke-light-blue: #2a75bb;
        --poke-dark-yellow: #c7a008;
        --poke-light-yellow: #ffcb05;
        --cash-color-positive: limegreen;
        --cash-color-negative: crimson;
        --text-color: #ffffff;
        --text-color-dark: #000000;
        --text-color-faded: rgba(255, 255, 255, 0.5);
        --selection-color: rgba(0, 0, 0, 0.5);
        --header-height: 80px;
        --footer-height: 35px;
    }

@font-face {
    font-family: pokeFont;
    src: url('../Fonts/Pokemon\ Solid.ttf');
}

.pokeFont {
    font-family: pokeFont, sans-serif;
    letter-spacing: 4px;
    line-height: 60px;
}

body {
    background-color: var(--bg-color-lighter);
    margin: 0;
}

header {
    width: 100dvw;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: 0 25px;
    overflow-y: hidden;
}

header * {
    margin: 0;
}

h1 {
    font-size: 40px;
    letter-spacing: 2px;
    margin: 0;
    color: var(--poke-light-yellow);
    -webkit-text-stroke: 1.5px var(--poke-light-blue);
    position: relative;
    height: 80px;
}
h1::after {
    font-size: 15px;
    line-height: 10px;
    font-family: sans-serif;
    -webkit-text-stroke: 0px;
    content: "Collect 'em all";
    position: absolute;
    right: -100px;
    top: 15px;
    transform: rotate(10deg);
}

#collectionHeader { /*The H2 immediately following the H1 in the header*/
    height: 80px;
    font-size: 35px;
    -webkit-text-stroke: 1px var(--text-color-dark);
}

#menuItems {
    display: flex;
    gap: 1em;
    background-color: var(--bg-color);
}

.menuItem {
    background-color: var(--bg-color-lighter);
    color: var(--text-color);
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    transition: 250ms ease-in-out;
    outline: 1px solid black;
    cursor: pointer;
}
.menuItem:hover, .menuItem::selection, .menuItem:focus {
    background-color: var(--bg-color-lightest);
}

main {
    display: flex;

}
.windowUI {
    display: flex;
    flex-direction: column;
    position: relative;
    height: -moz-calc(100dvh - var(--header-height));
    height: -webkit-calc(100dvh - var(--header-height));
    height: calc(100dvh - var(--header-height));
    color: var(--text-color);
}
#packWindow, #shopWindow {
    width: 25dvw;
    align-items: center;
    user-select: none;
}
#collectionWindow {
    width: 50dvw;
    border-inline: 15px solid var(--bg-color);
}
#collectionWindow, #packWindow {
    overflow-y: hidden;
    overflow-x: scroll;
}

#packWindow h2 {
    text-align: center;
    font-size: 30px;
}
#cashAmount {
    font-size: 45px;
    color: var(--cash-color-positive)
}

#shopButtons {
    width: 100%;
    display: grid;
    grid-template-rows: 1fr ;
    gap: 2em;
}

.buttonUI {
    width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 10px;
    background-color:var(--poke-dark-yellow);
    outline: 4px solid var(--poke-dark-blue);
    color: var(--text-color-dark);
    border-radius: 10px;
    font-size: 25px;
    cursor: pointer;
}
.buttonUI:hover, .buttonUI::selection, .buttonUI:focus {
    outline: 4px solid var(--poke-light-blue);
    background-color: var(--poke-light-yellow);
}
.tooExpensive {
    filter: grayscale(1);
    cursor: not-allowed !important;
}
.tooExpensive:hover, .tooExpensive::selection, .tooExpensive:focus {
    background-color: var(--poke-dark-yellow);
    outline: 4px solid var(--text-color-dark);
}

#clickablePack {
    width: 100%;
    max-width: 310px;
    height: auto;
}

#clickablePack:hover, #clickablePack:focus, #clickablePack::selection {
    outline: none;
    border: none;
}

#clickablePack * {
    cursor: pointer;
}

#clickablePack > img {
    width: 100% !important;
    height: auto !important;
}

#packCards {
    padding: 0;
    display: flex;
    justify-content: center;
    container-type: inline-size;
    container-name: pokemon-card;
}
#packCards > li {
    position: absolute;
}

.pokemon-card {
    padding: 10px;
    width: -moz-calc(100% - 45px);
    width: -webkit-calc(100% - 45px);
    width: calc(100% - 45px);
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
         box-sizing: border-box;
    max-width: 310px;
    outline: 10px solid;
    border-radius: 20px;
    /* border: 15px solid; */
    text-align: center;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}

@container pokemon-card (min-width: 350px) {
    .pokemon-card li, .pokemon-card p {
      font-size: 1.5em;
    }
    .pokemon-card {
        outline: 20px solid;
    }
    .pokemon-card > .pokeSpriteWrapper {
        height: 180px;
    }
    .pokemon-card > .pokeSpriteWrapper > img {
        height: 100%;
    }
  }

.pokemon-card > .stats-list{
list-style-type: none;
padding: 0;
}

.pokeSpriteWrapper {
    width: 95%;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: 5px solid;
    border-radius: 5px;
    background-color: rgb(36, 36, 36);
}
.pokeSpriteWrapper > img {
    height: 80%;
    width: auto;
}

/* Type Colors */
.fire { background-color: #F08030; }
.water { background-color: #6890F0; }
.grass { background-color: #78C850; }
.electric { background-color: #F8D030; }
.psychic { background-color: #F85888; }
.ice { background-color: #98D8D8; }
.rock { background-color: #B8A038; }
.ground { background-color: #E0C068; }
.flying { background-color: #A890F0; }
.fighting { background-color: #C03028; }
.poison { background-color: #A040A0; }
.bug { background-color: #A8B820; }
.ghost { background-color: #705898; }
.dragon { background-color: #7038F8; }
.dark { background-color: #705848; }
.steel { background-color: #B8B8D0; }
.fairy { background-color: #EE99AC; }
.normal { background-color: #A8A878; }


/* Rarity Color */
.Common { outline-color: khaki; }
.Uncommon { outline-color: silver; }
.Rare { outline-color: gold; }
.Legendary { outline-color:ivory; }



#collection {
    display: grid;
    height: 100%;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 5px;
    padding: 10px 60px;
    overflow-y: scroll;
}

.pokemon-tile {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    outline: 1px solid black;
    background-color: var(--bg-color);
}

.pokemon-tile img {
    width: 100%;
    height: auto;
    transition: filter 0.3s ease-in-out;
}

/* Grayscale for uncollected Pokémon */
.pokemon-tile.uncollected img {
    filter: brightness(0) contrast(1);
}

/* Tooltip styling */
.pokemon-tile::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: var(--text-color);
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    pointer-events: none;
    white-space: nowrap;
    z-index: 10;
}

/* Show tooltip on hover */
.pokemon-tile:hover::after {
    opacity: 1;
}
.pokemon-tile:hover {
    background-color: var(--bg-color-lightest);
    outline: 2px solid black;
}



footer {
    width: 100dvw;
    height: var(--footer-height);
    position: fixed;
    display: flex;
    justify-content: space-between;
    align-items: center;
    bottom: 0;
    left: 0;
    padding: 0 25px;
    color: var(--text-color);
    background-color: var(--bg-color);
}
footer > * {
    margin: 0;
}

.footerElement {
    height: 100%;
    display: flex;
    align-items: center;
}

#version {
    display: flex;
    gap: 10px;
}
#versionInfoBtn {
    cursor: pointer;
}
#authorText {
    color: var(--text-color-faded);
}
#authorText a {
    color: var(--poke-dark-yellow);
    transition: 100ms ease-in-out;
}
#authorText a:hover {
    color: var(--poke-light-yellow);
}