Update to v2.0.4 and fix CSS margins/spacing

- Update page title to '2048 Game - v2.0.4'
- Fix cramped layout by removing conflicting margin/padding
- Improve body padding from 20px+80px margin to clean 40px padding
- Add proper container padding and header spacing
- Improve responsive design for mobile devices
- Add better spacing for game explanation section
- Fix line-height and gap issues in header

The game should now have much better visual spacing and margins.
This commit is contained in:
Greg
2025-07-01 14:30:03 -07:00
parent 7ce84142e9
commit ecae4e3af0
2 changed files with 34 additions and 5 deletions

View File

@@ -3,7 +3,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Knative 2048 v2.0.3 - Auto-Promotion Fixed <20></title> <title>2048 Game - v2.0.4</title>
<link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="style.css">
<link rel="icon" type="image/png" href="favicon.png"> <link rel="icon" type="image/png" href="favicon.png">
</head> </head>

View File

@@ -2,15 +2,16 @@
html, body { html, body {
margin: 0; margin: 0;
padding: 20px; padding: 0;
background: #faf8ef; background: #faf8ef;
color: #776e65; color: #776e65;
font-family: "Clear Sans", "Helvetica Neue", Arial, sans-serif; font-family: "Clear Sans", "Helvetica Neue", Arial, sans-serif;
font-size: 18px; font-size: 18px;
min-height: 100vh;
} }
body { body {
margin: 80px 0; padding: 40px 20px;
} }
.heading { .heading {
@@ -27,13 +28,16 @@ h1.title {
.container { .container {
width: 512px; width: 512px;
margin: 0 auto; margin: 0 auto;
padding: 20px;
} }
.header { .header {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin-bottom: 20px; margin-bottom: 30px;
flex-wrap: wrap;
gap: 15px;
} }
.header h1 { .header h1 {
@@ -41,6 +45,7 @@ h1.title {
font-size: 80px; font-size: 80px;
font-weight: bold; font-weight: bold;
margin: 0; margin: 0;
line-height: 1;
} }
.environment-badge { .environment-badge {
@@ -300,7 +305,7 @@ h1.title {
.game-explanation { .game-explanation {
margin-top: 30px; margin-top: 30px;
text-align: center; text-align: center;
color: #776e65; line-height: 1.6;
} }
.game-explanation p { .game-explanation p {
@@ -380,3 +385,27 @@ h1.title {
font-size: 18px; font-size: 18px;
} }
} }
/* Additional responsive improvements */
@media screen and (max-width: 600px) {
body {
padding: 20px 10px;
}
.container {
width: 100%;
max-width: 480px;
padding: 10px;
}
.header h1 {
font-size: 60px;
}
.game-container {
width: 100%;
max-width: 480px;
height: auto;
aspect-ratio: 1;
}
}