From c9abc9e6a1a7cca6e89db94c90fb22ef21d9ce62 Mon Sep 17 00:00:00 2001 From: Markus Graf Date: Sun, 29 Mar 2026 13:40:54 +0200 Subject: [PATCH] feat(03-03): add SVG forest background and 4x3 grid HTML/CSS structure - SVG woodland background with sky gradient, clouds, sun, trees, hills, ground - 4x3 CSS grid overlay for forest element placement - Fade-in + scale-up animation keyframes for new elements --- index.html | 24 +++++++++++++++++ src/styles/main.css | 63 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) diff --git a/index.html b/index.html index 93e0c7c..3eeeeed 100644 --- a/index.html +++ b/index.html @@ -34,6 +34,30 @@

+
+ + + + + + + + + + + + + + + + + + + + +
+
+
diff --git a/src/styles/main.css b/src/styles/main.css index c27fcac..cd5a23f 100644 --- a/src/styles/main.css +++ b/src/styles/main.css @@ -378,6 +378,69 @@ h3 { line-height: 1.4; } +/* Forest Scene */ +.forest__scene { + position: relative; + width: 100%; + max-width: 800px; + margin: 0 auto 1.5rem; + border-radius: 16px; + overflow: hidden; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); +} + +.forest__bg { + display: block; + width: 100%; + height: auto; +} + +.forest__grid { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + display: grid; + grid-template-columns: repeat(4, 1fr); + grid-template-rows: repeat(3, 1fr); + padding: 1rem; + gap: 0.5rem; +} + +.forest__element { + display: flex; + align-items: center; + justify-content: center; +} + +.forest__element img { + max-width: 100%; + max-height: 100%; + object-fit: contain; + border-radius: 8px; + filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15)); +} + +.forest__element--new { + animation: forest-element-appear 1.2s ease-out forwards; +} + +@keyframes forest-element-appear { + 0% { + opacity: 0; + transform: scale(0.3); + } + 60% { + opacity: 1; + transform: scale(1.05); + } + 100% { + opacity: 1; + transform: scale(1); + } +} + /* Keyboard */ .keyboard { display: flex;