@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&display=swap');

:root {
    --dark: #172d26;
    --dark-soft: #203b31;
    --green: #3b8060;
    --sage: #dce9d9;
    --cream: #f6f4e9;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background: #e9eee8;
    color: var(--dark);
    overflow: hidden;
}

.game-app {
    height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 10px;
}

/* HEADER */

.game-header {
    min-height: 66px;
    background: var(--dark);
    color: white;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    gap: 12px;
    z-index: 10;
}

.brand,
.player-info,
.header-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: #80b68e;
    color: #183b2c;
    font-weight: 900;
    font-size: 23px;
}

.brand h1 {
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 1px;
}

.brand span {
    font-size: 9px;
    letter-spacing: 2px;
    color: #b8cfc0;
}

.player-avatar {
    width: 39px;
    height: 39px;
    border-radius: 50%;
    background: #e2eee0;
    display: grid;
    place-items: center;
    font-size: 21px;
}

.player-info strong,
.player-info small {
    display: block;
}

.player-info strong {
    font-size: 13px;
}

.player-info small {
    font-size: 10px;
    color: #b8cfc0;
}

.header-status {
    font-size: 11px;
    color: #c6e4cd;
}

.online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #70d998;
    box-shadow: 0 0 8px #70d998;
}

/* GAME */

.game-container {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    border-radius: 14px;
    background: #8ebd78;
    border: 4px solid white;
    box-shadow: 0 5px 20px #203b3118;
}

#game {
    width: 100%;
    height: 100%;
}

#game canvas {
    display: block;
}

/* LOCATION */

.location-card {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 5;
    background: rgba(255,255,255,.94);
    padding: 10px 14px;
    border-radius: 11px;
    display: flex;
    gap: 10px;
    align-items: center;
    box-shadow: 0 3px 12px #00000018;
    pointer-events: none;
}

.location-icon {
    font-size: 21px;
}

.location-card small,
.location-card strong {
    display: block;
}

.location-card small {
    font-size: 9px;
    color: #75867a;
    letter-spacing: 1px;
}

.location-card strong {
    font-size: 12px;
}

/* MINI MAP */

.minimap {
    position: absolute;
    right: 16px;
    top: 16px;
    width: 175px;
    padding: 8px;
    background: rgba(255,255,255,.95);
    border-radius: 12px;
    z-index: 5;
    box-shadow: 0 3px 12px #00000018;
    pointer-events: none;
}

.minimap-title {
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.minimap-world {
    position: relative;
    width: 100%;
    aspect-ratio: 1.4;
    background: #a7ce91;
    border-radius: 6px;
    overflow: hidden;
}

.map-road {
    position: absolute;
    background: #d9c79c;
}

.map-road-1 {
    left: 0;
    top: 48%;
    width: 100%;
    height: 9px;
}

.map-road-2 {
    left: 48%;
    top: 0;
    width: 8px;
    height: 100%;
}

.map-water {
    position: absolute;
    width: 30%;
    height: 26%;
    right: 0;
    bottom: 0;
    background: #64b5d0;
    border-radius: 50%;
}

.map-building {
    position: absolute;
    width: 15px;
    height: 13px;
    background: #a96b4c;
    border: 2px solid #704b36;
    border-radius: 2px;
}

.map-building-1 {
    left: 22%;
    top: 20%;
}

.map-building-2 {
    left: 67%;
    top: 30%;
}

.map-building-3 {
    left: 23%;
    bottom: 18%;
}

.player-marker {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #e93c3c;
    border: 2px solid white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    left: 15%;
    top: 20%;
    box-shadow: 0 0 5px #e93c3c;
}

/* GUIDE */

.control-guide {
    position: absolute;
    left: 16px;
    bottom: 16px;
    display: flex;
    gap: 9px;
    align-items: center;
    background: rgba(23,45,38,.88);
    color: white;
    padding: 9px 13px;
    border-radius: 8px;
    font-size: 10px;
    z-index: 5;
    pointer-events: none;
}

/* MOBILE CONTROL */

.mobile-controls {
    display: none;
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 125px;
    height: 115px;
    z-index: 8;
}

.control-btn {
    position: absolute;
    width: 38px;
    height: 38px;
    border: 1px solid #ffffff80;
    border-radius: 9px;
    background: rgba(23,45,38,.8);
    color: white;
    font-size: 15px;
    touch-action: none;
    user-select: none;
}

.control-btn:active {
    background: #4d9870;
}

.control-btn.up {
    left: 43px;
    top: 0;
}

.control-btn.down {
    left: 43px;
    bottom: 0;
}

.control-btn.left {
    left: 0;
    top: 39px;
}

.control-btn.right {
    right: 0;
    top: 39px;
}

/* FOOTER */

.game-footer {
    min-height: 55px;
    background: white;
    border-radius: 11px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px;
}

.game-footer div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.footer-label {
    font-size: 8px;
    letter-spacing: 1px;
    color: #85938a;
}

.game-footer strong {
    font-size: 10px;
}

.status-ready {
    color: #368357;
}

/* RESPONSIVE */

@media (max-width: 650px) {
    .game-app {
        padding: 5px;
        gap: 5px;
    }

    .game-header {
        min-height: 55px;
        padding: 7px 10px;
    }

    .brand h1 {
        font-size: 12px;
    }

    .brand span {
        font-size: 7px;
    }

    .brand-icon {
        width: 33px;
        height: 33px;
        font-size: 19px;
    }

    .header-status {
        display: none;
    }

    .player-info {
        gap: 5px;
    }

    .player-avatar {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }

    .player-info strong {
        font-size: 10px;
    }

    .player-info small {
        font-size: 8px;
    }

    .minimap {
        width: 110px;
        right: 8px;
        top: 8px;
    }

    .location-card {
        top: 8px;
        left: 8px;
        padding: 7px 9px;
    }

    .location-card strong {
        font-size: 10px;
    }

    .location-card small {
        font-size: 7px;
    }

    .mobile-controls {
        display: block;
    }

    .control-guide {
        display: none;
    }

    .game-footer {
        min-height: 47px;
    }

    .game-footer strong {
        font-size: 8px;
    }

    .footer-label {
        font-size: 7px;
    }
}