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

    &::selection {
        background-color: transparent;
    }
}
:root {
    touch-action: pan-x pan-y;
}
@media screen and (max-width: 991.98px)  {
    body {
        padding: 20px !important;
        overflow-x: hidden !important;
    }
    main {
        flex-direction: column !important;
        position: relative !important;
        padding: 0 !important;
    }
    #left-bar {
        width: 100% !important;
    }
    #stats {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        padding: 0px !important;
        padding-block: 10px !important;

    }
    #item-box {
        display: flex !important;
        flex-direction: column !important;
        padding: 10px !important;
        flex-wrap: wrap !important;
        align-items: center;
    }
    #more-items {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between;
        
    }
    .item-title {
        font-size: 2em !important;
        margin-right: 10px !important;
    }
    #egg-rate-item {
        display: flex !important;
        flex-direction: row !important;
    }
    #egg-rate-text {
        font-size: 2em !important;
        margin-right: 20px !important;
        margin-bottom: 10px !important;
    }
    #background, #background2 {
        animation: none !important;
    }
    #mrschicken {
        height: 400px !important;

    }
    .section-title {
        font-size: 3em !important;
        padding-top: 10px !important;
        -webkit-text-stroke: 10px  rgb(4, 106, 181) !important;
    }
    #title-text {
        font-size: 4em !important;
        -webkit-text-stroke: 15px  rgb(4, 106, 181) !important;
    }
    #egg-title {
        font-size: 3.6em !important;
    }
    #sidebar {
        position: relative !important;
        padding: 0 !important;
        padding-top: 20px !important;
        width: 100% !important;
        bottom: 0 !important;
        height: 40% !important;
    }
    #upgrades-container {
        overflow-y: auto;
    }
    .unit {
        padding: 5px !important;
        padding-inline: 20px !important;
    }
    .upgrade-name {
        font-size: xx-large !important;
    }
    .upgrade-cost-text {
        font-size: xx-large !important;
    }
    .bought-number {
        font-size: xx-large !important;
    }
    .multiplier {
        font-size: xx-large !important;
    }
    #settings {
        width: 100px !important;
        position: absolute !important;
        margin-top: 10px !important;
        bottom: inherit !important;
        z-index: 3 !important;
    }
    .settings-menu {
        width: 80% !important;
        padding: 2em !important;
    }
    #settings-header-text {
        font-size: 3em !important;
        -webkit-text-stroke: 15px  rgb(4, 106, 181) !important;
    }
    .close {
        font-size: 3em !important;
        -webkit-text-stroke: 15px  rgb(4, 106, 181) !important;
    }
    .slider-header {
        font-size: 2.5em !important;
        padding-bottom: 0.5em !important;
    }
    .speedSlider {
        height: 30px !important;
    }
    .slider-labels span{
        font-size: 2.5em !important;
    }
    .egg {
        width: 80px !important;
    }
    .golden-egg {
        width: 120px !important;
    }
    .multiplier {
        padding: 5px !important;
    }
    .hover-box {
        display: none !important;
    }
    .speedSlider::-webkit-slider-thumb,
    .speedSlider::-moz-range-thumb {
        width: 50px !important;
        height: 50px !important;
    }
}

.gold-cursor {
    cursor: url('../images/Gold.cur'), auto;
}
.golden-title {
    color: white;
    text-shadow: 0 0 10px gold, 0 0 20px gold, 0 0 30px gold;
    animation: 0.3s;
}
p {
    font-family: "Albert Sans", sans-serif; 
}
h4 {
    font-family: 'Peppa Pig', sans-serif;
    color: rgb(4, 106, 181);
    margin: 0;
}
body {
    background-color: rgb(87,196,255);
    display: flex;
    flex-direction: column;
    overflow-y: hidden;
    height: 100vh;
}
header {
    position: sticky;
    text-align: center;
}
main {
    display: flex;
    flex-direction: row;
    flex-grow: 1;
    padding: 10px;
    height: 100%;
}



