:root {
    --bg-main: #b59a8c;
    --bg-panel: #5b3e3c;
    --bg-card: #766355;
    --bg-sell: #846952;

    --button-color: #514032;
    --hovered-button-color: #282019;
    --shadow: 0px 0px 27px -5px rgba(89, 48, 14, 1);

    --bg-main-reb: #b58cb0;
    --bg-panel-reb: #7d5a80;
    --bg-card-reb: #765573;
    --bg-sell-reb: #845260;

    --button-color-reb: #513251;
    --hovered-button-color-reb: #281928;
    --shadow-reb: 0px 0px 27px -5px rgb(89, 14, 74);

    
}
[data-theme="sunburned"] {
    --bg-main: rgb(50, 30, 0);
    --bg-panel: #473130;
    --bg-card: #764014;
    --bg-sell: #4b2a00;

    --button-color: #282019;
    --hovered-button-color: #514032;
    --shadow: 0px 0px 27px -5px rgba(151, 80, 22, 1);

    --bg-main-reb: rgb(50, 0, 48);
    --bg-panel-reb: #47303e;
    --bg-card-reb: #761467;
    --bg-sell-reb: #4b003d;

    --button-color-reb: #281922;
    --hovered-button-color-reb: #51324d;
    --shadow-reb: 0px 0px 27px -5px rgb(151, 22, 106);
}

#palm-btn,
article input,
article img,
.shop-cath div {
    -webkit-tap-highlight-color: transparent;
}


html, body {
    max-width: 100%;
    overflow-x: hidden;
}

.shop-panel,
.shop-panel header {
    overflow-x: hidden;
}


body {
    margin: 0;
    display: flex;
    flex-direction: row;
    font-family: 'Roboto';
}

body.shop-left {
    flex-direction: row-reverse;
}

.battleWrap #palm-btn {
    background: none;
    border: none;
    background-image: url(./imgs/palm.png);
    background-position: center;
    background-size:contain;
    background-repeat: no-repeat;
    width: 300px;
    height: 400px;
    position: relative;
    overflow: visible;
    transition: transform 0.2s ease;

}

.battleWrap #palm-btn:hover {
    cursor: pointer;
}

.battleWrap #palm-btn:active {
    transform: scale(0.8);
}


.battleWrap {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 40%;
    justify-content: center;
    align-items: center;
    background-image: url(./imgs/bg.jpg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}


.battleWrap .healthwrap {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 10vh;
}

.battleWrap .healthwrap .wrapper {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    transform: translateX(-40px);
}

.battleWrap .healthwrap .wrapper img {
    width: 25px;
    height: 25px;
    margin-right: 10px;
    transition: all 0.5s linear;
}

.shop-panel.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}


.shop-container header {
    display: flex;
    top: 0;
    width: 100%;
    height: 8vh;
    flex-direction: row;
    align-items: center;
    justify-content:space-between;
    background: var(--bg-panel);
    backdrop-filter: blur(4px);
    overflow-y: hidden;
}
#rebLogs-wrap h2 {
    margin-right: 10px;
}

.shop-container header .value-wrap {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.shop-container header #energy-wrap {
    margin-right: 10px;
}

.shop-container header #log-wrap {
    margin-left: 10px;
}

.shop-container header .value-wrap #log-img {
    width: 70px;
    height: 35px;
}

.shop-container header .value-wrap #energy-img {
    transition: all .3s ease;
    width: 25px;
    height: 40px;
}

.shop-container header h2 {
    font-weight: 800;
    color: white;
    margin-left: 20px;
    white-space: nowrap;
    font-weight: 500;
}

.shop-container header .money {
    color: rgb(0, 255, 0);
    margin-left: 0;
    margin: 0 10px 0 10px;
    font-weight: 800;
    position: relative;
}

.shop-panel .settings-wrap {
    width: 100%;
    height: 8vh;
    display: flex;
    justify-content: end;
    align-items: center;
    background-color: var(--bg-main);
}
.shop-panel .settings-wrap img {
    width: 35px;
    height: 35px;
    margin-right: 15px;
    transition: all .5s ease;
}

