/* Mini Mobs 3D - Stil */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    min-height: 100vh;
    overflow: hidden;
    background-color: #000;
}

/* Alle sider */
.side {
    display: none;
    min-height: 100vh;
    width: 100%;
}

/* Start side - vises som standard */
.start-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-image: url('https://images.unsplash.com/photo-1448375240586-882707db888b?w=1920');
    background-size: cover;
    background-position: center;
    position: relative;
}

.start-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

/* Titel */
.titel {
    font-size: 5rem;
    color: white;
    text-shadow: 4px 4px 0px #2d5a27, 6px 6px 0px rgba(0,0,0,0.5);
    z-index: 1;
    margin-bottom: 10px;
    letter-spacing: 4px;
}

.undertitel {
    font-size: 2rem;
    color: #4CAF50;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.5);
    z-index: 1;
    margin-bottom: 40px;
    letter-spacing: 8px;
}

/* Knapper */
.knap {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: bold;
    padding: 15px 50px;
    background-color: #4a4a4a;
    color: white;
    border: 4px solid #2a2a2a;
    border-bottom-width: 6px;
    cursor: pointer;
    z-index: 1;
    transition: all 0.1s;
    text-transform: uppercase;
}

.knap:hover {
    background-color: #5a5a5a;
    transform: translateY(-2px);
}

.knap:active {
    transform: translateY(2px);
    border-bottom-width: 4px;
}

/* Menu side */
.menu-side {
    background-color: #1a1a2e;
    justify-content: center;
    align-items: center;
}

.menu-boks {
    background-color: #2a2a3e;
    padding: 40px 60px;
    border: 4px solid #3a3a4e;
    border-radius: 4px;
}

/* Opret verden side */
.opret-verden-side {
    background-color: #1a1a2e;
    justify-content: center;
    align-items: center;
}

.opret-boks {
    background-color: #2a2a3e;
    padding: 40px 60px;
    border: 4px solid #3a3a4e;
    border-radius: 4px;
    text-align: center;
}

.opret-boks h2 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.tekst-input {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    padding: 12px 20px;
    width: 300px;
    background-color: #1a1a2e;
    color: white;
    border: 3px solid #4a4a5e;
    margin-bottom: 30px;
}

.tekst-input:focus {
    outline: none;
    border-color: #6a6a7e;
}

.opret-boks h3 {
    color: #aaa;
    font-size: 1.2rem;
    margin-bottom: 15px;
    margin-top: 10px;
}

.spiltilstand-typer {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 25px;
}

.tilstand-knap {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    padding: 15px 25px;
    background-color: #4a4a5a;
    color: white;
    border: 4px solid #3a3a4a;
    border-bottom-width: 6px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.1s;
}

.tilstand-knap:hover {
    background-color: #5a5a6a;
    transform: translateY(-2px);
}

.tilstand-knap:active {
    transform: translateY(2px);
    border-bottom-width: 4px;
}

.tilstand-knap.aktiv {
    background-color: #5a3a8a;
    border-color: white;
    box-shadow: 0 0 10px white;
}

.verden-typer {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.verden-knap {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    padding: 20px 25px;
    background-color: #3a5a3a;
    color: white;
    border: 4px solid #2a4a2a;
    border-bottom-width: 6px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: all 0.1s;
}

.verden-knap:hover {
    background-color: #4a6a4a;
    transform: translateY(-2px);
}

.verden-knap:active {
    transform: translateY(2px);
    border-bottom-width: 4px;
}

.verden-ikon {
    font-size: 2rem;
}

/* Spil side */
.spil-side {
    background-color: #000;
    position: relative;
}

#spil-container {
    width: 100vw;
    height: 100vh;
}

#spil-container canvas {
    display: block;
}

.spil-info {
    position: fixed;
    top: 10px;
    left: 10px;
    color: white;
    font-size: 1rem;
    z-index: 100;
    display: flex;
    gap: 20px;
    background-color: rgba(0,0,0,0.5);
    padding: 8px 15px;
    border-radius: 4px;
}

.crosshair {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 30px;
    z-index: 100;
    pointer-events: none;
    text-shadow: 2px 2px 2px rgba(0,0,0,0.8);
}

/* Inventory bar */
#inventory-bar {
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    z-index: 100;
    background-color: rgba(0,0,0,0.6);
    padding: 8px;
    border-radius: 4px;
}

.inventory-slot {
    width: 50px;
    height: 50px;
    background-color: rgba(50,50,50,0.8);
    border: 3px solid #555;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    position: relative;
}

.inventory-slot.valgt {
    border-color: white;
    box-shadow: 0 0 8px white;
}

.inventory-slot.tom {
    opacity: 0.4;
}

