Cats-vs-Mice/css/style.css
2025-05-10 00:17:37 +09:00

217 lines
3.7 KiB
CSS

:root {
--dark-brown: #503E28;
--med-brown: #B09472;
--light-brown: #CAB49A;
--dark-yellow: #F7E7BE;
--light-yellow: #FDF4E5;
}
body {
background-color: #FDF6E3;
margin: 0;
font-family: sans-serif;
text-align: center;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
#gameFrame {
position: relative;
/* flex-shrink: 0; */
max-width: 800px;
width: 60vw;
aspect-ratio: 800/569;
border-radius: 35px;
background: #FFFEF9;
overflow: hidden;
}
#endingOverlay {
position: fixed;
max-width: 800px;
width: 60vw;
aspect-ratio: 800/569;
border-radius: 35px;
background-color: rgba(80, 62, 40, 0.75);
z-index: 100;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
#endingText {
color: var(--dark-yellow);
}
canvas {
display: block;
width: 100%;
height: 100%;
border-radius: 25px;
z-index: 0;
}
#upperContainer {
position: absolute;
align-items: center;
background: var(--med-brown);
border-radius: 25px 25px 0 0;
width: 100%;
}
#controlPanel {
/* background: var(--light-brown); */
border-radius: 30px 30px 0 0;
display: flex;
flex-direction: row;
align-items: center;
}
#cheeseLabel {
height: 100%;
}
#catsLabel {
height: 100%;
}
#cheeseDisplay {
background: var(--light-brown);
height: 100%;
width: 9.7%;
border-radius: 8px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
#catToolbar {
display: flex;
flex-direction: row;
height: 100%;
width: auto;
aspect-ratio: 330/83;
/* gap: 1px; */
background: var(--light-brown);
/* padding: 4px 8px; */
border-radius: 6px;
}
.catButton {
width: 20%;
display: flex;
flex-direction: column;
align-items: center;
background: var(--light-brown);
border: 1px solid var(--dark-brown);
border-radius: 4px;
padding: 4px 6px;
cursor: pointer;
transition: background 0.2s;
}
.catButton span {
font-size: 12px;
color: #333;
}
.catButton:not(:disabled):hover {
background: var(--dark-yellow);
}
.catButton.activeButton {
background: red;
}
.divider {
width: 1.5%;
}
#petCage {
height: 100%;
width: auto;
aspect-ratio: 60/83;
justify-content: center;
}
.catIcon {
width: 100%;
height: auto;
object-fit: contain;
}
#cageIcon {
width: 100%;
height: auto;
object-fit: contain;
}
#cheeseIcon {
width: 50%;
height: auto;
object-fit: contain;
}
#gameProgressWrapper {
width: 22%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
#gameProgress {
appearance: none;
width: 75%;
height: 20%;
border-radius: 100px;
margin-top: 5%;
background-color: var(--dark-brown);
border: 4px solid var(--dark-brown);
overflow: hidden;
}
#gameProgress::-webkit-progress-bar {
background-color: var(--dark-brown);
border-radius: 100px;
}
#gameProgress::-webkit-progress-value {
background-color: var(--dark-yellow);
border-radius: 100px;
}
#gameProgressLabel {
height: 20%;
font-weight: 600;
font-family: "Inter", sans-serif;
margin-top: 4%;
color: var(--dark-brown);
}
#gameBackground {
position: absolute;
translate: -50%;
width: 100%;
/* z-index: -1; */
}
.Button {
background: var(--med-brown);
color: white;
border: none;
padding: 6px 10px;
border-radius: 6px;
font-size: 14px;
cursor: pointer;
margin-top: 20px;
}
.Button:hover {
background: #a8845d;
}