@font-face {
    font-family: 'PressStart';
    src:
        url('assets/press-start.k.ttf') format('truetype');
}

body {
    max-height: 100vh;
}

.inputarea {
    display: flex;
    flex-direction: column;
    margin-bottom: 2em;
    padding-left: 10px;
    padding-top: 10px;
}

.inputarea textarea {
    margin-bottom: 1em;
}

.inputarea button {
    font-family: 'PressStart';
    font-size: 10px;
    padding: 10px;
    margin-right: 6px;
    box-shadow: 5px 5px 1px black;
    border: 1px solid #c0d9e3;
    border-radius: 5px;

    background: linear-gradient(top, transparent 49%, rgba(1,1,1,0.4) 51%);
    background: -moz-linear-gradient(top, transparent 49%, rgba(1,1,1,0.4) 51%);
    background: -webkit-linear-gradient(top, transparent 49%, rgba(1,1,1,0.4) 51%);
    background-color: #608ba7;
}

.inputarea button:not(:disabled) {
    cursor: pointer;
}

.inputarea button:not(:disabled):hover {
    background-color: #2c485a;
}

.options {
    display: flex;
}

.options > button {
    font-family: 'PressStart';
    font-size: 10px;
    border: none;
    background-image: url("assets/btn_bg.png");
    height: 37px;
    /* padding: 14px 0 0 0; */
    padding: 2px 0;
    margin-top: auto;
    display: flex;
    flex-direction: row;
    margin-right: 5px;
}

.options > button:not(:disabled):hover {
    cursor: pointer;
}

.options > button > div:nth-child(1),
.options > button > div:nth-child(3) {
    width: 5px;
    height: 37px;
    background-image: url("assets/btn_border.png");
    background-position: left;
    position: relative;
    top: -2px;
}

.options > button > div:nth-child(3) {
    transform: scale(-1, 1);
}

.options div.checkbox {
    width: 35px;
    height: 15px;
    background-image: url("assets/slider_off.png");
}

.options div.checkbox.active {
    background-image: url("assets/slider_on.png");
}
.options div.checkbox:after {
    content: "";
    display: block;
    position: relative;
    background-image: url("assets/slider.png");
    width: 11px;
    height: 11px;
    top: 2px;
    left: 2px;
    background-size: contain;
}

.options div.checkbox.active:after {
    left: 22px;
}

#solve {
    background-color: #486c13;
}

#solve:not(:disabled):hover {
    background-color: #3f6306;
}

.paginator {
    display: flex;
    flex-direction: row;
}

.paginator > div:nth-child(1),
.paginator > div:nth-child(3) {
    background: 10;
    height: 18px;
    width: 19px;
    background-image: url("assets/arrows.png");
    background-repeat: no-repeat;
    background-position: 0px center;
}
.paginator > div:nth-child(1){
    transform: rotate(180deg);
}
.paginator > div:nth-child(1).hasMore,
.paginator > div:nth-child(3).hasMore {
    background-position: -19px center;
    cursor: pointer;
}

.paginator > div:nth-child(2) {
    flex-grow: 1;
    text-align: center;
    font-family: 'PressStart';
    font-size: .7em;
    vertical-align: middle;
    top: 3px;
    position: relative;
}

.menucontainer {
    display: flex;
    flex-direction: row;
    justify-content: space-between;

    background-image: -webkit-linear-gradient(left, #ad784a, transparent), url("assets/tabbg.png");
    border-top: 2px solid #42260a;
    border-bottom: 2px solid #42260a;
}

ul.menu {
    display: flex;
    flex-direction: row;
    margin: 0;
    font-family: 'PressStart';
    font-size: .6em;
}

ul.menu > li {
    /* display: inline-block; */
    list-style-type: none;
    margin-right: 10px;
    margin-top: auto;

    text-shadow: 1px 1px 0px black,
                 1px -1px 0px black,
                 -1px -1px 0px black,
                 -1px 1px 0px black;

    border: 1px solid black;
    border-radius: 10px 10px 0 0;
    border-bottom: none;
    
    background-color: rgba(66, 38, 10, 0.5);
    
    color: #f4fcff;
    display: flex;
}

ul.menu > li > div {
    border: 1px solid #ffb789;
    border-radius: 9px 9px 0 0;
    border-bottom: none;
    display: flex;
}

ul.menu > li > div > div {
    border: 1px solid #db9f7a;
    border: 1px solid -webkit-linear-gradient(top, 49% #db9f7a, 50% #bd8764);
    border-radius: 8px 8px 0 0;
    border-bottom: none;
    display: flex;
}

ul.menu > li > div > div > div {
    border: 1px solid #402716;
    border-radius: 7px 7px 0 0;
    border-bottom: none;
    padding: 30px 15px 3px;
}

ul.menu > li:hover {
    cursor: pointer;
    background-color: #7d563d;
}

ul.menu > li.active {
    background-color: #7d563d;
}

ul.menu > li#loaderbtn {
    background-image: url("assets/cpu.png");
    background-repeat: no-repeat;
    background-position: top;
    background-size: 40%;
}

ul.menu > li#cogbtn {
    background-image: url("assets/cogboard_tab_bg.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 70%;
}

.spacer {
    flex-grow: 2;
}

.content {
    border: 4px solid #b47848;
    color: #f4fcff;
    display: flex;
    flex-direction: column;
    background: url("assets/wooden.png");
}

.content > div {
    display: flex;
}

#result {
    display: none;
    flex-direction: row;
}

