Update style.css
Browse files
style.css
CHANGED
@@ -1,28 +1,177 @@
|
|
1 |
body {
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
}
|
5 |
|
6 |
h1 {
|
7 |
-
|
8 |
-
|
|
|
|
|
9 |
}
|
10 |
|
11 |
-
p {
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
margin-top: 5px;
|
16 |
}
|
17 |
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
|
|
|
|
|
|
|
|
24 |
}
|
25 |
|
26 |
-
|
27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
body {
|
2 |
+
font-family: 'Lilita One', cursive;
|
3 |
+
display: flex;
|
4 |
+
flex-direction: column;
|
5 |
+
align-items: center;
|
6 |
+
background-color: #a0e7e5; /* Light turquoise background */
|
7 |
+
color: #004d40; /* Dark teal text */
|
8 |
+
padding: 15px;
|
9 |
+
margin: 0;
|
10 |
}
|
11 |
|
12 |
h1 {
|
13 |
+
color: #ff6f61; /* Coral color */
|
14 |
+
text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.1);
|
15 |
+
margin-bottom: 5px;
|
16 |
+
font-size: 2em;
|
17 |
}
|
18 |
|
19 |
+
p#prompt {
|
20 |
+
margin-bottom: 10px;
|
21 |
+
font-size: 1em;
|
22 |
+
text-align: center;
|
|
|
23 |
}
|
24 |
|
25 |
+
/* Score Display Styling */
|
26 |
+
#score-display {
|
27 |
+
font-size: 1.2em;
|
28 |
+
font-weight: bold;
|
29 |
+
color: #1a237e; /* Dark blue */
|
30 |
+
background-color: #e8eaf6; /* Light indigo */
|
31 |
+
padding: 5px 15px;
|
32 |
+
border-radius: 10px;
|
33 |
+
margin-bottom: 10px;
|
34 |
+
border: 2px solid #5c6bc0; /* Indigo border */
|
35 |
}
|
36 |
|
37 |
+
#instructions {
|
38 |
+
background-color: #fff3cd; /* Light yellow */
|
39 |
+
padding: 8px 15px;
|
40 |
+
border-radius: 15px;
|
41 |
+
border: 3px dashed #f5a623; /* Dashed orange border */
|
42 |
+
font-size: 1.1em;
|
43 |
+
margin-bottom: 15px;
|
44 |
+
text-align: center;
|
45 |
+
box-shadow: 0 3px 5px rgba(0,0,0,0.1);
|
46 |
}
|
47 |
+
|
48 |
+
#instructions strong { color: #d9534f; font-size: 1.1em; }
|
49 |
+
#instructions #item-name { color: #00796b; font-style: italic; }
|
50 |
+
|
51 |
+
|
52 |
+
/* Container for grid and Y-axis */
|
53 |
+
#game-area {
|
54 |
+
display: flex; /* Place Y-axis next to grid */
|
55 |
+
align-items: flex-start; /* Align items at the top */
|
56 |
+
margin-bottom: 0; /* No space before X-axis container */
|
57 |
+
}
|
58 |
+
|
59 |
+
/* Y-Axis Label Container */
|
60 |
+
#y-axis-labels {
|
61 |
+
display: flex;
|
62 |
+
flex-direction: column-reverse; /* Labels go 1, 2, 3... upwards */
|
63 |
+
margin-right: 5px; /* Space between Y labels and grid */
|
64 |
+
padding-top: 0; /* Align with grid top edge */
|
65 |
+
flex-shrink: 0; /* Prevent shrinking */
|
66 |
+
/* Height set by JS */
|
67 |
+
}
|
68 |
+
|
69 |
+
/* X-Axis Label Container Wrapper */
|
70 |
+
#x-axis-container {
|
71 |
+
display: flex; /* Use flex to manage inner content alignment */
|
72 |
+
/* Width set by JS to include Y-axis space + grid width */
|
73 |
+
margin-top: 5px; /* Space between grid and X labels */
|
74 |
+
}
|
75 |
+
|
76 |
+
/* Inner X-Axis Labels Div */
|
77 |
+
#x-axis-labels {
|
78 |
+
display: flex; /* Ensure labels stay in a row */
|
79 |
+
margin-left: calc(20px + 5px); /* Width of Y labels (20px) + its margin (5px) */
|
80 |
+
flex-shrink: 0;
|
81 |
+
/* Width set by JS to match grid width*/
|
82 |
+
}
|
83 |
+
|
84 |
+
/* Individual Axis Label Styling */
|
85 |
+
.axis-label {
|
86 |
+
display: flex;
|
87 |
+
justify-content: center;
|
88 |
+
align-items: center;
|
89 |
+
font-weight: bold;
|
90 |
+
color: #5d4037; /* Darker brown */
|
91 |
+
flex-shrink: 0;
|
92 |
+
box-sizing: border-box;
|
93 |
+
/* Size set by JS */
|
94 |
+
}
|
95 |
+
.y-axis-label { width: 20px; } /* Fixed width */
|
96 |
+
.x-axis-label { height: 20px; } /* Fixed height */
|
97 |
+
|
98 |
+
|
99 |
+
/* Grid Container */
|
100 |
+
#grid-container {
|
101 |
+
/* display: grid; <== SET BY JAVASCRIPT */
|
102 |
+
border: 3px solid #8b4513;
|
103 |
+
background-color: #fdf5e6; /* Old paper / sand color */
|
104 |
+
padding: 0;
|
105 |
+
position: relative;
|
106 |
+
box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.2);
|
107 |
+
/* Size & grid templates set by JS */
|
108 |
+
flex-shrink: 0; /* Prevent shrinking */
|
109 |
+
}
|
110 |
+
|
111 |
+
/* Grid Cell Styling */
|
112 |
+
.grid-cell {
|
113 |
+
/* Size set by JS */
|
114 |
+
border: 1px solid #bcaaa4; /* Light brown grid lines */
|
115 |
+
box-sizing: border-box;
|
116 |
+
cursor: pointer;
|
117 |
+
display: flex;
|
118 |
+
justify-content: center;
|
119 |
+
align-items: center;
|
120 |
+
font-size: 1.5em; /* Emoji size */
|
121 |
+
color: black; /* Default text color (emoji) */
|
122 |
+
position: relative;
|
123 |
+
transition: background-color 0.2s ease;
|
124 |
+
user-select: none;
|
125 |
+
-webkit-user-select: none;
|
126 |
+
-moz-user-select: none;
|
127 |
+
overflow: hidden; /* Hide potential text overflow */
|
128 |
+
}
|
129 |
+
/* Make visually empty if no emoji */
|
130 |
+
.grid-cell:empty {
|
131 |
+
color: transparent;
|
132 |
+
}
|
133 |
+
|
134 |
+
/* Hover effect only on clickable cells */
|
135 |
+
.grid-cell:hover:not(.found-item) {
|
136 |
+
background-color: #d7ccc8;
|
137 |
+
}
|
138 |
+
|
139 |
+
/* Correct Cell Styling - item just found */
|
140 |
+
.grid-cell.just-found {
|
141 |
+
background-color: #a5d6a7 !important; /* Green highlight */
|
142 |
+
animation: pulse 0.5s;
|
143 |
+
}
|
144 |
+
/* Correct Cell Styling - item found previously */
|
145 |
+
.grid-cell.found-item {
|
146 |
+
background-color: #c8e6c9; /* Lighter green, no animation */
|
147 |
+
cursor: not-allowed; /* Indicate it's done */
|
148 |
+
}
|
149 |
+
|
150 |
+
/* Incorrect Cell Styling */
|
151 |
+
.grid-cell.incorrect {
|
152 |
+
background-color: #ef9a9a !important;
|
153 |
+
animation: shake 0.5s;
|
154 |
+
}
|
155 |
+
|
156 |
+
/* Animations */
|
157 |
+
@keyframes shake {
|
158 |
+
0%, 100% { transform: translateX(0); }
|
159 |
+
25% { transform: translateX(-4px); }
|
160 |
+
75% { transform: translateX(4px); }
|
161 |
+
}
|
162 |
+
@keyframes pulse {
|
163 |
+
0% { transform: scale(1); }
|
164 |
+
50% { transform: scale(1.1); }
|
165 |
+
100% { transform: scale(1); }
|
166 |
+
}
|
167 |
+
|
168 |
+
/* Feedback Text */
|
169 |
+
#feedback {
|
170 |
+
margin-top: 15px;
|
171 |
+
font-size: 1.2em;
|
172 |
+
font-weight: bold;
|
173 |
+
min-height: 25px; /* Prevent layout shift */
|
174 |
+
text-align: center;
|
175 |
+
}
|
176 |
+
#feedback.correct-feedback { color: #2e7d32; } /* Dark Green */
|
177 |
+
#feedback.incorrect-feedback { color: #c62828; } /* Dark Red */
|