*
{
  box-sizing: border-box;
  color: #ffffff;
}
#page
{
    position:relative;
    margin: 0;
    padding:0;
    height: 100vh;
}

body
{
  margin: 0;
  padding:0;
  height: 100vh;
  background-color: #000000;
}


#DD_messageBox
{
    position:absolute;
    left:25%;
    top:30%;
    width:50%;
    height:150px;
}
#DD_registerBox
{
    position:absolute;
    top:16.5%;
    left:25%;
    background-color: #952368;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
    width: 50%;
    margin: 0 auto;
    opacity:0.7;
}
#DD_registerBox h1
{
    color: #FFDB58;
    text-align: center;
    font-family: 'MedievalSharp', cursive;
    text-shadow: 1px 1px 2px black, 0 0 25px blue, 0 0 5px yellow;
    font-weight: bold;
    font-size:24px;
}
#DD_overlay
{
     position: fixed;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     background-color: rgba(0, 0, 0, 0.5); /* Adjust the alpha (last value) for transparency */
     z-index: 1;
}

#DD_registerBox input[type="text"],
#DD_registerBox input[type="password"] {
    width: 100%;
    padding: 10px;
    margin: 1px;
    border: 2px;
    border-radius: 5px;
    background-color: #35251a;
    color:#FFDB58;
}

#DD_registerBox button
{
    background-color: #511439;
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    color: #FFDB58;
}
.DD_closeButton
{
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: transparent;
    border: none;
    color: #FFDB58;
    cursor: pointer;
}

#DD_registerButton {
    background-color: #952368;
    color: #FFDB58;
}

#DD_loginButton {
    background-color: #952368;
    color: #FFDB58;
}

#DD_message
{
    font-size: 24px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.5);
    color: #ffcc00;
    animation: scaleUp 3s ease-in-out;
    font-family: "Times New Roman", serif;
    font-weight: bold;
}
#DD_container
{
    margin: 0;
    padding:0;
    display: grid;
    grid-template-rows: 0.1fr 0.85fr 0.05fr;
    min-height: 100vh;
}
#DD_top
{
    padding: 0px;
    text-align: center;
}
#DD_middle
{
    position:relative;
    display: inline-flex;
    flex-wrap: wrap;
    text-align: center;
    justify-content: center;
}
#DD_gamefield
{
    position:relative;
    background-image: url('../img/DD_gamescreen1.png');
    background-size:100% 100%;
    background-position:center center;
    background-repeat: no-repeat;
    height:100vw;
}
#DD_historyfield
{
    height:40vh;
}
.DD_middle_item
{
    width: calc(100% / 1);
    position:relative;
}
.DD_panel
{
    position:relative;
    color: #ffe876;
    border: 1px solid #422600;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.DD_middle_item:nth-child(2n)
{
    width: calc(100% / 1);

}
#DD_bottom
{
    padding: 20px;
    text-align: center;
}
#DD_mainmenu
{
    position:absolute;
    top:10%;
    left:12.5%;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap:5px;
    padding-top:30px;
    justify-content: center;
    align-items: center;
    border-radius: 30px;
    width: 75%;
    height:75%;
    background-image: url('../img/door.png');
    background-size:100% 100%;
    background-position: center center;
    background-repeat: no-repeat;
}

#DD_mainmenu h1
{
    font-family: 'MedievalSharp', cursive;
    color: #FFDB58;
    text-shadow: 1px 1px 2px black, 0 0 25px blue, 0 0 5px yellow;
    font-weight: bold;
    font-size: 24px;
}

#DD_top h1
{
    font-family: 'MedievalSharp', cursive;
    color: #FFDB58;
    text-shadow: 1px 1px 2px black, 0 0 25px blue, 0 0 5px yellow;
    font-weight: bold;
    font-size: 24px;
}

.DD_basictext
{
    text-align: center;
    font-family: 'MedievalSharp', cursive;
    color: #FFDB58;
    text-shadow: 1px 1px 2px black, 0 0 25px blue, 0 0 5px yellow;
    font-weight: bold;
    font-size:18px;
}
.DD_small
{
    margin: 0;
    font-size:16px;
    text-align: center;
    font-family: 'MedievalSharp', cursive;
    color: #FFFF58;
    text-shadow: 1px 1px 2px black, 0 0 25px blue, 0 0 5px yellow;
}
.DD_menu-button {
    display: inline-block;
    padding: 5px 15px;
    font-family: "Times New Roman", serif;
    font-weight: bold;
    font-size: 20px;
    background: #952368; /* Brown background color */
    color: #FFDB58;
    border: 2px solid #8B4513; /* Brown border */
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 3D shadow effect */
    transition: transform 0.2s;
    max-width:75%;
    opacity:0.5;
    user-select: none;
}

.DD_menu-button:hover {
    transform: scale(1.05); /* Button scales up on hover */
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2); /* Shadow increases on hover */
}

