Files
snake-game/styles.css
T
2026-02-03 14:57:13 +00:00

109 lines
1.6 KiB
CSS

:root {
color-scheme: light;
--bg: #f6f5f2;
--panel: #ffffff;
--ink: #1f1f1f;
--muted: #6b6b6b;
--border: #d7d5cf;
--accent: #2f5d50;
--food: #b93b3b;
}
* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: "Georgia", "Times New Roman", serif;
color: var(--ink);
background: radial-gradient(circle at 20% 20%, #ffffff 0, var(--bg) 55%);
}
.app {
max-width: 520px;
margin: 32px auto;
padding: 24px;
background: var(--panel);
border: 1px solid var(--border);
border-radius: 12px;
box-shadow: 0 10px 24px rgba(31, 31, 31, 0.08);
}
.header {
display: flex;
align-items: baseline;
justify-content: space-between;
margin-bottom: 16px;
}
h1 {
margin: 0;
font-size: 28px;
letter-spacing: 0.5px;
}
.score {
font-size: 16px;
color: var(--muted);
}
.game {
display: grid;
place-items: center;
gap: 10px;
}
#board {
width: 100%;
max-width: 420px;
border: 1px solid var(--border);
background: #fdfdfb;
}
.status {
min-height: 20px;
color: var(--muted);
font-size: 14px;
}
.controls {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
margin-top: 16px;
}
button {
padding: 8px 14px;
border-radius: 6px;
border: 1px solid var(--border);
background: var(--accent);
color: #ffffff;
font-size: 14px;
cursor: pointer;
}
button:focus {
outline: 2px solid #000000;
outline-offset: 2px;
}
.hint {
font-size: 13px;
color: var(--muted);
text-align: right;
}
@media (max-width: 480px) {
.controls {
flex-direction: column;
align-items: flex-start;
}
.hint {
text-align: left;
}
}