.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(35, 38, 92, 0.5);
    z-index: 6;
}

.settings-menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgb(125, 211, 250);
    border: 3px solid rgb(32, 141, 213);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    width: 300px;
}
.settings-header {
    display: flex;
    flex-direction: row;
    position: relative;
}
#settings-header-text {
    font-family: 'Peppa Pig', sans-serif;
    color: white;
    -webkit-text-stroke: 8px  rgb(4, 106, 181);
    paint-order: stroke fill;
    margin: 0;
    z-index: 1;
}

.settings-menu .close {
    right: 0;
    top: 0;
    position: absolute;
    justify-self: end;
    font-size: 30px;
    align-self: center;
    cursor: pointer;
    font-family: 'Peppa Pig', sans-serif;
    color: white;
    -webkit-text-stroke: 7px  rgb(4, 106, 181);
    paint-order: stroke fill;
}




#stats {
    left: 0;
    background-color: rgb(125, 211, 250);
    border-radius: 10px;
    width: 150px;
    border: 3px solid rgb(32, 141, 213);
    align-self: flex-start;
    padding: 10px;
    padding-left: 18px;
    padding-right: 18px;
}
#main-bit {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}
#egg-title {
    margin: 0;
    font-size: xx-large;
    font-family: 'Cool School', sans-serif;
    transition: color 0.5s ease, text-shadow 0.5s ease;
}
#chicken-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}
#background {
    position: absolute;
    width: min(100vw, 100vh);
    height: min(100vw, 100vh);
    background-image: repeating-conic-gradient(from 0deg,
                    transparent 0deg 15deg,
                    rgba(255, 255, 255, 0.4) 15deg 40deg);
    border-radius: 50%;
    animation: rotate-bg 20s linear infinite;
    mask-image: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 1) 34%, rgba(0, 0, 0, 0.32) 59%, rgba(238, 130, 238, 0) 71%);
    mask-mode: alpha;
    overflow: visible;
    z-index: -1;
}
#background2 {
    position: absolute;
    width: min(100vw, 100vh);
    height: min(100vw, 100vh);
    background-image: radial-gradient(rgb(255, 255, 255), transparent);
    border-radius: 50%;
    animation: rotate-bg 20s linear infinite;
    mask-image: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.904) 24%, rgba(0, 0, 0, 0.32) 59%, rgba(238, 130, 238, 0) 71%);
    mask-mode: alpha;
    overflow: visible;
    z-index: -1;
}
#left-bar {
    display: flex;
    flex-direction: column;
    position: relative;
}
#sidebar {
    padding: 10px;
    width: 300px;
    right: 0;
    background-color: rgb(125, 211, 250);
    border-radius: 10px;
    border: 3px solid rgb(32, 141, 213);
    display: flex;
    flex-direction: column;
}
#settings {
    width: 50px;
    position: absolute;
    bottom: 0;

    &:hover {
        transform: scale(1.1);
        animation: rotate-bg 5s linear infinite;
    }
}
#title-text {
    font-family: 'Peppa Pig', sans-serif;
    color: white;
    -webkit-text-stroke: 8px  rgb(4, 106, 181);
    paint-order: stroke fill;
    margin-bottom: 5px;
}
#mrschicken {
    height: 200px;
    animation: idle linear 3s infinite;
}
.section-title {
    font-family: 'Peppa Pig', sans-serif;
    font-size: x-large;
    color: white;
    -webkit-text-stroke: 5px  rgb(4, 106, 181);
    paint-order: stroke fill;
    margin: 5px;
    text-align: center;
}
.unit {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;

}
.multiplier-text {
    font-family: 'Cool School', sans-serif;
    color: aliceblue;
}
.multiplier-block {
    position: relative;
    display: flex;
    padding-inline: 10px;
    background-color: rgb(32, 141, 213);
    border-radius: 5px;
    margin: 5px;

    &:hover{
        transform: scale(1.02);
    }
}
.upgrade-button {
    position: relative;
    display: flex;
    flex-grow: 1;
    padding: 10px;
    background-color: whitesmoke;
    margin: 5px;
    border-radius: 10px;
    border: 3px solid rgb(32, 141, 213);
    transition: transform 0.3s cubic-bezier(0.25, 1.25, 0.5, 1);

    &:hover{
        transform: scale(1.02);
    }
}
.hover-box {
    position: absolute;
    right: 100%;
    transform: translateX(-10px);
    background-color: rgb(212, 234, 255);
    border-radius: 10px;
    border: 3px solid rgb(32, 141, 213);
    color: black;
    padding: 10px;
    border-radius: 10px;
    z-index: 50;
    width: 250px;
}
.hover-item {
    margin: 0;
}
.upgrade-cost-text {
    margin: 0;
}
.upgrades-container {
    position: relative;
    overflow-y: scroll;
}
.bought-number {
    margin: 0;
    font-size: x-large;
    color: rgb(80, 140, 192);
    font-weight: bold;
    font-family: 'Cool School', sans-serif;
                                                
}
.left {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.right {
    display: flex;
    align-items: center;
}
.upgrade-rate {
    opacity: 0;
}

#egg-count-text, #egg-rate-text {
    margin-top: 0;
}

