:root {
    --primary: #0A0F0D;
    --primaryLight: #F2F4F3;
    --text: #F2F4F3;
    --textLight: #0A0F0D;
    --secondary: #0091AD;
    --tertiary: #A31621;
    --highlight: #EA3788;
    --select-border: var(--secondary);
    --select-focus: var(--highlight);
    --select-arrow: var(--select-border);
    --accent-color: #D95F59;
}

* {
    padding: 0;
    margin: 0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
    background-color: var(--primary);
    color: var(--text);
}

main {
    margin-top: 100px;
    min-height: 100vh;
}

h2{
    text-align: center;
    font-family: Roboto;
    color: var(--text);
    margin-bottom: 50px;
}

h3{
    width: 100%;
    text-align: center;
    font-family: Roboto;
    color: var(--textLight);
}

label {
    font-family: Roboto;
    color: var(--textLight);
    align-content: center;
}

select, option, input{
    background-color: var(--primaryLight);
}

optgroup{
    background-color: var(--secondary);
    color: var(--text);
}

option {
    color: var(--textLight);
}

select {
    appearance: none;
    background-color: transparent;
    border: none;
    padding: 0 1em 0 0;
    margin: 0;
    width: 100%;
    font-family: Roboto;
    font-size: inherit;
    text-align: center;
    cursor: inherit;
    line-height: inherit;
    outline: none;
}

select::-ms-expand {
    display: none;
}

