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

@font-face {
    font-family: 'Palatino Linotype';
    src: url('../fonts/palatinolinotype_bold.ttf') format('truetype');
    font-weight: bold;
}
@font-face {
    font-family: 'Palatino Linotype';
    src: url('../fonts/palatinolinotype_bolditalic.ttf') format('truetype');
    font-weight: bold;
    font-style: italic;
}
@font-face {
    font-family: 'Palatino Linotype';
    src: url('../fonts/palatinolinotype_italic.ttf') format('truetype');
    font-style: italic;
}
@font-face {
    font-family: 'Palatino Linotype';
    src: url('../fonts/palatinolinotype_roman.ttf') format('truetype');
}
html, body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Palatino Linotype', serif;
    font-size: 16px;
    height: 100%;
}

body {
    background: url('../img/backs/battleback4.png') no-repeat center center fixed;
    background-size: cover;
}

.container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 600px;
    height: 100%;
    max-height: 750px;
    position: relative;
}

.header {
    height: 80px;
    min-height: 80px;
    max-height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #333;
    color: #fff;
    padding: 8px 0px 12px 8px;
    background-image: url('../img/ui/top_bar/TopBar_Background_noshadow.png');
    background-size: contain;
    background-repeat: repeat-x;
    background-position: initial;
}
.header .header-title {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 4px;
}

/* Player Info */
.header .player-info {
    display: flex;
    align-items: center;
    width: 60%;
}
.header .player-info .avatar {
    min-height: 60px;
    min-width: 60px;
    max-height: 60px;
    max-width: 60px;
    background-image: url('../img/ui/top_bar/avatar/TopBar_Avatar_Frame.png');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
}
.header .player-info .avatar img {
    min-width: 43px;
    min-height: 43px;
    max-width: 43px;
    max-height: 43px;
}
.header .player-info .player-data {
    display: flex;
    flex-direction: column;
    margin-left: 10px;
    width: 100%;
}
.header .player-info .player-data .player-name {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 4px;
}

.header .player-info .player-data .player-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.header .player-info .player-data .health-bar, .energy-bar {
    width: 100%;
    height: 8px;
    background: linear-gradient(to right, #4CAF50, #81C784);
    border-radius: 2px;
}
.header .player-info .player-data .energy-bar {
    background: linear-gradient(to right, #FFEB3B, #FFF176);
}

.header .player-currency {
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    padding-right: 20px;
    gap: 4px;
    padding-top: 4px;
}
.header .player-currency .currency-oro, .currency-gemas {
    display: flex;
    align-items: center;
    gap: 4px;
}
.header .player-currency .currency-oro img, .currency-gemas img {
    width: 20px;
    height: 20px;
    margin-bottom: 4px;
}

/* Nav */
.nav {
    height: 80px;
    padding: 8px 8px 12px 8px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #333;
    color: #fff;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background-image: url('../img/ui/top_bar/TopBar_Background_noshadow.png');
    background-size: contain;
    background-repeat: repeat-x;
    background-position: initial;
    transform: scaleY(-1);
}
.nav a {
    width: 56px;
    height: 56px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url('../img/ui/buttons/C1/Button_C1_Background.png');
    background-size: cover;
    background-position: center;
    transform: scaleY(-1);
}
.nav a img {
    width: 40%;
    height: 40%;
}
.game-area {
    width: 450px;
    height: 450px;
    background-color: #ccc;
    position: relative;
    align-self: center;
}

.game-area-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Messages */
#messages {
    width: 450px;
    flex: 1;
    padding: 0 10px;
    background-color: #e0e0e0;
    overflow-y: auto;
    margin-bottom: 80px;
    border-top: 3px solid #725746;
    position: relative;
    font-size: 1rem;
    display: flex;
    flex-direction: column;
}

#messages .message {
    display: flex;
    gap: 10px;
    padding-top: 10px;
}

@media (max-width: 600px) {
    body, html {
        align-items: flex-start;
        font-size: 14px;
    }
    .header .header-title {
        font-size: 1.2rem;
    }
    .container {
        max-width: none;
        max-height: none;
        width: 100vw;
        height: 100vh;
    }
    .game-area {
        width: 100%;
        height: 0;
        padding-bottom: 100%;
    }
    #messages {
        width: 100%;
    }
    .nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
    }
}