.inventory-antal {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 0.7rem;
    color: white;
    text-shadow: 1px 1px 1px black;
}

.inventory-nummer {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 0.6rem;
    color: #aaa;
}

/* Stort lager overlay */
#lager-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
}

#lager-overlay.skjult {
    display: none;
}

#lager-boks {
    background-color: #2a2a3e;
    border: 4px solid #4a4a5e;
    border-radius: 8px;
    padding: 20px;
    min-width: 500px;
    max-width: 700px;
    max-height: 80vh;
}

#lager-boks h2 {
    color: white;
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

#lager-kategorier {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.kategori-knap {
    font-family: 'Courier New', monospace;
    padding: 8px 15px;
    background-color: #3a3a4a;
    color: white;
    border: 2px solid #4a4a5a;
    cursor: pointer;
    font-size: 0.9rem;
}

.kategori-knap:hover {
    background-color: #4a4a5a;
}

.kategori-knap.aktiv {
    background-color: #5a3a8a;
    border-color: white;
}

#lager-items {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 6px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    background-color: #1a1a2e;
    border-radius: 4px;
}

.lager-item {
    width: 55px;
    height: 55px;
    background-color: #3a3a4a;
    border: 2px solid #4a4a5a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    font-size: 1.5rem;
}

.lager-item:hover {
    border-color: white;
    background-color: #4a4a5a;
}

.lager-item.tom {
    opacity: 0.3;
    cursor: default;
}

.lager-item .item-antal {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 0.6rem;
    color: white;
    text-shadow: 1px 1px 1px black;
}

.lager-item .item-navn {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    color: #aaa;
    white-space: nowrap;
    display: none;
}

.lager-item:hover .item-navn {
    display: block;
}

#lager-boks h3 {
    color: #aaa;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1rem;
}

#lager-hotbar {
    display: flex;
    gap: 6px;
    justify-content: center;
    padding: 15px;
    background-color: #1a1a2e;
    border-radius: 4px;
    border: 2px dashed #4a4a5a;
}

.hotbar-slot {
    width: 55px;
    height: 55px;
    background-color: #3a3a4a;
    border: 3px solid #555;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    position: relative;
}

.hotbar-slot.drag-over {
    border-color: #00ff00;
    background-color: #2a4a2a;
    box-shadow: 0 0 10px #00ff00;
}

.hotbar-slot .slot-nummer {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 0.6rem;
    color: #aaa;
}

.hotbar-slot .slot-antal {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 0.6rem;
    color: white;
}

.lager-item.dragging {
    opacity: 0.5;
    border-color: #00ff00;
}

.lager-hint {
    text-align: center;
    color: #888;
    margin-top: 15px;
    font-size: 0.9rem;
}

.kontrol-info {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 0.9rem;
    z-index: 100;
    background-color: rgba(0,0,0,0.5);
    padding: 8px 15px;
    border-radius: 4px;
}

/* Pause knap */
.pause-knap {
    position: fixed;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background-color: rgba(0,0,0,0.5);
    border: 2px solid #555;
    border-radius: 4px;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pause-knap:hover {
    background-color: rgba(50,50,50,0.8);
    border-color: white;
}

/* Pause overlay */
#pause-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 300;
    display: flex;
    justify-content: center;
    align-items: center;
}

#pause-overlay.skjult {
    display: none;
}

.pause-boks {
    background-color: #2a2a3e;
    border: 4px solid #4a4a5e;
    border-radius: 8px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.menu-knap {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    padding: 15px 30px;
    background-color: #4a4a5a;
    color: white;
    border: 3px solid #3a3a4a;
    border-bottom-width: 5px;
    cursor: pointer;
    transition: all 0.1s;
}

.menu-knap:hover {
    background-color: #5a5a6a;
    transform: translateY(-2px);
}

.menu-knap:active {
    transform: translateY(2px);
    border-bottom-width: 3px;
}

/* Gemte verdener */
#gemte-verdener-titel {
    color: #aaa;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

#gemte-verdener-titel.skjult {
    display: none;
}

#gemte-verdener-liste {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.gemt-verden {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #3a3a4a;
    padding: 12px 15px;
    border: 2px solid #4a4a5a;
    border-radius: 4px;
    cursor: pointer;
}

.gemt-verden:hover {
    background-color: #4a4a5a;
    border-color: white;
}

.gemt-verden-navn {
    color: white;
    font-size: 1rem;
}

.gemt-verden-info {
    color: #888;
    font-size: 0.8rem;
}

.slet-verden-knap {
    background-color: #8a3a3a;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.8rem;
    border-radius: 3px;
}

.slet-verden-knap:hover {
    background-color: #aa4a4a;
}