.select {
    width: 100%;
    min-width: 15ch;
    border: 1px solid var(--select-border);
    border-radius: 0.25em;
    padding: 0.25em 0.5em;
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1.1;
    background-color: var(--primaryLight);
    background-image: linear-gradient(to top, #f9f9f9, #fff 33%);
    display: grid;
    grid-template-areas: "select";
    align-items: center;
    position: relative;
    margin: auto 0;
}

.select--enabled::after { 
    content: "";
    width: 0.8em;
    height: 0.5em;
    background-color: var(--select-arrow);
    clip-path: polygon(100% 0%, 0 0%, 50% 100%);
    justify-self: end;
}

.select--fishing::after, 
.select--rsmash::after, 
.select--surf::after, 
.select--walk::after,
.select--headbutt::after,
.select--darkgrass::after,
.select--shaking::after,
.select--rippling::after,
.select--swamp::after,
.select--snow::after,
.select--terrain::after,
.select--dirt::after,
.select--purpleflowers::after,
.select--yellowflowers::after,
.select--redflowers::after,
.select--soaring::after{
    content: "";
    display: block;
    width: 1em;
    height: 1em;
    background-size: contain;
    background-position: center;
    justify-self: end;
    background-size: cover;
}

.select--walk::after{
    background-image: url(./resources/images/tallgrass.png);
}

.select--fishing::after{
    background-image: url(./resources/images/Fishingrod.png);
}

.select--surf::after{
    background-image: url(./resources/images/surf.png);
}

.select--rsmash::after{
    background-image: url(./resources/images/rock.png);
}

.select--headbutt::after{
    background-image: url(./resources/images/headbutt.png);
}

.select--darkgrass::after{
    background-image: url(./resources/images/darkgrass.png);
}

.select--shaking::after{
    background-image: url(./resources/images/shakinggrass.png);
}

.select--rippling::after{
    background-image: url(./resources/images/ripplingwater.png);
}

.select--dirt::after{
    background-image: url(./resources/images/dirt.png);
}

.select--snow::after{
    background-image: url(./resources/images/snow.png);
}

.select--terrain::after{
    background-image: url(./resources/images/terrain.png);
}

.select--swamp::after{
    background-image: url(./resources/images/swamp.png);
}

.select--yellowflowers::after{
    background-image: url(./resources/images/yellowflowers.png);
}

.select--redflowers::after{
    background-image: url(./resources/images/redflowers.png);
}

.select--purpleflowers::after{
    background-image: url(./resources/images/purpleflowers.png);
}

.select--soaring::after{
    background-image: url(./resources/images/soaring.png);
}

.select--disabled {
    cursor: not-allowed;
    background-color: #eee;
    background-image: linear-gradient(to top, #ddd, #eee 33%);
}

select,
.select:after {
  grid-area: select;
}

select:focus + .focus {
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border: 2px solid var(--select-focus);
    border-radius: inherit;
    pointer-events: none;
}

.modChunk{
    width: 45%;
    min-width: 400px;
    margin: 10px auto;
    border: 2px solid var(--primaryLight);
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    row-gap: 5px;
    justify-content: space-between;
    background-color: var(--secondary);
    color: var(--textLight);
    padding: 10px;
}

.modChunk > .select{
    width: 75%;
}

.modChunk > label, .modChunk > div > label {
    min-width: 20%;
    margin-right: 10px;
    color: var(--textLight);
    font-size: 1.25em;
}

.modChunkHolder {
    width: 90%;
    margin: 0 auto;
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
}

.thanksChunk{
    margin-top: 50px;
}

.thanksCredit {
    width: 100%;
    font-family: Roboto;
    color: var(--textLight);
}

.innerDiv {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    row-gap: 5px;
    justify-content: space-between;
}

input[type=number] {
    width: 75%;
    border: 1px solid var(--select-border);
    border-radius: 0.25em;
    padding: 0.25em 0.5em;
    font-size: 1.25rem;
    line-height: 1.1;
    background-color: var(--primaryLight);
    background-image: linear-gradient(to top, #f9f9f9, #fff 33%);
    margin: auto 0;
}

input[type=number]:disabled {
    cursor: not-allowed;
}

.checkboxDiv {
    width: 75%;
    align-content: center;
}

.imageHolder {
    display: flex;
    justify-content: space-evenly;
    width: 90%;
    max-width: 700px;
    margin: 0px auto;
    margin-bottom: -3px;
    padding: 0;
}

.imageHolder > img {
    padding: 0;
    margin: 0;
}

legend{
    font-family: Roboto;
    font-size: 1em;
}

fieldset{
    border: 2px solid var(--tertiary);
    border-radius: 5px;
}

fieldset > label {
    color: var(--textLight);
    font-family: Roboto;
    font-size: 1.25em;
}

.ruinsFieldset, .nFieldset, .whiteForestFieldset{
    width: 100%;
}

.ruinsFieldset > div, .nFieldset > div{
    width: 100%;
    display: flex;
    justify-content: left;
    column-gap: 10px;
}

.ruinsFieldset > div > label, .nFieldset > div > label {
    color: var(--textLight);
    font-family: Roboto;
    font-size: 1.25em;
}

.safariFieldset {
    width: 95%;
}

.safariFieldset > div {
    width: 100%;
}

.safariFieldset > div > div {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
}

.safariFieldset > div > div > input {
    width: 75%;
}

.safariFieldset > div > div > label {
    color: var(--textLight);
    font-size: 1.25em;
    font-family: Roboto;
}

.whiteForestFieldset{
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    flex-direction: row;
}

.whiteForestTrainerDiv {
    width: 0.25%;
    min-width: 150px;
    display: flex;
    justify-content: left;
}

.whiteForestTrainerDiv > label {
    color: var(--textLight);
    font-family: Roboto;
    font-size: 1.25em;
}

.controlsHolder {
    display: flex;
    flex-wrap: wrap;
    row-gap: 10px;
    width: 100%;
}

.controlsDiv {
    border: 2px solid var(--primaryLight);
    border-radius: 10px;
    background-color: var(--secondary);
    padding: 10px;
    margin: 0px auto;
    width: 45%;
    min-width: 400px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    flex-direction: row;
    row-gap: 10px;
    font-family: Roboto, Arial, Helvetica, sans-serif;
    font-size: 1.25em;
}

.controlsDiv {
    color: var(--textLight);
}

.controlsDiv > div {
    width: 100%;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: space-between;
}

.controlsDiv > div > .select {
    width: 85%;
}

.controlsDiv > div > label {
    width: 15%;
}

#encounterSlots, #processedEncounters{
    width: 90%;
    display: none;
    flex-flow: row wrap;
    justify-content: center;
    margin: 10px auto;
    border: 2px solid var(--primaryLight);
    border-radius: 10px;
}

#encounterSlots {
    background-image: linear-gradient(to bottom, var(--primaryLight), var(--secondary) 45%);
    padding-bottom: 10px;
}

#processedEncounters{
    background-image: linear-gradient(to top, var(--primaryLight), var(--secondary) 45%);
}

.encounterSlot{
    background-color: var(--primaryLight);
    color: var(--textLight);
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    font-weight: 80;
    display: flex;
    flex-direction: column;
    border: 4px solid var(--tertiary);
    border-radius: 5px;
    margin: 10px 10px 0px 0px;
    padding: 5px;
    width: 125px;
    height: 175px;
}

.encounterSlot > img {
    height: 40%;
    width: 80%;
    object-fit: cover;
    margin: 2px auto;
    border: 3px solid var(--tertiary);
    border-radius: 5px;
    z-index: 1;
}

.shinyFlip:hover{
    cursor: pointer;
}

.encounterSlot > p {
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    display: flex;
    justify-content: space-between;
    padding: 0;
    margin: 0;
    z-index: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    white-space: nowrap;
}

.encounterSlot > div {
    display: flex;
    flex-wrap: wrap;
}

.hordePokemon {
    background-origin: content-box;
    background-position: left top, right top, left bottom, right bottom;
    background-size: 40% 40%;
    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
}

