| 1 |
/** |
| 2 |
* Alphabet Soup — game window styles. |
| 3 |
* |
| 4 |
* Scoped to `.soup`. The board is a Pixi canvas painting the pot; |
| 5 |
* the HUD, the find-list side panel, and the overlays are DOM |
| 6 |
* layered around it. Dark, warm, arcade-bright accents. |
| 7 |
*/ |
| 8 |
|
| 9 |
.soup { |
| 10 |
position: relative; |
| 11 |
display: flex; |
| 12 |
flex-direction: column; |
| 13 |
height: 100%; |
| 14 |
width: 100%; |
| 15 |
background: #150d28; |
| 16 |
overflow: hidden; |
| 17 |
container-type: inline-size; |
| 18 |
} |
| 19 |
|
| 20 |
.soup__hud { |
| 21 |
display: flex; |
| 22 |
align-items: center; |
| 23 |
gap: 16px; |
| 24 |
padding: 8px 14px; |
| 25 |
background: rgba( 20, 12, 40, 0.95 ); |
| 26 |
color: #f3efff; |
| 27 |
font-variant-numeric: tabular-nums; |
| 28 |
font-size: 13px; |
| 29 |
} |
| 30 |
|
| 31 |
.soup__hud-score { |
| 32 |
font-weight: 700; |
| 33 |
} |
| 34 |
|
| 35 |
.soup__hud-streak { |
| 36 |
color: #ffd166; |
| 37 |
font-weight: 700; |
| 38 |
min-width: 2.5em; |
| 39 |
} |
| 40 |
|
| 41 |
.soup__hud-timer { |
| 42 |
color: #90e0ef; |
| 43 |
font-weight: 600; |
| 44 |
} |
| 45 |
|
| 46 |
.soup__hud-timer--low { |
| 47 |
color: #ff5470; |
| 48 |
animation: soup-timer-pulse 1s ease-in-out infinite; |
| 49 |
} |
| 50 |
|
| 51 |
@keyframes soup-timer-pulse { |
| 52 |
50% { |
| 53 |
opacity: 0.45; |
| 54 |
} |
| 55 |
} |
| 56 |
|
| 57 |
.soup__hud-wave { |
| 58 |
color: #c77dff; |
| 59 |
} |
| 60 |
|
| 61 |
.soup__hud-ribbon { |
| 62 |
padding: 2px 10px; |
| 63 |
border-radius: 999px; |
| 64 |
background: #8e44ad; |
| 65 |
color: #fff; |
| 66 |
font-weight: 600; |
| 67 |
} |
| 68 |
|
| 69 |
/* Always the HUD's last child — pinned to the far end. */ |
| 70 |
.soup__hud-sound { |
| 71 |
margin-inline-start: auto; |
| 72 |
padding: 2px 6px; |
| 73 |
border: 0; |
| 74 |
border-radius: 6px; |
| 75 |
background: transparent; |
| 76 |
font-size: 15px; |
| 77 |
line-height: 1; |
| 78 |
cursor: pointer; |
| 79 |
} |
| 80 |
|
| 81 |
.soup__hud-sound:hover, |
| 82 |
.soup__hud-sound:focus-visible { |
| 83 |
background: rgba( 243, 239, 255, 0.18 ); |
| 84 |
} |
| 85 |
|
| 86 |
.soup__body { |
| 87 |
display: flex; |
| 88 |
flex: 1; |
| 89 |
min-height: 0; |
| 90 |
} |
| 91 |
|
| 92 |
.soup__stage { |
| 93 |
position: relative; |
| 94 |
flex: 1; |
| 95 |
min-width: 0; |
| 96 |
min-height: 0; |
| 97 |
} |
| 98 |
|
| 99 |
.soup__canvas { |
| 100 |
position: absolute; |
| 101 |
inset: 0; |
| 102 |
width: 100%; |
| 103 |
height: 100%; |
| 104 |
touch-action: none; |
| 105 |
} |
| 106 |
|
| 107 |
/* The find-list side panel — the pot's menu card. */ |
| 108 |
.soup__words { |
| 109 |
display: flex; |
| 110 |
flex-direction: column; |
| 111 |
gap: 8px; |
| 112 |
width: 148px; |
| 113 |
padding: 14px 12px; |
| 114 |
background: rgba( 255, 255, 255, 0.04 ); |
| 115 |
border-inline-start: 1px solid rgba( 255, 255, 255, 0.08 ); |
| 116 |
overflow-y: auto; |
| 117 |
} |
| 118 |
|
| 119 |
.soup__words-heading { |
| 120 |
margin: 0; |
| 121 |
color: rgba( 243, 239, 255, 0.65 ); |
| 122 |
font-size: 11px; |
| 123 |
font-weight: 700; |
| 124 |
letter-spacing: 0.08em; |
| 125 |
text-transform: uppercase; |
| 126 |
} |
| 127 |
|
| 128 |
.soup__words-list { |
| 129 |
display: flex; |
| 130 |
flex-direction: column; |
| 131 |
gap: 6px; |
| 132 |
margin: 0; |
| 133 |
padding: 0; |
| 134 |
list-style: none; |
| 135 |
} |
| 136 |
|
| 137 |
.soup__word-chip { |
| 138 |
margin: 0; |
| 139 |
padding: 4px 10px; |
| 140 |
border: 1px solid rgba( 243, 239, 255, 0.25 ); |
| 141 |
border-radius: 999px; |
| 142 |
color: #f3efff; |
| 143 |
font-size: 12px; |
| 144 |
font-weight: 700; |
| 145 |
letter-spacing: 0.06em; |
| 146 |
text-align: center; |
| 147 |
transition: opacity 0.25s ease, border-color 0.25s ease, color 0.25s ease; |
| 148 |
} |
| 149 |
|
| 150 |
.soup__word-chip--found { |
| 151 |
opacity: 0.55; |
| 152 |
text-decoration: line-through; |
| 153 |
} |
| 154 |
|
| 155 |
/* Narrow windows: the menu card slides under the pot. */ |
| 156 |
@container (max-width: 620px) { |
| 157 |
.soup__body { |
| 158 |
flex-direction: column; |
| 159 |
} |
| 160 |
|
| 161 |
.soup__words { |
| 162 |
flex-direction: row; |
| 163 |
flex-wrap: wrap; |
| 164 |
align-items: center; |
| 165 |
width: auto; |
| 166 |
max-height: 96px; |
| 167 |
border-inline-start: 0; |
| 168 |
border-block-start: 1px solid rgba( 255, 255, 255, 0.08 ); |
| 169 |
} |
| 170 |
|
| 171 |
.soup__words-heading { |
| 172 |
flex-basis: 100%; |
| 173 |
} |
| 174 |
|
| 175 |
.soup__words-list { |
| 176 |
flex-direction: row; |
| 177 |
flex-wrap: wrap; |
| 178 |
} |
| 179 |
} |
| 180 |
|
| 181 |
.soup__overlay { |
| 182 |
position: absolute; |
| 183 |
inset: 0; |
| 184 |
display: grid; |
| 185 |
place-items: center; |
| 186 |
background: rgba( 12, 7, 24, 0.6 ); |
| 187 |
cursor: pointer; |
| 188 |
z-index: 5; |
| 189 |
overflow-y: auto; |
| 190 |
} |
| 191 |
|
| 192 |
.soup__overlay[hidden] { |
| 193 |
display: none; |
| 194 |
} |
| 195 |
|
| 196 |
.soup__overlay-message { |
| 197 |
margin: 0; |
| 198 |
padding: 14px 22px; |
| 199 |
border-radius: 10px; |
| 200 |
background: #241736; |
| 201 |
color: #f3efff; |
| 202 |
font-size: 16px; |
| 203 |
box-shadow: 0 8px 30px rgba( 0, 0, 0, 0.35 ); |
| 204 |
} |
| 205 |
|
| 206 |
.soup__over-panel { |
| 207 |
display: flex; |
| 208 |
flex-direction: column; |
| 209 |
align-items: center; |
| 210 |
gap: 10px; |
| 211 |
max-width: min( 480px, 92% ); |
| 212 |
padding: 22px 28px; |
| 213 |
border-radius: 14px; |
| 214 |
background: #241736; |
| 215 |
color: #f3efff; |
| 216 |
box-shadow: 0 8px 30px rgba( 0, 0, 0, 0.4 ); |
| 217 |
cursor: default; |
| 218 |
text-align: center; |
| 219 |
} |
| 220 |
|
| 221 |
.soup__over-heading { |
| 222 |
margin: 0; |
| 223 |
font-size: 20px; |
| 224 |
font-weight: 700; |
| 225 |
} |
| 226 |
|
| 227 |
.soup__over-stats { |
| 228 |
margin: 0; |
| 229 |
font-size: 14px; |
| 230 |
color: rgba( 243, 239, 255, 0.85 ); |
| 231 |
} |
| 232 |
|
| 233 |
.soup__over-save { |
| 234 |
margin: 0; |
| 235 |
font-size: 12px; |
| 236 |
color: rgba( 243, 239, 255, 0.55 ); |
| 237 |
} |
| 238 |
|
| 239 |
/* The share card preview — the real 1200×630 canvas, scaled down. */ |
| 240 |
.soup__share-canvas { |
| 241 |
width: 100%; |
| 242 |
max-width: 360px; |
| 243 |
border-radius: 10px; |
| 244 |
box-shadow: 0 6px 24px rgba( 0, 0, 0, 0.45 ); |
| 245 |
} |
| 246 |
|
| 247 |
.soup__share-actions { |
| 248 |
display: flex; |
| 249 |
align-items: center; |
| 250 |
gap: 10px; |
| 251 |
} |
| 252 |
|
| 253 |
.soup__share-status { |
| 254 |
font-size: 12px; |
| 255 |
color: #ffd166; |
| 256 |
} |
| 257 |
|
| 258 |
.soup__over-actions { |
| 259 |
display: flex; |
| 260 |
gap: 10px; |
| 261 |
margin-block-start: 6px; |
| 262 |
} |
| 263 |
|
| 264 |
.soup__button { |
| 265 |
padding: 6px 16px; |
| 266 |
border-radius: 8px; |
| 267 |
border: 1px solid rgba( 243, 239, 255, 0.5 ); |
| 268 |
background: transparent; |
| 269 |
color: #f3efff; |
| 270 |
font: inherit; |
| 271 |
cursor: pointer; |
| 272 |
} |
| 273 |
|
| 274 |
.soup__button--primary { |
| 275 |
background: #ffd166; |
| 276 |
border-color: #ffd166; |
| 277 |
color: #241736; |
| 278 |
font-weight: 700; |
| 279 |
} |
| 280 |
|
| 281 |
.soup__button:hover { |
| 282 |
filter: brightness( 1.15 ); |
| 283 |
} |
| 284 |
|
| 285 |
.soup__over-replay { |
| 286 |
margin: 0; |
| 287 |
max-width: 340px; |
| 288 |
font-size: 12px; |
| 289 |
color: #ffd166; |
| 290 |
} |
| 291 |
|
| 292 |
/* Pre-game mode menu. */ |
| 293 |
|
| 294 |
.soup__menu { |
| 295 |
cursor: default; |
| 296 |
} |
| 297 |
|
| 298 |
/* Pot-size picker — one worldwide puzzle per size. */ |
| 299 |
.soup__menu-sizes { |
| 300 |
display: flex; |
| 301 |
gap: 8px; |
| 302 |
margin-block-start: 2px; |
| 303 |
} |
| 304 |
|
| 305 |
.soup__size-chip { |
| 306 |
padding: 4px 12px; |
| 307 |
border-radius: 999px; |
| 308 |
border: 1px solid rgba( 243, 239, 255, 0.3 ); |
| 309 |
background: transparent; |
| 310 |
color: #f3efff; |
| 311 |
font-size: 12px; |
| 312 |
font-weight: 600; |
| 313 |
cursor: pointer; |
| 314 |
} |
| 315 |
|
| 316 |
.soup__size-chip:hover, |
| 317 |
.soup__size-chip:focus-visible { |
| 318 |
border-color: rgba( 255, 209, 102, 0.7 ); |
| 319 |
} |
| 320 |
|
| 321 |
.soup__size-chip--current { |
| 322 |
background: #ffd166; |
| 323 |
border-color: #ffd166; |
| 324 |
color: #241736; |
| 325 |
} |
| 326 |
|
| 327 |
.soup__menu-option-played { |
| 328 |
font-size: 11px; |
| 329 |
color: #ffd166; |
| 330 |
max-width: 170px; |
| 331 |
} |
| 332 |
|
| 333 |
.soup__menu-options { |
| 334 |
display: flex; |
| 335 |
gap: 12px; |
| 336 |
margin-block-start: 4px; |
| 337 |
} |
| 338 |
|
| 339 |
.soup__menu-option { |
| 340 |
display: flex; |
| 341 |
flex-direction: column; |
| 342 |
align-items: center; |
| 343 |
gap: 6px; |
| 344 |
min-width: 150px; |
| 345 |
padding: 14px 16px; |
| 346 |
border-radius: 10px; |
| 347 |
border: 1px solid rgba( 243, 239, 255, 0.3 ); |
| 348 |
background: rgba( 255, 255, 255, 0.05 ); |
| 349 |
color: #f3efff; |
| 350 |
font: inherit; |
| 351 |
cursor: pointer; |
| 352 |
transition: transform 0.12s ease, box-shadow 0.12s ease; |
| 353 |
} |
| 354 |
|
| 355 |
.soup__menu-option:hover, |
| 356 |
.soup__menu-option:focus-visible { |
| 357 |
transform: translateY( -2px ); |
| 358 |
box-shadow: 0 6px 18px rgba( 0, 0, 0, 0.35 ); |
| 359 |
} |
| 360 |
|
| 361 |
.soup__menu-option--current { |
| 362 |
border-color: #ffd166; |
| 363 |
box-shadow: inset 0 0 0 1px #ffd166; |
| 364 |
} |
| 365 |
|
| 366 |
.soup__menu-option-label { |
| 367 |
font-size: 17px; |
| 368 |
font-weight: 700; |
| 369 |
} |
| 370 |
|
| 371 |
.soup__menu-option-hint { |
| 372 |
font-size: 12px; |
| 373 |
color: rgba( 243, 239, 255, 0.65 ); |
| 374 |
max-width: 170px; |
| 375 |
} |
| 376 |
|