/* Initial Setup */


* {
    padding: 0;
    margin: 0;
}


/* MAIN FORMATTING */

body {
    text-align: center;
    margin: 0;
}

header {
    padding: 3em 0;
}

header h4 {
    margin-top: 1em;
    margin-bottom: 0em;
}

nav li {
    line-height: 2em;
}

main h2, main h3 {
    padding-top: 1em;
}

main h3 {
    padding: 1em;
}

#bug-description h3, #equip-description h3, 
#cocoon-description h3 {
    padding: 1em 1em 0em 1em;
}

#moth-description h3 {
    padding: 1em;
}

#bug-description p, #equip-description p, 
#cocoon-description p, #moth-description p {
    padding: 0em 0.5em;
}

#bug-desc-upper-text, #equip-desc-upper-text, 
#cocoon-desc-upper-text {
    margin-top: 1em;
}

img {
    filter: opacity(20%);
    padding: 0em 1em;
    filter: hue-rotate(90deg);
}

#moth-img {
    filter: hue-rotate(0deg);
}

#nectar-button {
    padding: 3em 1.5em;
}

#cocoon-sacrifice-button {
    padding: 1em 2em;
    margin: 1em;
}

#bug-upgrades, #equip-upgrades, #moth-upgrades {
    padding-top: 1em;
    display: flex;
    gap: 1em;
    padding-bottom: 1em;
    margin: 0 1em 0 1em;
}

footer {
    padding: 1.5em 0;
}

#reset-options {
    display: flex;
    justify-content: center;
}

#upgrades h4 {
    padding: 1em 0;
}

#confirm-reset {
    margin-right: 4em;
}

footer button {
    padding: 2em 2em;
    margin-top: 1em;
}

#moth-buy-max div {
    flex: 1;
}

#buy-max-bugs, #buy-max-equip, #moth-nectar-button {
    flex: 1;
    padding: 1em;
    width: 100%;
    height: 60%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#bug-desc-text {
    display: block;
}

#cocoon-img, #moth-img {
    margin: 1em
}

#moth-img {
    margin-bottom: 0;
}

#moth-scales-display {
    margin-bottom: 1em;
}

#equip-tab, #cocoon-tab, #moth-tab {
    display: none;
}

#sacrifice-section {
    line-height: 2em;
}

#moth-dialogue {
    font-weight: bold;
}

#moth-buy-max {
    display: flex;
    justify-content: center;
    gap: 1em;
    padding: 0 1em;
}

#moth-nectar-counters {
    padding-bottom: 1em;
}

.moth-clicker-toggle,
.moth-clicker-toggle-disabled {
    margin-top: 0.5em;
    height: 1.5em;
    width: 1.5em;
}

/* TEXT FORMATTING */


h1, h2, h3, h4, li {
    font-family: verdana;
    line-height: 1em;
}

p {
    font-family: tahoma;
}

#bug-title, #equip-title, #cocoon-title, #moth-title {
    font-size: 1.25em;
}

nav {
    font-size: 1.5em;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    list-style-type: none;
}

#nectar-button, #cocoon-sacrifice-button {
    font-weight: bold;
}

#cocoon-tab, #moth-tab {
    line-height: 1.5em;
}

#bug-upgrades, #equip-upgrades, #moth-upgrades {
    line-height: 2em;
}

#bug-upgrades h4, #equip-upgrades h4, #moth-upgrades h4 {
    line-height: 2em;
}

footer p {
    font-size: 1.5em;
    font-weight: bold;
}

#reset-title {
    font-size: 1.25em;
}

#reset-caption {
    font-size: 1em;
    font-weight: normal;
}

#confirm-reset, #cancel-reset {
    font-weight: bold;
}

#buy-max-bugs, #buy-max-equip, #moth-nectar-button {
    font-weight: bold;
}

#moth-currency-display {
    font-weight: bold;
}

#cocoon-scale-count {
    font-weight: bold;
}

/* COLOURS */

header {
   background-color: #C97C5D;
}

nav, footer {
    background-color: #C89F9C;
}

#equip-nav {
    background-color: #BF908D;
}

main {
    background-color: #EED7C5;
}

#bug-tab, #equip-tab, #nectar-button, 
#buy-max-bugs, #buy-max-equip, #moth-nectar-button {
    background-color: #EEE2DF;
}

#cocoon-tab, #moth-tab {
    color: #fff;
    background-color: #000;
}

#cocoon-sacrifice-button {
    color: #fff;
    background-color: #000;
}

#confirm-reset {
    background-color: #81ff7f;
}

#cancel-reset {
    background-color: #ff967f;
}

.moth-clicker-toggle {
    background-color: #7FFFA3;
}

.moth-clicker-toggle-disabled {
    background-color: #FFA37F;
}

/* DECORATION */

nav li:hover, #equip-title:hover, #bug-title:hover, #reset-text:hover {
    cursor: pointer;
}

/* FUNCTIONALITY */

img {
    user-select: none;
    -webkit-user-drag: none;
}

#bug-upgrades, #equip-upgrades, #moth-upgrades {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
}

/* LOADING BARS */

#cocoon-loading-outer-bar, 
#moth-nectar-loading-outer-bar,
#moth-max-bugs-loading-outer-bar,
#moth-max-equips-loading-outer-bar {
    width: 80%;
    border-radius: 5px;
    background-color: white;
    overflow: hidden;
    margin: 1em auto;
}

#cocoon-loading-inner-bar {
    width: 0%;
    height: 1em;
    background-color: #703D57;
}

#moth-nectar-loading-inner-bar,
#moth-max-bugs-loading-inner-bar,
#moth-max-equips-loading-inner-bar {
    background-color: #FFA37F;
}

#moth-nectar-loading-outer-bar,
#moth-max-bugs-loading-outer-bar,
#moth-max-equips-loading-outer-bar {
    margin-top: 0.25em;
    margin-bottom: 0.25em;
    width: 100%;
    height: 10%;
    border-radius: 3px;
}

#moth-nectar-loading-inner-bar,
#moth-max-bugs-loading-inner-bar,
#moth-max-equips-loading-inner-bar {
    padding: 0.5em 0;
}



/* ANIMATION */

@keyframes pulse {
    0% {transform: scale(1);}
    50% {transform: scale(1.1);}
    100% {transform: scale(1);}
}

.pulse {
    animation-name: pulse;
    animation-duration: 0.05s;
}

@keyframes clickDarken {
    0%   {
        transform: scale(1);
        filter: brightness(100%);
    }
    50%  {
        transform: scale(1.1);
        filter: brightness(80%);
    }
    100% {
        transform: scale(1);
        filter: brightness(100%);
    }
}

.clickDarken {
    animation-name: clickDarken;
    animation-duration: 0.05s;
}