mirror of
https://github.com/Such-Software/wownerogue.git
synced 2026-10-18 06:41:27 +02:00
209 lines
4.5 KiB
CSS
209 lines
4.5 KiB
CSS
/* Font declarations */
|
|
@font-face {
|
|
font-family: 'PixelOperator';
|
|
src: url('fonts/pixel-operator/PixelOperator.ttf') format('truetype');
|
|
font-weight: normal;
|
|
font-style: normal;
|
|
}
|
|
|
|
@font-face {
|
|
font-family: 'PixelOperator';
|
|
src: url('fonts/pixel-operator/PixelOperator-Bold.ttf') format('truetype');
|
|
font-weight: bold;
|
|
font-style: normal;
|
|
}
|
|
|
|
/* Updated layout with 5-row structure */
|
|
.container {
|
|
display: grid;
|
|
grid-template-areas:
|
|
"header header header"
|
|
"status game game"
|
|
"chat game game"
|
|
"input input input"
|
|
"footer footer footer";
|
|
grid-template-columns: 350px 1fr 1fr;
|
|
grid-template-rows: auto auto 1fr auto auto;
|
|
height: 100vh;
|
|
width: 100%;
|
|
max-width: 100vw;
|
|
overflow: hidden;
|
|
gap: 1px;
|
|
background-color: #222;
|
|
}
|
|
|
|
/* Header area */
|
|
.banner {
|
|
grid-area: header;
|
|
background-color: #111;
|
|
padding: 5px;
|
|
color: white;
|
|
text-align: left;
|
|
border-bottom: 1px solid #444;
|
|
font-family: 'PixelOperator', monospace;
|
|
font-weight: bold;
|
|
font-size: 24px;
|
|
letter-spacing: 1px;
|
|
}
|
|
|
|
/* Status area for block height display */
|
|
.status {
|
|
grid-area: status;
|
|
background-color: #222;
|
|
padding: 10px;
|
|
color: #0f0;
|
|
font-family: monospace;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: flex-start;
|
|
border-right: 1px solid #444;
|
|
}
|
|
|
|
/* Make sure rotdis is properly visible across all browsers */
|
|
.rotdis {
|
|
grid-area: game;
|
|
background-color: #000;
|
|
border: 2px solid #444;
|
|
display: flex !important; /* Using flex to center canvas */
|
|
justify-content: center;
|
|
align-items: center;
|
|
/* min-height: 608px; */ /* REMOVED to allow shrinking */
|
|
width: 100%; /* Ensure it takes full width of its grid area */
|
|
height: 100%; /* Ensure it takes full height of its grid area */
|
|
position: relative;
|
|
overflow: hidden; /* Important to clip canvas if it somehow overflows */
|
|
z-index: 5;
|
|
}
|
|
|
|
.rotdis canvas {
|
|
display: block !important;
|
|
image-rendering: pixelated;
|
|
image-rendering: -moz-crisp-edges;
|
|
image-rendering: crisp-edges;
|
|
max-width: 100%; /* ADDED: Scale down to fit container width */
|
|
max-height: 100%; /* ADDED: Scale down to fit container height */
|
|
object-fit: contain; /* ADDED: Maintain aspect ratio when scaling */
|
|
}
|
|
|
|
/* Add debug overlay to see container bounds */
|
|
.rotdis::before {
|
|
content: "GAME AREA";
|
|
position: absolute;
|
|
top: 5px;
|
|
left: 5px;
|
|
color: rgba(255,255,255,0.3);
|
|
font-family: monospace;
|
|
font-size: 12px;
|
|
z-index: 1;
|
|
pointer-events: none;
|
|
}
|
|
|
|
/* Chat messages area */
|
|
.chat-container {
|
|
grid-area: chat;
|
|
background-color: #222;
|
|
display: flex;
|
|
flex-direction: column;
|
|
border-right: 1px solid #444;
|
|
overflow: hidden; /* Prevents chat from causing scrolling */
|
|
}
|
|
|
|
#messageBox {
|
|
flex-grow: 1;
|
|
overflow-y: auto;
|
|
padding: 10px;
|
|
height: 100%;
|
|
max-height: 100%;
|
|
}
|
|
|
|
#messages {
|
|
list-style-type: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
color: #fff; /* Default text color */;
|
|
}
|
|
|
|
#messages li {
|
|
padding: 3px 5px;
|
|
margin-bottom: 2px;
|
|
word-break: break-word;
|
|
}
|
|
|
|
/* Chat input area, now in its own row */
|
|
.input-container {
|
|
grid-area: input;
|
|
background-color: #333;
|
|
padding: 10px;
|
|
border-top: 1px solid #444;
|
|
border-bottom: 1px solid #444;
|
|
}
|
|
|
|
#chatForm {
|
|
display: flex;
|
|
width: 100%;
|
|
}
|
|
|
|
#chatInput {
|
|
flex-grow: 1;
|
|
padding: 8px;
|
|
border: none;
|
|
background-color: #444;
|
|
color: #fff;
|
|
border-radius: 3px 0 0 3px;
|
|
}
|
|
|
|
#chatForm button {
|
|
padding: 0 20px;
|
|
background-color: #555;
|
|
color: white;
|
|
border: none;
|
|
cursor: pointer;
|
|
border-radius: 0 3px 3px 0;
|
|
}
|
|
|
|
/* Add this to your stylesheet to use the font in other places */
|
|
#staticbanner {
|
|
font-family: 'PixelOperator', monospace;
|
|
font-weight: bold;
|
|
letter-spacing: 1px;
|
|
padding: 10px;
|
|
}
|
|
|
|
.footer {
|
|
grid-area: footer;
|
|
background-color: #111;
|
|
color: #888;
|
|
padding: 5px;
|
|
text-align: center;
|
|
font-size: 0.8em;
|
|
font-family: 'PixelOperator', sans-serif;
|
|
}
|
|
|
|
/* Game messages styling */
|
|
li.game-start {
|
|
color: #0f0;
|
|
font-weight: bold;
|
|
text-align: center;
|
|
margin: 5px 0;
|
|
padding: 2px 0;
|
|
background: rgba(0,255,0,0.1);
|
|
}
|
|
|
|
li.error {
|
|
color: #f00;
|
|
font-weight: bold;
|
|
font-family: monospace;
|
|
padding: 2px 5px;
|
|
background: rgba(255,0,0,0.1);
|
|
border-left: 2px solid #f00;
|
|
}
|
|
|
|
li.debug {
|
|
color: #0ff;
|
|
font-family: monospace;
|
|
font-size: 0.9em;
|
|
padding-left: 10px;
|
|
border-left: 2px solid #0ff;
|
|
}
|
|
|