
@font-face {
    font-family: oswald;
    src: url('../fonts/Oswald-Regular.ttf');
}
@font-face {
    font-family: exo2;
    src: url('../fonts/Exo2-Regular.ttf');
}
@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}
@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}
.blink {
    animation: blink 1.8s infinite;
}
.fade-in {
    animation: fadeIn 1s ease-in;
    opacity: 1;
}
body {
    margin: 0px;
    font-family: exo2;
}
select {
    font-family: exo2;
}
input {
    font-family: exo2;
}
textarea {
    font-family: exo2;
}
button {
    font-family: exo2;
}
h1 {
    font-family: exo2;
}


/* LOADER */
#loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}


.element {
    width: 100%;
    border-radius: 14px;
    box-shadow: 0 10px 15px -10px rgba(128, 128, 128, 0.642);
    overflow: hidden;
}
.drag-mirror {
    position: absolute;
    pointer-events: none;
    opacity: 0.75;
    z-index: 1000;
    width: 120px;
    border: 4px solid gray;
}
#elements {
    background-image: 
        linear-gradient(to right, rgba(0, 0, 0, 0) 80%, rgba(255, 255, 255, 0.8) 100%),
        url(../img/background/under.png);
    background-size: cover;
    overflow: auto;
}
#sandbox {
    background-color: #d7d7d7;
}
#sandbox::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url(../img/background/nature.png);
    background-position: center;
    background-size: cover;
    opacity: 0.17;
    z-index: 0;
}
#debug-label{
    position: absolute;
    bottom: 6px;
    left: 7px;
    font-size: 8px;
    color: rgb(150, 150, 150);
}

#pop-up-message {
    display: none;
    position: fixed;
    left: 55%;
    bottom: 83%;
    width: 60%;
    transform: translate(-50%, 50%);
    background: #5900ff;
    color: #fff;
    padding: 12px 40px 14px 40px;
    border-radius: 12px;
    font-size: 20px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.25);
    z-index: 10001;
    text-align: center;
    font-family: exo2;
    animation: fadeIn 1s;
    box-shadow: 0 4px 24px rgba(0,0,0,0.25), 0 0 6px 2px #5900ff;
    font-size: 18px;
}

#button-admin {
    position: absolute;
    top: 70px; 
    font-size: 9px;
    color: gray;
    z-index: 99999;
    right: 15px;
}
#button-hint {
    display: table-cell;
    bottom: 15%;
    left: 20px;   
    height: 70%;
    cursor: pointer;
    margin-left: 5px;
}
.button {
    background-color: #5900ff;
    color: white;
    font-family: 'exo2';
    font-size: 30px;
    padding: 8px 26px;
    cursor: pointer;
    border-radius: 99px;
    border: none;
}
.button-smaller {
    background-color: #5900ff;
    color: white;
    font-family: 'exo2';
    font-size: 24px;
    padding: 6px 20px;
    padding-bottom: 9px;
    cursor: pointer;
    border-radius: 99px;
    border: none;
}
.button-link {
    background-color: transparent;
    font-family: 'exo2';
    font-size: 24px;
    color: rgb(169, 186, 209);
    border: none;
}
.bottom-bar {
    position: fixed;
    bottom: 4%;
    text-align: center;
}
.element:active {
    cursor: grabbing;
}

.element-wrapper, .element-wrapper-sandbox {
    cursor: grab;
}

