dungeon_game / static /styles.css
broadfield-dev's picture
Rename static/style.css to static/styles.css
ef0cac8 verified
/* Reset default margins and set a dark dungeon theme */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background-color: #1a1a1a; /* Dark gray, almost black, like dungeon shadows */
color: #d9c7a3; /* Aged parchment-like text color */
font-family: 'Courier New', Courier, monospace; /* Monospace for a gritty, old-school vibe */
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-image: url('https://www.transparenttextures.com/patterns/dark-mosaic.png'); /* Subtle stone texture */
background-blend-mode: overlay;
}
/* Container for the game elements */
#gameContainer {
display: flex;
flex-direction: column;
align-items: center;
padding: 20px;
background-color: rgba(34, 34, 34, 0.9); /* Semi-transparent dark gray for depth */
border: 4px solid #3c2f2f; /* Rough-hewn stone border color */
border-radius: 8px;
box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 0, 0, 0.5); /* Inner shadow for carved effect */
}
/* Canvas styling */
#gameCanvas {
border: 2px solid #4a3c31; /* Rusty iron frame */
background-color: #2b2b2b; /* Dark background behind canvas */
}
/* Stats section */
#stats {
margin-top: 15px;
padding: 10px;
background-color: #2f2f2f; /* Slightly lighter gray for contrast */
border: 2px solid #3c2f2f;
border-radius: 5px;
width: 320px; /* Matches canvas width */
text-align: center;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
}
#stats p {
margin: 5px 0;
font-size: 14px;
text-shadow: 1px 1px 2px #000000; /* Subtle shadow for readability */
}
#stats span {
color: #e6b800; /* Gold for values to stand out */
}
/* Use Potion button */
#usePotion {
margin-top: 10px;
padding: 8px 16px;
background-color: #5a3e36; /* Rusty brown */
color: #d9c7a3;
border: 2px solid #3c2f2f;
border-radius: 5px;
cursor: pointer;
font-size: 14px;
text-transform: uppercase;
transition: background-color 0.3s, transform 0.1s;
}
#usePotion:hover:enabled {
background-color: #7a5a4e; /* Lighter brown on hover */
transform: scale(1.05);
}
#usePotion:disabled {
background-color: #3a3a3a; /* Grayed out when disabled */
cursor: not-allowed;
opacity: 0.6;
}
/* Messages section */
#messages {
margin-top: 15px;
padding: 10px;
width: 320px;
max-height: 150px;
overflow-y: auto; /* Scrollable if too many messages */
background-color: #252525; /* Darker than stats for contrast */
border: 2px solid #3c2f2f;
border-radius: 5px;
font-size: 12px;
line-height: 1.4;
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.8);
}
#messages p {
margin: 5px 0;
color: #b3a08a; /* Slightly muted parchment for messages */
text-shadow: 1px 1px 1px #000000;
}
/* Scrollbar styling for messages */
#messages::-webkit-scrollbar {
width: 8px;
}
#messages::-webkit-scrollbar-track {
background: #2f2f2f;
border-radius: 4px;
}
#messages::-webkit-scrollbar-thumb {
background: #5a3e36;
border-radius: 4px;
}
#messages::-webkit-scrollbar-thumb:hover {
background: #7a5a4e;
}