*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

.intro{
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: #ffff;
    transition: 1s;
}

.logoHeader{
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #161616;
}
.logo{
    position: relative;
    display: inline-block;
    font-size: 60px;
    bottom: -20px;
    opacity: 0;
}

.logo.active{
    bottom: 0;
    opacity: 1;
    transition: ease-in-out 0.5s;
}

.logo.fade{
    bottom: 150px;
    opacity: 0;
    transition: ease-in-out 0.5s;
}


.startMenuScreen{
    width: 100vw;
    height: 100vh;
    font-size: 70px;
    color: white;
    display: grid;
    grid-template-rows: 1fr 1fr 1fr 1fr;
    gap: 20px;
    padding: 25px;
    background-color: black;

}
.icons{
    width: 100%;
    gap: 10px;
    display: flex;
    align-items: start;
    justify-content: right;

    #settings{
        padding-top: 10px;
       cursor: pointer;
    }
}
#volumeToggle{
    cursor: pointer;
}
#volumeOff{
    display: none;
    cursor: pointer;
}

.titel{
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spilknapper{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;

}
.spilknapper button{
    align-items: center;
    justify-content: center;
    width: 448px;
    height:64px;
    font-size: 40px;
    font-weight: 550;
    border-radius: 25px;
    border-style: none;
    cursor: pointer;
}

.newGame:hover, .loadGame:hover, .setting-start-menu-knap:hover, .item-in-action-box:hover, .action-buttons-bars button:hover, .chat-toggle:hover{

    background-color: #989898;
}
.notificationSystem {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;


    .notification {
        position: relative;
        animation: slideIn 0.5s ease forwards;
        width: 300px;
        min-height: 75px;
        height: auto;
        background-color: white;
        border-radius: 2px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);


        .closeNotification {
            position: absolute;
            right: 0;
            top: 0;
            width: 25px;
            height: 25px;
            font-size: 25px;
            font-weight: bold;
            border: none;
            background-color: white;
            cursor: pointer;
        }

        .notificationHeader {
            color: black;
            font-size: 20px;
            padding: 10px;
        }

        .notificationMessage {
            display: flex;
            color: black;
            font-size: 16px;
            padding: 0 10px 15px 10px;
        }

    }
}
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.gameScreen{
    width: 100vw;
    height: 100vh;
    display: grid;
    grid-template-rows: 1fr 1fr 1fr;
    padding: 25px;
    background-color: black;
}

.top{
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;

    .lif-penge{
        display: flex;
        flex-direction: column;
        height: 100%;
        gap: 10px;
    }

}
.stat{
    width: 200px;
    height: 40px;
    background-color: white;
}


.health{
    color: white;
    font-size: 18px;
}

#lifeProgress {
    width: 200px;
    background-color: #cacaca;
    position: relative;
}

#lifeBar {
    width: 100%;
    height: 30px;
    background-color: green;
    position: relative;
    line-height: 30px;

}

#lifePercent {
    color: white;
    font-weight: bold;
}
.gameInformation{
    display: flex;
    justify-content: end;
}

.map-box{
    display: flex;
    justify-content: end;
    flex-direction: column;
    gap: 10px;
}
.mini-map {
    width: 300px;
    height: 200px;
    border: 2px solid white;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    font-size: 0;
    cursor: pointer;
}

#mini-map {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    display: block;
}


.settings{
    width: 50px;
    height: 50px;
    font-size: 10px;
    border-radius: 25px;
    border-style: none;
    cursor: pointer;
}
.setting-box{
    display: flex;
    justify-content: end;
}


.mid{
    display: flex;
    align-items: center;
    justify-content: center;
}
.action-box{
    position: absolute;
    width: 700px;
    height: 300px;
    background-color: white;
}

.action-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

.action-buttons{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;

}
.action-buttons-bars{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 10px;
}


.action-buttons-bars button {
    width: 20px;
    height: 20px;
    background-color: #4CAF50;
    color: white;
    border-radius: 50%;
    border-style: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;


}

.action-buttons-bars button:hover{
    background-color: #45a049;
}
.item-in-action-box{
    background-color: grey;
    padding: 5px;
    color: white;
    text-align: center;
    width: 100%;
    cursor: pointer;

}


#text{
    width: 100%;
}

.tekst-box{
    padding: 30px;
    width: 100%;
    display: flex;
}