.shop-panel .settings-wrap img:hover {
    transform: translateY(-6px);
    cursor: pointer;
    -webkit-filter: drop-shadow(0px 0px 15px #d6d6d6);
    filter: drop-shadow(0px 0px 15px #d6d6d6);
}

.shop-cath {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    height: 40px;
    background-color: var(--bg-card);
    color: #fff;
}

.shop-cath div {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50%;
    height: 100%;
}

.shop-cath .selected {
    background-color: var(--bg-panel);
}


.shop-panel .buy-area {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 40px;
    width: 100%;
    padding-bottom: 20px;
    background: var(--bg-main);
    overflow-y: scroll;
    height: 50vh;

}

.shop-panel section article {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    margin-left: 20px;
    margin-right: 20px;
    padding: 45px 35px;
    justify-content: center;
    align-items: center;
    background: var(--bg-card);
    width: 120px;
    height: 180px;
    border-radius: 25px;
    text-align: center;
    transition: all .5s ease;
}

.shop-panel section article:hover {
    transform: translateY(-10px);
    -webkit-box-shadow: var(--shadow);
    -moz-box-shadow: var(--shadow);
    box-shadow: var(--shadow);
}



.shop-panel section .shamaneno {
    background: #5a4534;
}

.shop-panel section .shamaneno h3 {
    color: gold;
}

.shop-panel section article h3, p, input {
    margin: 0;
    margin-top: 10px;
}

article .content h3 {
    color: orange;
}

article .content p {
    color: rgb(0, 255, 0);
}

.shop-panel section article img {
    width: 50px;
    height: 50px;
}


.shop-panel {
    position: absolute;
    top: 8vh;
    left: 0;
    width: 100%;
    height: calc(100vh - 8vh);

    opacity: 0;
    transform: scale(1.1);
    pointer-events: none;

    transition: opacity 0.4s ease, transform 0.4s ease;
}

.shop-panel.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    z-index: 10;
}

.shop-panel .sell-area {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 40vh;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-sell);
}

.shop-panel .sell-area h2 {
    color: white;
    margin: 0;
    margin: 10px 15px;
    text-align: center;
}

article .content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

article input {
    width: 80px;
    height: 30px;
    background-color: rgb(85, 189, 24);
    border: none;
    border-radius: 25px;
    color: white;
    font-weight: 600;
    transition: background-color 0.5s linear;
}

article input:hover {
    background-color: rgb(81, 173, 28);
    cursor: pointer;
}

.sell-area input {
    width: 300px;
    height: 50px;
    background-color: var(--button-color);
    border:  none;
    border-radius: 15px;
    color: white;
    transition: background-color 0.5s ease;
    font-size: 20pt;

}

.sell-area input:hover {
    background-color: var(--hovered-button-color);
    cursor: pointer;
}

#rebShop .settings-wrap,
#rebShop .buy-area {
    background-color: var(--bg-main-reb);
}

#rebShop header {
    justify-content: center;
    background-color: var(--bg-panel-reb);
}

#rebShop .sell-area {
    background-color: var(--bg-sell-reb);
}

#rebShop .sell-area input {
    background-color: var(--button-color-reb);
}

#rebShop .sell-area input:hover {
    background-color: var(--hovered-button-color-reb);
}

#rebShop article {
    background-color: var(--bg-card-reb);
}

#rebShop article:hover {
    -webkit-box-shadow: var(--shadow-reb);
    -moz-box-shadow: var(--shadow-reb);
    box-shadow: var(--shadow-reb);
}

#rebShop .shop-cath {
    background-color: var(--bg-card-reb);
}

.shop-cath div:hover {
    cursor: pointer;
} 

#rebShop .shop-cath .selected {
    background-color: var(--bg-panel-reb);
}
#rebShop section article h3 {
    color: rgb(255, 39, 241);
}

#rebShop section article p {
    color: #ff14dc;
}

#rebShop section article input {
    background-color: var(--button-color-reb);
}

#rebShop section article input:hover {
    background-color: var(--hovered-button-color-reb);
}

#rebShop section article p img {
    width: 30px;
    height: 15px;
}

.shop-container {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    width: 60%;
    height: 100vh;
    margin: 0;
}

.tasks-wrap {
    width: 100%;
    margin-left: 20px;
    color: white;
}

.tasks li {
    color: white;
    transition: color 0.3s ease;
}

.tasks li.completed {
    color: rgb(0, 231, 0);
}

.modal {
    position: fixed;
    inset: 0;
    background-color: var(--bg-sell);
    z-index: 999;
}

.modal .modal-content {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100vh;
}