.egg {
    position: absolute;
    width: 36px;
    z-index: 3;
    transition: all 0.5s linear;
    animation: eggdrop 1s forwards;
}
.golden-egg {
    position: absolute;
    width: 80px;
    z-index: 4;
    transition: all 0.5s linear;
    animation: goldeneggdrop 1s forwards;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 1)) drop-shadow(0 0 10px rgba(255, 255, 255, 1)) brightness(1.1); 
}
.golden-egg-bonus {
    font-size: 30px;
    color: gold;
    font-weight: bold;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
    font-family: 'Cool School', sans-serif;
    animation: eggdrop 1s forwards;
}
.speedSlider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: rgb(32, 141, 213);
    outline: none;
    opacity: 0.7;
    transition: opacity .2s;
}

.speedSlider::-webkit-slider-thumb,
.speedSlider::-moz-range-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 1.5em;
    height: 1.5em;
    border-radius: 50%;
    background: white;
    border: none;
    cursor: pointer;
}

.speedSlider:focus {
    opacity: 1;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    width: 98%;
    padding-top: 6px;
}

.slider-labels span {
    font-size: 20px;
    color: black;
    font-family: 'Cool School', sans-serif;
    font-weight: 900;
}
.slidecontainer {
    width: 100%;
    position: relative;
    align-items: center;
    display: flex;
    flex-direction: column;
    padding-bottom: 8px;
}
.slider-header {
    font-family: 'Cool School', sans-serif;
    font-size: 1.3em;
    padding-block: 8px;
    margin: 0;
    color: rgb(4, 106, 181);
}


@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes pulse-menu {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes idle {
    0% {
        transform: scale(1);
    }
    25% {
        transform: rotate(5deg);
    }
    50% {
        transform: scale(1.05);
    }
    75% {
        transform: rotate(-5deg);
    }
    100% {
        transform: scale(1);
    }
}
@keyframes rotate-bg {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
@keyframes eggdrop {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    50% {
        opacity: 0.95;
    }
    100% {
        opacity: 0;
        transform: translateY(60px);
    }
}
@keyframes goldeneggdrop {
    0% {
        opacity: 0;
        transform: translateY(0);
    }
    50% {
        opacity: 0.05;
    }
    100% {
        opacity: 1;
        transform: translateY(60px);
    }
}
@keyframes rotate-bg {
    0% {
        transform: rotate(0deg) scale(1.1);
    }
    100% {
        transform: rotate(360deg) scale(1.1);
    }
}
