DK2/public/assets/css/game.css

160 lines
2.8 KiB
CSS

@import 'src/buttons.css';
:root {
font-size: 16px;
--main-font: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background-color: #bcc6cf;
background-image: url('/assets/img/bg.jpg');
background-attachment: fixed;
background-position: center top;
background-repeat: no-repeat;
font-family: var(--main-font);
}
main#game-container {
width: 100vw;
height: 100vh;
overflow: hidden;
position: relative;
}
div#game-ui, div#game-windows {
position: absolute;
top: 0;
left: 0;
z-index: 2;
padding: 1rem;
width: 100%;
height: 100%;
}
div#game-windows {
display: flex;
align-items: center;
justify-content: center;
z-index: 3;
pointer-events: none;
& > div.window {
pointer-events: auto;
background-color: #bcc6cf;
background-image: url('/assets/img/bg.jpg');
background-attachment: fixed;
background-position: center top;
background-repeat: no-repeat;
box-shadow: 0px 0px 5px black;
border-radius: 4px;
position: absolute;
&.hidden {
display: none;
}
header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1rem 1rem 0.5rem 1rem;
cursor: grab;
.title {
font-weight: bold;
margin-right: 1rem;
user-select: none;
&:empty {
margin-right: 0;
}
}
.close {
width: 1.5rem;
height: 1.5rem;
user-select: none;
cursor: pointer;
}
}
.body {
padding: 0 1rem 1rem 1rem;
&:empty {
padding: 0;
display: none;
}
}
}
}
canvas#game-canvas {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 1;
}
section#character-hud {
width: 300px;
display: flex;
flex-direction: column;
gap: 0.5rem;
margin-bottom: 1rem;
span#character-name {
color: white;
}
span#character-title {
color: white;
}
div.hud-meter {
background-color: black;
height: 16px;
min-width: 100px;
border-radius: 0.1rem;
position: relative;
& > div {
height: 100%;
border-radius: 0.1rem;
overflow: hidden;
&.hp {
background-color: #e57373;
background-image: linear-gradient(rgba(255, 255, 255, 0.15), rgba(139, 0, 0, 0.1));
box-shadow: 0px 1px 0px 0px rgba(255, 255, 255, 0.2) inset;
border: 1px solid;
border-color: #d32f2f #c62828 #b71c1c;
}
&.mp {
background-color: #5a9bd4;
background-image: linear-gradient(rgba(255, 255, 255, 0.15), rgba(60, 100, 150, 0.1));
box-shadow: 0px 1px 0px 0px rgba(255, 255, 255, 0.2) inset;
border: 1px solid;
border-color: #4a8ab0 #3a7a9c #2a6a88;
}
&.tp {
background-color: #f4cc67;
background-image: linear-gradient(rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.1));
box-shadow: 0px 1px 0px 0px rgba(255, 255, 255, 0.2) inset;
border: 1px solid;
border-color: #C59F43 #AA8326 #957321;
}
}
}
}