#steps {
    overflow: auto;
    min-height: 100px;
    padding-left: .5em;
    max-height: 426px;
}

#steps > p > span {
    background-position: center;
    background-size: contain;
    height: 30px;
    width: 30px;
    display: inline-block;
    position: relative;
    top: 10px;
}

table.cogboard tr > td,
table.cogboard tr > td > div {
    /* background-size: contain; */
    background-repeat: no-repeat;
}

table.cogboard tr > td {
    position: relative;
    display: inline-block;
    height: 36px;
    width: 36px;
    max-width: 36px;

    margin: 0 7px 6px 0;
    border: 1px solid black;
    border-bottom-width: 2px;

    background-image: url("assets/cog_blank.png");
}

.info table.cogboard tr > td {
    background-image: url("assets/cog_bg.png");
}

.toMove:after {
    position: absolute;
    content: '';
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(27, 255, 0, 1);
    opacity: 0.2;
}

.info {
    background: url("assets/wooden_light.png") top right;
    padding: 1em 1em 0 1em;
    z-index: 2;
}

#settings {
    background-image: url("assets/settingsbg.png");
    padding: 0 1em;
    border-right: 2px solid black;
    position: absolute;
    z-index: 1;
}

#currentBoard {
    padding: 1em 0 0 1em;
    border-right: 4px solid #b47848;
}

.border {
    background: url("assets/wooden_border.png") top left repeat-y;
    width: 30px;
    z-index: 2;
}

.stats {
    font-family: 'PressStart';
    font-size: .6em;
    letter-spacing: -1.5px;background: rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(0,0,0,0.25);
    padding: 2px;
    margin: 1em 0;
}

h3, h4 {
    padding: 0;
    margin: 0;
}

h4 {
    font-family: 'PressStart';
}

hr {
    border-top: 2px solid #f4fcff;
    border-bottom: 2px solid #c0d9e3;
}

.stats > span * {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stats > span > p {
    font-size: 1.2em;
}

.stats > .buildrate * {
    color: #f4fcff;
    background-image: -webkit-linear-gradient(top, #f4fcff 0%, #f4fcff 51%, #c0d9e3 51%);
}

.stats > .xpbonus * {
    color: #f6cfa7;
    background-image: -webkit-linear-gradient(top, #f6cfa7 0%, #f6cfa7 51%, #d6a17b 51%);
}

.stats > .flaggyrate * {
    color: #ffa18d;
    background-image: -webkit-linear-gradient(top, #ffa18d 0%, #ffa18d 51%, #ff7567 51%);
}

@media (prefers-color-scheme: dark) {
    body {
        color: #eee;
        background: #121212;
    }
}

.crow {
    display: inline-block;
    width: 40px;
    height: 58px;
    background: url("assets/crow.png") top left;
    animation: crow 1s steps(8) infinite;
    transform: scale(-1, 1);
    position: relative;
    top: 6px;
}

@keyframes crow {
    100% { background-position: -320px 0; }
}

.dice {
    display: inline-block;
    width: 70px;
    height: 70px;
    background: url("assets/diceroll.png") top left;
    animation: dice 1s steps(15) infinite;
    transform: scale(-1, 1);
    position: relative;
    top: 6px;
}

@keyframes dice {
    100% { background-position: -1050px 0; }
}

.heart {
    display: inline-block;
    width: 38px;
    height: 66px;
    background: url("assets/heart.png") top left;
    animation: heart 1s steps(10) infinite;
    transform: scale(-1, 1);
    position: relative;
    top: -10px;
}

@keyframes heart {
    100% { background-position: -390px 0; }
}

#notify {
    position: absolute;
    display: block;
    text-align: center;
    width: 100%;
    left: 0;
    top: 25vh;
    text-align: center;
    font-family: 'PressStart';
    font-size: 4em;
    z-index: 1;
    animation: blink 1s ease-in-out alternate infinite;
}

#notify > span {
    color: #f4fcff;
    background-image: -webkit-linear-gradient(top, #f4fcff 0%, #f4fcff 51%, #c0d9e3 51%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@keyframes blink {
    from { opacity: 0%; }
    to { opacity: 100%; }
}

.switch {
    position: absolute;
    display: block;
    content: "";
    z-index: 1000;
    transition: all 1s ease-in-out;
    background-repeat: no-repeat;
    background-repeat: center;
    left: -1000px;
    top: -1000px;
    opacity: 0;
}

/* Notification Banner */
.notification-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #5c3d2e 0%, #8b5a3c 50%, #5c3d2e 100%);
    border-bottom: 3px solid #42260a;
    padding: 10px 40px 10px 20px;
    position: relative;
    font-family: 'PressStart';
    font-size: 0.6em;
    color: #f4fcff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.notification-banner.hidden {
    display: none;
}

.notification-text {
    text-align: center;
}

.notification-text a {
    color: #ffd700;
    text-decoration: none;
}

.notification-text a:hover {
    text-decoration: underline;
}

.notification-close {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #f4fcff;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0 8px;
    line-height: 1;
    opacity: 0.8;
}

.notification-close:hover {
    opacity: 1;
    color: #ffd700;
}