.DD_menu-button span
{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #FFDB58;
}


#DD_sun
{
    position:absolute;
    top:10%;
    left:12.5%;
    width: 75%;
    height: 75%;
    background-color: #ffdb58; /* Bright yellow color for the sun */
    z-index:-2;
}
#DD_door
{
    position: absolute;
    background-image: url('../img/door.png');
    background-size:100% 100%;
    top:21.5%;
    left:32.7%;
    width:34.5%;
    height:58%;
    cursor:pointer;
    z-index:-1;
    transition: transform 0.5s ease-in-out;
    transform: rotateY(0deg);
}
#DD_door.open
{
  animation: openDoor 1s forwards;
  transform-origin: left;
}

.DD_doorclick
{
    position:absolute;
    top:21.5%;
    left:32.7%;
    width:34.5%;
    height:58%;
}

#DD_locksbox, #DD_keysbox
{
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content:center;
}

#DD_keysbox
{
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
}

.DD_lock
{
    background-size:100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    width:25vw;
    height:25vw;
    animation: float 3s ease-in-out infinite;
    max-height:128px;
    max-width:128px;

}
.DD_key
{
    background-size:100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    width:16.6vw;
    height:16.6vw;
    max-height:128px;
    max-width:128px;
}

.DD_lock-container
{
    background-size: 100% 100%;
    background-position: center center;
    background-repeat: no-repeat;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width:12.5vw;
    height:12.5vw;
    animation: spin 4s linear infinite;
    transform-origin: center center;
    max-height:64px;
    max-width:64px;
}
#DD_resultBox
{
    position:absolute;
    bottom: 50%;
    left: 0;
    right: 0;
    text-align: center;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
}
#DD_continueButton
{
    position:absolute;
    bottom: 25%;
    left: 50%; /* Add this to center horizontally */
    transform: translateX(-50%); /* Add this to center horizontally */
    background-color: #6e2c00; /* Background color */
    color: #ffcc00; /* Text color */
    border: none; /* Remove border */
    padding: 10px 20px; /* Padding for text */
    font-size: 18px; /* Font size */
    border-radius: 30px; /* Round the corners */
    cursor: pointer; /* Add a pointer cursor */
    transition: background-color 0.3s ease, transform 0.3s ease;
    width:128px;
    height:64px;
    opacity:0.7;
}

#DD_continueButton:hover
{
    background-color: #ffcc00; /* Change background color on hover */
    color: #6e2c00; /* Change text color on hover */
    transform: scale(1.1); /* Add a slight scale effect on hover */
    transform: translateX(-50%);
    opacity:0.4;
}
.DD_green
{
    background-image: url('../img/resultdiamondgreen.png');
    background-size:cover;
    background-position: center;
    background-repeat: no-repeat;
    width:16.6vw;
    height:16.6vw;
    max-height:128px;
    max-width:128px;
}
.DD_red
{
    background-image: url('../img/resultdiamondred.png');
    background-size:cover;
    background-position: center;
    background-repeat: no-repeat;
    width:16.6vw;
    height:16.6vw;
    max-height:128px;
    max-width:128px;
}
#DD_historyList
{
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    max-height: 40vh;
    background-color: #302b1863

}


.DD_historyLine
{
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content:flex-start;

}

.DD_keyElement
{
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    width:16.6vw;
    height:16.6vw;
    max-height:128px;
    max-width:128px;
}

.DD_resultElement
{
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: left;
}

.DD_resultelementkwadrant
{
    border 1px solid #0f0;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    width:8.3vw;
    height:8.3vw;
    max-height:64px;
    max-width:64px;
}

.DD_heartbeat-animation
{
    animation-name: heartbeat;
    animation-duration: 2s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

.DD_scaleup
{
  animation: scaleUp 1s forwards; /* Adjust the duration as needed */
  transform-origin: center;
  opacity: 0; /* If you want to fade in along with scaling */
}

@keyframes openDoor {
  0% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(45deg);
  }
}

@keyframes heartbeat {
  0% {
    transform: scale(1);
    transform-origin: center center;
  }
  50% {
    transform: scale(1.05);
    transform-origin: center center;
  }
  100% {
    transform: scale(1);
    transform-origin: center center;
  }
}
@keyframes scaleUp
{
  0% {
    transform: scale(0);
    opacity:0;
  }
  100% {
    transform: scale(1);
    opacity:1;
  }
}
@keyframes float
{
    0%, 100% {
        transform: translateY(0); /* Start and end position */
    }
    50% {
        transform: translateY(-20px); /* Midpoint position, adjust as needed */
    }
}
@keyframes spin
{
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(360deg);
    }
}
/* Tablets and more...*/
@media (min-width: 900px)
{
    #DD_gamefield
    {
        height:100%;
    }
    #DD_historyfield
    {
        height:100%;
    }
    .DD_middle_item
    {
        width: calc(100vw * 0.56);
        position:relative;
    }
    .DD_middle_item:nth-child(2n)
    {
        width: calc(100vw * 0.42);
    }

    #DD_historyList
    {
        max-height: 100vh;
    }
    .DD_keyElement
    {
        width:8.3vw;
        height:8.3vw;
        max-height:128px;
        max-width:128px;
    }

    .DD_resultelementkwadrant
    {
        border 1px solid #0f0;
        background-size: 100% 100%;
        background-position: center;
        background-repeat: no-repeat;
        width:4.15vw;
        height:4.15vw;
        max-height:64px;
        max-width:64px;
    }

}
/* STATS */
/* Common styles for all screen sizes */
#st_container
{
    display: grid;
    grid-template-rows: 0.1fr 1fr 0.05fr;
    min-height: 100vh;
    background-image: url('../img/keymaster.png');
    background-size:contain;
    background-position:center center;
    background-repeat: no-repeat;
}

