Show sourcecode
The following files exists in this folder. Click to view.
public_html/gamla-kurser/webbutv2/projekt/snake_br/css/
snake.css
134 lines ASCII Windows (CRLF)
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
:root {
/* Main theme colors */
--glow-color: 76, 175, 80; /* RGB values for #4CAF50 green */
--glow-intensity: 0.4;
--border-color: #4caf50;
}
body {
font-family: "Courier New", Courier, monospace;
background-color: black;
color: white;
margin: 0;
padding: 20px;
display: flex;
flex-direction: column;
align-items: center;
height: 100vh;
}
.game-container {
display: grid;
grid-template-columns: 200px 1fr 200px;
grid-template-rows: auto 1fr;
gap: 10px;
width: 100%;
max-width: 1200px;
height: 90vh;
}
.header {
grid-column: 2;
grid-row: 1;
text-align: center;
margin-bottom: 0;
}
h2 {
margin-bottom: 5px;
margin-top: -10px;
font-size: 2rem;
}
#levelText {
margin-top: 0;
margin-bottom: 5px;
font-size: 1rem;
color: var(--border-color);
}
.board-container {
grid-column: 2;
grid-row: 2;
display: flex;
justify-content: center;
align-items: flex-start;
padding-top: 10px;
}
#board {
border: 3px solid var(--border-color);
box-shadow: 0 0 20px rgba(var(--glow-color), var(--glow-intensity));
background-color: #111;
}
/* Left side column containing scoreboard and other elements */
.left-column {
grid-column: 1;
grid-row: 1 / span 2;
display: flex;
flex-direction: column;
gap: 10px;
}
#scoreBoard {
border: 2px solid var(--border-color);
border-radius: 10px;
padding: 15px;
background-color: rgba(0, 0, 0, 0.7);
box-shadow: 0 0 10px rgba(var(--glow-color), calc(var(--glow-intensity) - 0.1));
height: fit-content;
width: calc(100% - 34px);
}
#leftSide {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
}
#leftSide video {
width: 300px;
height: auto;
border-radius: 8px;
border: 2px solid var(--border-color);
box-shadow: 0 0 10px rgba(var(--glow-color), calc(var(--glow-intensity) - 0.1));
}
.controls {
grid-column: 3;
grid-row: 1 / span 2;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
padding-top: 10px;
}
.controls button {
padding: 12px 24px;
background-color: var(--border-color);
color: black;
border: none;
border-radius: 5px;
font-family: "Courier New", Courier, monospace;
font-weight: bold;
font-size: 1rem;
cursor: pointer;
transition: all 0.2s;
}
.controls button:hover {
background-color: #45a049;
transform: scale(1.05);
}
.controls button:active {
transform: scale(0.98);
}
#fidgetSpinner {
margin: 0 0 0 0;
padding: 0 0 0 0;
}