.modal .app {
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url(./imgs/bg.jpg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    width: 60%;
    perspective: 600px;
}

.modal .app img {
    animation: floating 10s ease infinite;
    transform-style: preserve-3d;
}

.modal .conf {
    width: 40%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    color: #fff;
    gap: 40px;
}

.modal select {
    appearance: none;
    background-color: #524133;
    border: none;
    color: white;
    padding: 10px;
    border-radius: 1rem;
    width: 15em;
    

    &, &::picker(select) {
        appearance: base-select;
        border: none;
        border-radius: 1rem;
        background-color: #524133;
        color: white;
    }

    &::picker(select) {
        margin-block-start: 0.3rem;
    }

    &::picker-icon {
        display: none;

    }
}

.modal .conf input {
    width: 10rem;
    height: 30px;
    border: none;
    border-radius: 4rem;
    background-color: #2ffb18;
    color: rgb(0, 0, 0);
    transition: background-color 0.5s ease;
}

.modal .conf input:hover {
    background-color: #23bb12;
    cursor: pointer;
}

.modal .conf .close {
    color: white;
    background-color: var(--button-color);
}

.modal .conf .close:hover {
    background-color: var(--hovered-button-color);
    cursor: pointer;
}

@keyframes floating {
    0% {
        transform: translate(0, 0) rotateX(0);
    }
    30% {
        transform: translate(20px, 20px) rotateY(90deg);
    }
    60% {
        transform: translate(-20px, -20px) rotateY(-90deg);
    }
    100% {
        transform: translate(0, 0) rotateX(0);
    }
}

.modal.hidden {
    display: none;
}


#workshop .add {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--button-color);
    width: 50px;
    height: 50px;
    color: white;
    border-radius: 4rem;
    transition: all 0.5s ease;
    margin: 0 20px 0 20px;
}

#workshop .sell-area,
#workshop .buy-area {
    gap: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#workshop .sell-area #palmsContainer,
#workshop .buy-area #workersContainer {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    overflow-y: scroll;
    width: 100%;
    height: 100%;
}

#workshop .sell-area #palmsContainer article,
#workshop .buy-area #workersContainer article {
    padding: 0;
    width: 140px;
    height: 200px;
}

#workshop .buy-area #workersContainer article p {
    color: #ff0037;
}

#workshop .sell-area #palmsContainer article input,
#workshop .buy-area #workersContainer article input {
    padding: 0;
    background-color: var(--button-color);
    width: 80px;
    height: 30px;
    font-size: 10pt;
}

#workshop .sell-area #palmsContainer article input:hover,
#workshop .buy-area #workersContainer article input:hover {
    background-color: var(--hovered-button-color);
}

#workshop .add:hover {
    cursor: pointer;
    transform: translateY(-10px);
    background-color: var(--hovered-button-color);
}

.addContainer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #19ff00;
}

#workshop p.worker-status.working {
    color: #19ff00;
}

#workshop p.worker-status.unemployed {
    color: red;
}



html[lang="ar"] .tier-line {
    direction: rtl;
}


@media (max-width: 899px) {
    body {
        display: block;
        flex-direction: column;
        height: 100dvh;
        overflow: auto;
    }
    .shop-container {
        width: 100%;
        height: 60vh;
    }

    .sell-area input {
        width: 60%;
        height: 60px;
        font-size: 24px;
    }

    .buy-area,
    .sell-area {
        height: auto;
        min-height: unset;
    }

    .battleWrap {
        height: auto;
        min-height: unset;
    }

    .battleWrap #palm-btn:active {
        transform: scale(0.7);
    }

    .shop-panel header {
        align-items: center;
    }

    .battleWrap {
        width: 100%;
        height: auto;
        justify-content: flex-end;
        padding-bottom: 20px;
    }

    .battleWrap #palm-btn {
        width: 200px;
        height: 280px;
    }

    .battleWrap .healthwrap .wrapper {
        transform: translateX(-30px);
    }


    .shop-panel {
        width: 100%;
        min-height: 45vh;
    }

    html, body, section, article {
        overflow-x: hidden;
    }

    .battleWrap .healthwrap .wrapper {
        font-size: 30px;
    }
    .shop-panel header {
        justify-content: space-between;
    }

    .shop-panel header h2 {
        white-space: normal;
        margin-left: 6px;
    }
    h2 {
        font-size: 13pt;
    }

    header h2 {
        margin-left: 5px;
    }

    .shop-panel .buy-area {
        justify-content: center;
    }

    .shop-panel section article {
        width: 80px;
        height: 120px;
        margin-left: 10px;
        margin-right: 10px;
    }

    .shop-panel header .value-wrap #log-img {
        width: 50px;
        height: 25px;
    }

    article .content h3 {
        font-size: 13pt;
    }

    .shop-panel header .value-wrap #energy-img {
        transition: all .3s ease;
        width: 16px;
        height: 25px;
    }
}

@media (max-width: 379px) {
    .shop-panel section article {
        width: 60px;
        height: 105px;
        margin-left: 5px;
        margin-right: 5px;
    }
}

@media (max-width: 329px) {
    .shop-panel section article {
        width: 50px;
        height: 105px;
        margin-left: 2px;
        margin-right: 2px;
    }
}