html {
    min-height: 100%;
    display: flex;
    width: 100%;
    box-sizing: border-box;
    padding: env(safe-area-inset);
    font-family: Arial, Helvetica, sans-serif;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -o-user-select: none;
    user-select: none;
}

input:not([type="submit"]) {
    -webkit-user-select: text;
    -khtml-user-select: text;
    -moz-user-select: text;
    -o-user-select: text;
    user-select: text;
}

#lot, #phone, .raffle, .prizes {
    display: none;
}

body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    margin: 0;
    width: 100%;
    min-height: 100%;
    background: linear-gradient(180deg, lightBlue 100px, #00a54f 100px);
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body.showmodal {
    height: auto;
}

input[type=submit]:active, button:active {
    background-color: pink !important;
}

.wrapper, #header {
    position: relative;
    width: 100%;
    //height: 100%;
    max-width: 600px;
    flex: 1 0 auto;
}

#main {
    display: flex;
    flex-direction: column;
    padding: 0px 20px 10px 20px;
}

#main > * {
    flex-grow: 0;
    flex-shrink: 0;
}

#main #menu {
    display: flex;
    align-items: end;
    justify-content: space-between;
    position: relative;
    flex-grow: 1;
    gap: 10px;
}

button.menuBtn {
    background-color: #e9f46d;
    flex-grow: 1;
    bottom: 0px;
    height: 50px;
    background-image: url('../images/eggIcon2.svg');
    background-repeat: no-repeat;
    background-size: auto 70%;
    background-position: center center;
}

#radarBtn, #radarExample {
    background-image: url('../images/radarIcon.svg');
}

#invExample {
    background-image: url('../images/eggIcon2.svg');
}

#radarExample, #invExample {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
    display: inline-block;
    height: 20px;
    width: 30px;
}

#helpBtn {
    background-image: url('../images/helpIcon.svg');
}

#innards {
    display: none;
    position: absolute;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    vertical-align: center;
}

.yolk #innards {
    display: flex;
}

#yolk {
    position: absolute;
    top: 0px;
    width: 100%;
    height: 100%;
    background-image: url("../images/yolk.svg");
    background-repeat: no-repeat;
    background-size: 60%;
    background-position: center center;
    animation: 10000ms infinite linear spin;
}

#eggid {
    position: absolute;
    font-family: Arial, Helvetica, san-serif;
    font-size: min(25vmin, 100px);
    font-weight: bolder;
    text-align: center;
    color: black;
//    -webkit-text-stroke: 0.5vmin white;
}

.message {
    display: block;
    font-size: min(10vmin, 40px);
    color: black;
    z-index: 100;
    text-align: center;
    width: 100%;
}

#reward .message {
    color: rgba(255, 255, 255, 0);
    animation: 1000ms ease-in appear;
    animation-fill-mode: forwards;
}

#confetti {
    position: absolute;
    top: 0px;
    width: 100%;
    max-width: 900px;
    height: 100%;
    pointer-events: none;
}

#topimage {
    margin: 10px 0 0 20px;
    position: relative;
    height: 100px;
    width: 100px;
    flex-basis: 100px;
    flex-grow: 0;
    flex-shrink: 0;
    //filter: hue-rotate(0deg);
}

#enterinfo {
    //margin-top: 30px;
}

input, .output, button {
    display: block;
    width: 100%;
    margin: 10px 0px;
    text-align: center;
    background-color: white;
    height: 50px;
    border-radius: 20px;
    font-size: 2rem;
    line-height: 50px;
}

#found {
    margin-top: 30px;
    background: linear-gradient(90deg, #FFC0CB 0%, #00FFFF 0%);
}

input.error {
    background-color: #FFC0CB;
}

input.error::placeholder {
    color: red;
}

input#code {
    text-transform: uppercase;
}

label {
    display: block;
    text-align: center;
    width: 100%;
    margin-bottom: 0 2px 0 10px;
}

input::placeholder {
    color: lightGray;
    text-transform: none;
}

input#submitBtn {
    background-color: #e9f46d;
    width: 50%;
    margin-left: 25%;
    right: 0px;
}

#header {
    display: flex;
    height: auto;
}

#title {
    font-family: helvetica, san-serif;
    display: inline-block;
    margin-top: 20px;
    margin-right: 30px;
    font-size: 2rem;
    height: 100%;
    text-align: right;
    flex-grow: 1;
    flex-shrink: 1;
}

#overlay {
    display: none;
    position: fixed;
    top: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100%;
    animation: 500ms linear fade;
    animation-fill-mode: forwards;
}

#reward {
    display: none;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100%;
    overflow: hidden;
}

.good #reward, .old #reward, .bad #reward, .prize #reward, .closed #reward, .yolk #reward {
    display: flex;
}

.old .eggtop {
    display: none;
}

#eggwrapper {
    display: block;
    top: -100%;
}

.prize .egg, .closed .egg {
    display: none;
}

.good .prizeimg, .old .prizeimg, .bad .prizeimg, .yolk .prizeimg {
    display: none;
}

.egg, .prizeimg {
    position: absolute;
    top: 50%;
    margin-top: -50%;
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    background-image: url("../images/eggs.svg");
    background-repeat: no-repeat;
    background-size: 500%;
    overflow: hidden;
}

.prizeimg {
    background-image: url("../images/prizes.svg?v=7");
    animation: 10000ms infinite linear;
}

.eggtop {
    clip-path: polygon(0 0, 0 50%, 12.5% 45.5%, 25% 57.5%, 37.5% 45.5%, 50% 62.5%, 62.5% 45.5%, 75% 57.5%, 86.5% 45.5%, 100% 50%, 100% 0);
}

