:root {
    --tile-size: 160px;
    --header-height: 58px;
}

/* Base */
html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

body {
    font-family: Arial, sans-serif;
    background: #121212;
    color: #eaeaea;
}

/* Layout */
.game-layout {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.game-header {
    height: var(--header-height);
    flex-shrink: 0;
    background: rgba(20, 20, 24, 0.96);
    border-bottom: 1px solid #333;
}

.game-header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 18px;
}

.game-title,
.language-switch {
    white-space: nowrap;
}

.game-main {
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
}

/* Navigation */
.game-nav,
.language-switch {
    display: flex;
    align-items: center;
}

.game-nav {
    gap: 14px;
}

.language-switch {
    gap: 8px;
}

.game-nav a,
.language-switch a {
    color: #9ecbff;
    text-decoration: none;
}

.game-nav a:hover,
.language-switch a:hover {
    text-decoration: underline;
}

/* Generic elements */
main {
    padding: 0;
    margin: 0;
}

button {
    background: #2d6cdf;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 14px;
    cursor: pointer;
}

button:hover {
    background: #1f4fa5;
}

input {
    width: 100%;
    max-width: 300px;
    border-radius: 6px;
    border: 1px solid #444;
    background: #111;
    color: #fff;
}

/* Boxes */
.box {
    background: #1e1e1e;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.4);
}

.map-location-info {
    background: rgba(0,0,0,0.25);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

/* Map viewport */
.map-viewport {
    width: 100%;
    height: calc(100vh - var(--header-height));
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* Map info overlay */
.map-overlay {
    position: absolute;
    z-index: 30;
    pointer-events: none;
}

.map-overlay-top-left {
    top: 14px;
    left: 14px;
}

.map-overlay-box {
    min-width: 230px;
    background: linear-gradient(180deg, rgba(12,12,16,0.85), rgba(8,8,10,0.75));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.6;
    color: #ccc;
    box-shadow:
        0 8px 25px rgba(0,0,0,0.45),
        inset 0 0 0 1px rgba(255,255,255,0.03);
    backdrop-filter: blur(6px);
}

.map-overlay-box strong {
    color: #ffcc66;
    font-weight: 600;
}

/* Game message overlay */
.game-message {
    position: absolute;
    left: 14px;
    bottom: 14px;
    z-index: 50;
    min-width: 260px;
    max-width: 420px;
    margin: 0;
    padding: 12px 14px;
    border-radius: 8px;
    background: #263238;
    border: 1px solid #455a64;
    box-shadow: 0 8px 25px rgba(0,0,0,0.45);
    pointer-events: none;
}

.game-message.error {
    background: #3a1f1f;
    border-color: #8b3333;
}

.game-message.success {
    background: #1f3a2a;
    border-color: #3c8b5a;
}

/* World map */
.world-map {
    display: inline-block;
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid #444;
    transform: translate(-50%, -50%);
    transition: transform 0.22s ease;
}

.world-map.ready {
    transform: translate(-50%, -50%);
}

.world-map.slide-out-east {
    transform: translate(-50%, -50%) translateX(calc(-1 * var(--tile-size)));
}

.world-map.slide-out-west {
    transform: translate(-50%, -50%) translateX(var(--tile-size));
}

.world-map.slide-out-north {
    transform: translate(-50%, -50%) translateY(var(--tile-size));
}

.world-map.slide-out-south {
    transform: translate(-50%, -50%) translateY(calc(-1 * var(--tile-size)));
}

.map-row {
    display: flex;
}

.map-tile {
    width: var(--tile-size);
    height: var(--tile-size);
    border: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #222;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    font-size: 14px;
    text-transform: uppercase;
}

/* Player */
.player-marker {
    color: #ffcc66;
    font-size: 24px;
}

/* POI icons */
.poi-icon {
    position: absolute;
    width: 40px;
    height: 40px;
    z-index: 5;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.75));
    border: 1px solid #fff;
}

.poi-pos-top_left {
    top: 8px;
    left: 8px;
}

.poi-pos-top_center {
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
}

.poi-pos-top_right {
    top: 8px;
    right: 8px;
}

.poi-pos-middle_left {
    top: 50%;
    left: 8px;
    transform: translateY(-50%);
}

.poi-pos-middle_center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.poi-pos-middle_right {
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
}

.poi-pos-bottom_left {
    bottom: 8px;
    left: 8px;
}

.poi-pos-bottom_center {
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
}

.poi-pos-bottom_right {
    bottom: 8px;
    right: 8px;
}




:root {
    --move-color: rgba(255, 204, 102, 0.9);
    --move-color-soft: rgba(255, 204, 102, 0.6);
}

.map-tile.can-move {
    cursor: pointer;
}

.map-tile.can-move::after {
    content: "";
    position: absolute;
    inset: 0;

    border: 2px solid var(--move-color-soft);
    border-radius: 4px;

    box-shadow:
        0 0 0 rgba(255, 204, 102, 0),
        0 0 10px rgba(255, 204, 102, 0);

    opacity: 0;
    transition: all 0.15s ease;
    pointer-events: none;
}

.map-tile.can-move:hover::after {
    opacity: 1;

    box-shadow:
        0 0 6px rgba(255, 204, 102, 0.5),
        0 0 14px rgba(255, 204, 102, 0.4);
}

.map-tile.can-move:hover {
    filter: brightness(1.08) contrast(1.05);
}

.map-tile.can-move::before {
    content: "";
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 42px;
    font-weight: bold;
    color: var(--move-color);

    opacity: 0;
    transform: scale(0.85);
    transition: all 0.15s ease;

    pointer-events: none;
    z-index: 10;

    text-shadow:
        0 0 6px rgba(0,0,0,0.8),
        0 0 12px rgba(0,0,0,0.6);
}
/* Richtung setzen */
.map-tile.can-move[data-direction="north"]::before {
    content: "↑";
}
.map-tile.can-move[data-direction="south"]::before {
    content: "↓";
}
.map-tile.can-move[data-direction="west"]::before {
    content: "←";
}
.map-tile.can-move[data-direction="east"]::before {
    content: "→";
}

/* Hover sichtbar */
.map-tile.can-move:hover::before {
    opacity: 1;
    transform: scale(1);
}

.map-tile.can-move::before {
    text-shadow:
        0 0 6px rgba(0,0,0,0.8),
        0 0 12px rgba(0,0,0,0.6);
}



.map-viewport:has(.map-tile.can-move:hover) .map-tile.can-move:not(:hover) {
    opacity: 0.55;
}

.world-map.slide-in-east {
    transition: none;
    transform: translate(-50%, -50%) translateX(var(--tile-size));
}

.world-map.slide-in-west {
    transition: none;
    transform: translate(-50%, -50%) translateX(calc(-1 * var(--tile-size)));
}

.world-map.slide-in-north {
    transition: none;
    transform: translate(-50%, -50%) translateY(calc(-1 * var(--tile-size)));
}

.world-map.slide-in-south {
    transition: none;
    transform: translate(-50%, -50%) translateY(var(--tile-size));
}