.element-wrapper {
    width: 19%;
    float: left;
    margin: 9px;
}
.element-wrapper-sandbox {
    position: absolute;
    width: 16%;
}
/* tabs */
#tabs, #subtabs {
    background-color: rgba(16, 7, 17, 0.512);
    overflow-x: auto;
    white-space: nowrap;    

}
#subtabs {
    display: none;
}
.tab {
    cursor: pointer;
    display: inline-block;
}
.tab > img {
     height: 80%;
     margin-top: 5px;
     margin-left: 5px;
}
.subtab-image {
    height: 80%;
    margin-top: 5px;
    margin-left: 5px;
    cursor: pointer;
}
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(128, 128, 128, 0.7); /* Gray with opacity */
    z-index: 9998; /* One below the image to ensure it covers everything else */
}
#please-rate-div {
    display: none;
    background-image: url('../img/rate.png');
    background-position: center;
    position: absolute;
    width: 500px;
    height: 500px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999999;
}
#button-rate-yes {
    position: absolute;
    bottom: 20px;
    left: 40px;
}
#button-rate-no {
    position: absolute;
    bottom: 26px;
    right: 30px;
}
#sort-button {
    position: fixed;
    width: 9%;
    margin-top: 2.5%;
    right: 1.8%;
    cursor: pointer; 
}

@media (orientation: portrait) {
    #bottom-menu {
        top: 0px;
        height: 13.5%;
        padding-top: 18px;

    }
    #sandbox, #elements {
        position: relative;
    }
    #sandbox {
        height: 50%;
    }
    .drag-mirror {
        width: 20%;
    }
    #elements {
        height: 43%;
        overflow: auto;
        z-index: 10;
        width: 90%;
        padding-right: 10%;
    }
    #button-clean{
        position: absolute;
        width: 32px;
        bottom: 15px;
        right: 14px;
        cursor: pointer; 
    }   

    #tabs {
        height: 7%;
    }
    #subtabs {
        height: 6%;
    }
    .tab > img {
        height: 78%;
        margin-top: 5px;
        margin-left: 5px;
        margin-top: 8.5%;
    }
    h1 {
        font-size: 21px;
    }
    #please-rate-div {
        width: 360px;
        height: 360px;
        background-size: cover;
    }
}
    
@media (orientation: landscape) {
    #sandbox, #elements {
        float: left;
    }
    #sandbox {
        width: 70%;
        height: 100%;
    }
    #sandbox::before {
        width: 70%;

    }
    #elements {
        width: 30%;
        box-shadow: -10px 0 10px -5px rgba(0, 0, 0, 0.5); /* Left shadow */
        height: 82%;
    }
    .element-wrapper {
        width: 22%;
        max-width: 80px;
    }
    .element-wrapper-sandbox {
        width: 8%;
        max-width: 80px;
    }
    .element {
        border-radius: 20px;
    }
    #bottom-menu {
        bottom: 0px;
        height: 10%;
    }
    #tabs{
        height: 8%;
        box-shadow: -10px 0 10px -5px rgba(0, 0, 0, 0.5); /* Left shadow */

    }
    #subtabs {
        height: 7%;
        box-shadow: -10px 0 10px -5px rgba(0, 0, 0, 0.5); /* Left shadow */
    }
    .tab > img {
        height: 74%;
        margin-top: 5px;
        margin-left: 5px;
        margin-top: 7.5px;
    }
    #button-clean {
        position: absolute;
        bottom: 100px;
        left: 60px;
        cursor: pointer; 
        width: 42px;
    }
    #debug-label{
        bottom: 20px;
    }
    #button-admin{
        top: 40px;
    }
    #sort-button {
        width: 30px;
        top: 70px;
        right: 10px;
    }
    #pop-up-message {
        display: none;
        position: fixed;
        left: 37%;
        bottom: 83%;
        width: 500px;
        transform: translate(-50%, 50%);
        background: #5900ff;
        color: #fff;
        padding: 12px 40px 14px 40px;
        border-radius: 12px;
        font-size: 20px;
        box-shadow: 0 4px 24px rgba(0,0,0,0.25);
        z-index: 10001;
        text-align: center;
        font-family: exo2;
        animation: fadeIn 1s;
        box-shadow: 0 4px 24px rgba(0,0,0,0.25), 0 0 6px 2px #5900ff;
        font-size: 18px;
    }

}
.not-unlocked {
    filter: grayscale(100%);
    opacity: 0.5;
}