#text-guide{
    padding-left: 50px;
}
.bottom{
    display: flex;
    padding-top: 50px;
}


.chat-box {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: 100%;
    height: 100%;
}

.chat-toggle {
    display: block;
    width: 300px;
    height: 50px;
    background-color: white;
    border: none;
    cursor: pointer;
    text-align: center;
    font-weight: bold;
    font-size: 20px;
    padding: 10px;
    border-radius: 5px;
}
.chat-popup {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    border: 3px solid #f1f1f1;
    z-index: 9;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.chat-form {
    width: 300px;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px 15px 15px 15px;
}
.chat-close {
    position: absolute;
    right: 2px;
    top: 2px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
}

.chat-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-messages {
    height: 250px;
    overflow-y: auto;
    margin-bottom: 5px;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.chat-message {
    margin-bottom: 10px;
}

.message-content {
    background: #e3f2fd;
    padding: 8px 12px;
    border-radius: 15px;
    display: inline-block;
    max-width: 80%;
    position: relative;
}

.message-text {
    display: block;
    margin-bottom: 2px;
    word-wrap: break-word;
}

.message-timestamp {
    font-size: 0.75em;
    color: #666;
    display: block;
    text-align: right;
    margin-top: 2px;
}

/* Chat Input Elements */
.chat-input {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.chat-input textarea {
    flex: 1;
    padding: 7px;
    border: 1px solid #ddd;
    background: #f1f1f1;
    resize: none;
    min-height: 60px;
    border-radius: 4px;
}
.chat-input {
    display: flex;
    flex-direction: row;
}

.chat-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-send, .chat-clear {
    display: block;
    width: 100%;
}

.chat-send {
    background-color: #04AA6D;
    color: white;
    padding: 12px 20px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    transition: opacity 0.3s;
}

.chat-send:hover {
    opacity: 0.8;
}
.chat-clear {
    background-color: #ff4444;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.chat-clear:hover {
    background-color: #cc0000;
}


/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.inventory-slots{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}


.item-container {
    margin-top: 20px;
    gap: 10px;
    display: none;
}

.clickable-item {
    width: 50px;
    height: 50px;
    cursor: pointer;
}

.collect-items-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

.items{
    display: flex;
    gap: 20px;
}



.life-gold-container{
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;

}

.action-box-items {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 40px;
}

.action-box-container{
    display: flex;
    justify-content: space-evenly;
}

.collect-item {
    display: flex;
    justify-content: center;
    align-items: center;
}

.item-label {
    font-size: 16px;
    width: 80px;
    text-align: center;
}

.inventory {
    width: 500px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.slot {
    display: flex;
    width: 60px;
    height: 60px;
    background: #ccc;
    align-items: center;
    justify-content: center;
    position: relative;

}

.item {
    width: 40px;
    height: 40px;
    cursor: pointer;
}

.itemNameTip {
    position: absolute;
    top: -10px;
    background-color: rgba(0,0,0,0.8);
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
}

.item-counter {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 12px;
    padding: 2px 5px;
    border-radius: 5px;
    pointer-events: none;
}

.item.dragging {
    opacity: 0.5;
}

#cursor-item{
    pointer-events:none;
    width: 40px;
    height: 40px;
    position: fixed;
    opacity: 0.9;
    border-radius: 4px;
    z-index: 9999;
}
.dato{
    width: 100%;
    height: 100%;
}


.cursor-counter {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: black;
    color: white;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
}


.overlayGameScreen, .startMenuScreenOverlay {
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.69);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
}


.setting-modal {
    width: 400px;
    height: 300px;
    background-color: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    position: relative;
}


.x-button{
    display: flex;
    font-size: 30px;
    justify-content: end;
    cursor: pointer;
}
.toggles{
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    padding-bottom: 50px;
    padding-right: 30px;
    padding-left: 30px;
}
.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 15px;
    border-radius: 5px;
    background: #d3d3d3;
    outline: none;
    opacity: 0.7;
    -webkit-transition: .2s;
    transition: opacity .2s;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: black;
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: black;
    cursor: pointer;
}

.setting-start-menu-knap{
    font-size: 18px;
    width: 100%;
    height: 50px;
    background-color: gray;
    color: white;
    border-style: none;
    cursor: pointer;
}