.encounterSlot > p > span {
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

.genderHeader {
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    z-index: 1;
}

.pokemonName, .pokemonRate {
    display: inline-block;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.pokemonName {
    max-width: 60%;
    font-size: 0.8em;
}

.fullLength {
    max-width: 100%;
}

.pokemonRate {
    max-width: 40%;
    font-size: 0.8em;
}

.genderHeader {
    width: 100%;
}

.genderPercent, .secondaryInfo {
    font-family: Futura;
    font-size: 0.8em;
    width: 100%;
}

.grass {
    background-color: #19A648;
}

.fire {
    background-color: #D8223B;
}

.water {
    background-color: #05A8D9;
}

.electric {
    background-color: #FCD021;
}

.fighting {
    background-color: #B16232;
}  

.psychic {
    background-color: #957DAB;
}

.normal {
    background-color: #d2d0cf;
}

.dark {
    background-color: #2e7077;
}

.steel {
    background-color: #9B9E8C;
}

.dragon {
    background-color: #948f31;
}

.fairy {
    background-color: #d6457e;
}

.poison {
    background-color: #9141cb;
}

.bug {
    background-color: #91A119;
}

.ice {
    background-color: #3dcef3;
}

.rock {
    background-color: #afa981;
}

.ground {
    background-color: #915121;
}

.ghost {
    background-color: #704170;
}

.flying {
    background-color: #81b9ef;
}

.nPokemon{
    background-image: url(./resources/images/N.png);
    background-repeat: no-repeat;
    background-position-y: bottom;
    background-position-x: right;
}

.ellipse {
    position: relative;
    background: radial-gradient(
      95.11% 95.11% at 36.64% 4.89%,
      #2ad0ca 0%,
      #e1f664 22.92%,
      #feb0fe 46.88%,
      #abb3fc 68.23%,
      #5df7a4 87.5%,
      #58c4f6 100%
    );
  }
  
  .ellipse::before,
  .ellipse::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: conic-gradient(
      from 176.21deg at 50% 50%,
      #000000 -24.66deg,
      #ffffff 0.25deg,
      #000000 50.63deg,
      #000000 51.97deg,
      #ffffff 88.12deg,
      #000000 142.5deg,
      #ffffff 196.87deg,
      #000000 256.87deg,
      #ffffff 300deg,
      #000000 335.2deg,
      #000000 335.34deg,
      #ffffff 360.25deg
    );
  }
  
  .ellipse::before {
    mix-blend-mode: difference;
  }
  .ellipse::after {
    mix-blend-mode: screen;
  }
  
  .ellipse .noise {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url(./public/resources/images/noise.png);
    background-size: cover;
    background-repeat: repeat;
    mix-blend-mode: overlay;
    z-index: -1;
  }

  .encounterRate{
    width: 90%;
    height: 20px;
    background-color: var(--primary);
    margin: 10px 5%;
    display: flex;
    justify-content: left;
    border: 1px solid var(--tertiary);
    border-radius: 5px;
    overflow: hidden;
  }

  .encounterRateNoBar {
    display: none;
    color: var(--textLight);
  }

  .barChart {
    background-color: var(--tertiary);
    color: var(--text);
    overflow: visible;
    white-space: nowrap;
    display: flex;
    align-items: center;
  }

  .barChart > span {
    margin-left: 5px;
    font-family: Roboto;
  }

  .encounterRateNoBar > span {
    font-family: Roboto;
  }

  .hidden {
    display: none;
  }

  .pieChartDiv {
    background-color: var(--secondary);
    border: 2px solid var(--primaryLight);
    border-radius: 10px;
    width: 90%;
    margin: 20px auto;
    padding: 10px 0;
    min-height: 50vh;
    align-items: center;
    display: flex;
    justify-content: center;
  }

  .pokeballTop {
    width: 45vh;
    height: 45vh;
    position: absolute;
  }

  svg {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1000px;
    position: absolute;
  }

  footer{
    background-color: rgb(49, 49, 49);
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    height: 50px;
    margin: 0;
    width: 100%;
}

footer > div{
    color: #F1F2F3;
}

footer > div > a{
    color: var(--accent-color);
}

  @media screen and (max-width: 600px) {
    .encounterRate {
      display: none;
    }

    .encounterRateNoBar {
        display: block;
        width: 100%;
        text-align: center;
    }

    .encounterSlot > p {
        font-size: 0.75em;
    }
  }

  @media screen and (max-width: 800px) {
    .modChunk > label {
        font-size: 0.75em;
    }
  }

  @media screen and (max-width: 1400px) {
    .controlsDiv > div > label {
        font-size: 0.75em;
    }

    .controlsDiv > div > .select {
        width: 80%;
    }
  }

  @media screen and (max-width: 1000px) {
    footer{
        font-size: 12px;
    }
}