#st_top
{
    padding: 20px;
    text-align: center;
}

#st_middle
{
    display: inline-flex;
    flex-wrap: wrap;
    padding: 20px;
    text-align: center;
    justify-content: center;
}
.st_middle_item
{
    width: calc(100% / 3);
}

#st_bottom
{
    padding: 20px;
    text-align: center;
}
/* Apply styles to the return button */
.return-button {
    background-color: #952368; /* Button background color */
    border: none; /* Remove button border */
    color: #fff; /* Button text color */
    padding: 10px 20px; /* Button padding */
    font-size: 18px; /* Button text size */
    border-radius: 5px; /* Rounded button corners */
    cursor: pointer; /* Change cursor on hover */
    transition: background-color 0.3s ease, transform 0.3s ease;
}
footer {

    color: white;
    text-align: right;
    padding: 10px;
}
section {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    border-radius: 5px;
    flex: 1;
    margin: 10px;
}

.return-button:hover {
    background-color: #2980b9; /* Change background color on hover */
    transform: scale(1.05); /* Add a slight scale effect on hover */
}


.fantasy-panel {
    background-color: #952368;
    color: #ffe876; /* Yellow text color */
    border: 1px solid #422600; /* Dark brown border color */
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); /* Add a subtle shadow */
}

.fantasy-header h2
{
    margin: 0;
    font-family: 'MedievalSharp', cursive;
    color: #FFDB58;
    text-shadow: 1px 1px 2px black, 0 0 25px blue, 0 0 5px yellow;
    font-weight: bold;
    font-size: 24px;
    font-weight: bold;
}

.fantasy-stats
{
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap:5px;
    margin: 10px 0;
}

.stat
{
    flex: 1;
    display:grid;
    grid-template-columns: auto auto auto;
    padding: 10px;
    background-color: #422600;
    border: 1px solid #ff9404;
    border-radius: 10px;
    transition: transform 0.2s;
}

.stat:hover {
    transform: scale(1.05); /* Scale up on hover */
    box-shadow: 0px 6px 8px rgba(0, 0, 0, 0.2); /* Shadow increases on hover */
}

.stat-icon
{
    display: flex;
    justify-content: center; /* Horizontal centering */
    align-items: center; /* Vertical centering */
}

.stat-icon img
{
    max-width: 50px;
    max-height: 50px;

}

.stat-info h3
{
    font-size: 18px;
    font-weight: bold;
}
.stat-value p
{
    font-size: 18px;
    font-weight: bold;
}

.highscore-entry
{
    flex: 1;
    display:grid;
    grid-template-columns: auto auto auto auto;
    padding: 10px;
    background-color: #422600;
    border: 1px solid #ff9404;
    border-radius: 10px;
    transition: transform 0.2s;
}
.highscore-entry:hover
{
    transform: scale(1.05); /* Scale up on hover */
    box-shadow: 0px 6px 8px rgba(0, 0, 0, 0.2); /* Shadow increases on hover */
}
.highscore-icon
{
    display: flex;
    justify-content: center; /* Horizontal centering */
    align-items: center; /* Vertical centering */
}
.highscore-icon img
{
    max-width: 50px;
    max-height: 50px;
}
.highscore-name h3
{
    font-size: 18px;
    font-weight: bold;
}
.personal-entry
{
    flex: 1;
    display:grid;
    grid-template-rows: auto auto auto auto;
    padding: 10px;
    background-color: #422600;
    border: 1px solid #ff9404;
    border-radius: 10px;
    transition: transform 0.2s;
}
.personal-entry:hover
{
    transform: scale(1.05); /* Scale up on hover */
    box-shadow: 0px 6px 8px rgba(0, 0, 0, 0.2); /* Shadow increases on hover */
}
@media (max-width: 768px)
{
    .st_middle_item
    {
        width: calc(100% / 1);
    }
}
/* Tablets (769px to 1200px) */
@media (min-width: 769px) and (max-width: 1200px)
{
    .st_middle_item
    {
        width: calc(100% / 2);
    }

}