.eggbottom {
    clip-path: polygon(0 100%, 0 50%, 12.5% 45%, 25% 57%, 37.5% 45%, 50% 62%, 62.5% 45%, 75% 57%, 86.5% 45%, 100% 50%, 100% 100%);
}

.good #eggwrapper {
    animation-name: fall, shake;
    animation-duration: 1000ms, 2000ms;
    animation-delay: 0ms, 1000ms;
    animation-iteration-count: 1, infinite;
    animation-timing-function: cubic-bezier(0.44, 0.07, 0.93, 0.7), linear;
    animation-fill-mode: forwards;
    transform-origin: bottom center;
}

.old .eggbottom {
    animation-name: tilt;
    animation-duration: 300ms;
    animation-delay: 1000ms;
    animation-iteration-count: 1;
    animation-timing-function: ease-in;
    animation-fill-mode: forwards;
    transform-origin: 50% 70%
}

#eggwrapper {
    animation-name: fall;
    animation-duration: 1000ms;
    animation-iteration-count: 1;
    animation-timing-function: cubic-bezier(0.44, 0.07, 0.93, 0.7);
    animation-fill-mode: forwards;
    transform-origin: bottom center;
}

.yolk #eggwrapper {
    top: 0%;
}

.yolk .egg {
    animation-name: crackbottom;
    animation-duration: 500ms;
    animation-iteration-count: 1;
    animation-timing-function: ease-in;
    animation-fill-mode: forwards;
    transform-origin: 100% center;
}

.yolk .eggtop {
    animation-name: cracktop;
    animation-duration: 1000ms;
    animation-timing-function: linear;
}

.showmodal #main {
    display: none;
}

.showmodal #modals {
    display: flex;
}

#modals {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: stretch;
    gap: 10px;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: lightBlue;
    font-size: min(7.5vmin, 30px);
}

#modalcontent {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 600px;
    padding: 0px 20px 10px 20px;
    flex-basis: 100%;
}

.modal {
    display: none;
    position: relative;
    justify-content: space-between;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 20px;
    flex: 1 0 auto;
}

#helpModal {
    font-size: 24px;
    justify-content: start;
    gap: 16px;
}

#helpModal .header {
    font-weight: bold;
}

ul li {
    margin-left: 30px;
    text-indent: -25px;
    margin-bottom: 20px;
}

ul li::before {
    content: '';
    display: inline-block;
    height: 25px;
    width: 25px;
    background-image: url('../images/eggbullet.svg');
    background-size: contain;
    background-repeat: no-repeat;
    list-style-position: inside;
    text-indent: 25px;
}

#closeBuffer {
    flex: 0 0 60px;
}

#closeModal {
    position: fixed;
    bottom: 0px;
    width: 90%;
    max-width: 600px;
    flex: 0 0 auto;
    z-index: 100;
}

#radar {
    position: relative;
    width: 80%;
    padding-bottom: 80%;
    height: 0;
    background-image: url('../images/radar.svg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: auto 100%;
    flex: 0 0 auto;
}

#radarSweep, #radarColor, #radarFront {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url('../images/radar.svg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: auto 100%;
}

#radar.found #radarColor {
    background-image: radial-gradient(closest-side, red 99%, transparent 99%);
}

#radarSweep {
    background-image: url('../images/radarSweep.svg');
    animation: 4000ms infinite linear spin;
}

#radar.error #radarFront {
    background-image: url('../images/radarBroke.svg');
}

@keyframes fade {
    from { background-color: rgba(173, 216, 230, 0); }
    to   { background-color: rgba(173, 216, 230, 1); }
}

@keyframes appear {
    0%   { color: rgba(0, 0, 0, 0); }
    50%  { color: rgba(0, 0, 0, 0); }
    100% { color: rgba(0, 0, 0, 1); }
}

@keyframes fall {
  from {
    top: -100%;
  }

  to {
    top: 0%;
  }
}

@keyframes shake {
  0%   { transform: translateY( 1%) rotate(1deg); }
  10%  { transform: translateY(-1%) rotate(-2deg); }
  20%  { transform: translateY(-3%) rotate(4deg); }
  30%  { transform: translateY( 3%) rotate(1deg); }
  40%  { transform: translateY( 1%) rotate(4deg); }
  50%  { transform: translateY(-1%) rotate(-3deg); }
  60%  { transform: translateY(-3%) rotate(1deg); }
  70%  { transform: translateY( 3%) rotate(-3deg); }
  80%  { transform: translateY(-1%) rotate(4deg); }
  90%  { transform: translateY( 1%) rotate(-2deg); }
  100% { transform: translateY( 1%) rotate(1deg); }
}

@keyframes tilt {
  0%   { transform: rotate(0deg); }
  100% { transform: translateX(50px) rotate(20deg); }
}

@keyframes cracktop {
    from {
       top: 50%;
       left: 0px;
    }

    to {
       top: -50%;
       left: 100%;
       transform: rotate(180deg);
    }
}

@keyframes crackbottom {
    from {
       top: 50%;
    }

    to {
       top: 170%;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes rainbow {
  0%   { filter: hue-rotate(0deg);   -webkit-filter: hue-rotate(0deg);   }
  33%  { filter: hue-rotate(120deg); -webkit-filter: hue-rotate(120deg); }
  66%  { filter: hue-rotate(240deg); -webkit-filter: hue-rotate(240deg); }
  100% { filter: hue-rotate(360deg); -webkit-filter: hue-rotate(360deg); }
}

.textme {
    text-decoration: underline;
    color: blue;
}

.textme:active {
    color: white;
}