|
| 1 | +@font-face { |
| 2 | + font-family: "Crash-a-Like"; |
| 3 | + src: url("/crash-a-like.ttf") format("truetype"); |
| 4 | +} |
| 5 | + |
1 | 6 | .game-container { |
2 | 7 | position: fixed; |
3 | 8 | top: 0; |
|
11 | 16 | height: 100%; |
12 | 17 | } |
13 | 18 |
|
14 | | -.game-container > .loading-overlay { |
| 19 | +.game-container > .heads-up-display { |
15 | 20 | position: absolute; |
16 | 21 | top: 0; |
17 | 22 | left: 0; |
|
25 | 30 | gap: 20px; |
26 | 31 | background-color: #6e4063; |
27 | 32 | opacity: 1; |
28 | | - transition: opacity 1s ease-in-out; |
| 33 | + backdrop-filter: blur(10px); |
| 34 | + transition: opacity 0.5s ease-in-out, background-color 2s ease-in-out; |
| 35 | +} |
| 36 | + |
| 37 | +.game-container.is-loaded > .heads-up-display { |
| 38 | + background-color: #6e406383; |
29 | 39 | } |
30 | 40 |
|
31 | | -.game-container > .loading-overlay.loaded { |
| 41 | +.game-container.is-started > .heads-up-display { |
32 | 42 | opacity: 0; |
33 | 43 | pointer-events: none; |
34 | 44 | } |
35 | 45 |
|
36 | | -.game-container > .loading-overlay > .game-logo { |
| 46 | +.game-container > .heads-up-display > .game-logo, |
| 47 | +.game-container > .heads-up-display > .start-button { |
37 | 48 | width: 80%; |
38 | 49 | max-width: 300px; |
| 50 | + transition: opacity 0.3s ease-in-out, transform 0.1s ease-in-out; |
39 | 51 | } |
40 | 52 |
|
41 | | -.game-container > .loading-overlay > .loading-indicator-bar { |
42 | | - width: 80%; |
43 | | - max-width: 200px; |
44 | | - height: 20px; |
45 | | - background-color: #ffffff73; |
46 | | - border-radius: 10px; |
47 | | - box-shadow: 0 0 20px rgba(0, 0, 0, 0.2); |
48 | | - overflow: hidden; |
| 53 | +.game-container > .heads-up-display > .start-button { |
| 54 | + opacity: 0; |
| 55 | + pointer-events: none; |
| 56 | + cursor: pointer; |
49 | 57 | } |
50 | 58 |
|
51 | | -.game-container |
52 | | - > .loading-overlay |
53 | | - > .loading-indicator-bar |
54 | | - > .loading-indicator-fill { |
55 | | - width: 0; |
56 | | - height: 100%; |
57 | | - background-image: linear-gradient(0deg, #ffa229, #ff6f61); |
58 | | - transition: width 0.5s ease-in-out; |
| 59 | +.game-container > .heads-up-display > .start-button:hover { |
| 60 | + transform: scale(1.05); |
59 | 61 | } |
60 | 62 |
|
61 | | -.game-container > .main-menu { |
62 | | - position: absolute; |
63 | | - top: 0; |
64 | | - left: 0; |
65 | | - width: 100%; |
66 | | - height: 100%; |
67 | | - display: flex; |
68 | | - flex-direction: column; |
69 | | - align-items: center; |
70 | | - justify-content: center; |
71 | | - gap: 20px; |
72 | | - z-index: 90; |
73 | | - background-color: rgba(110, 64, 99, 0.5); |
74 | | - backdrop-filter: blur(5px); |
75 | | - transition: opacity 0.5s ease-in-out; |
| 63 | +.game-container > .heads-up-display > .start-button:active { |
| 64 | + transform: scale(0.95); |
76 | 65 | } |
77 | 66 |
|
78 | | -.game-container > .main-menu.started { |
79 | | - opacity: 0; |
80 | | - pointer-events: none; |
| 67 | +.game-container.is-started > .heads-up-display > .game-logo, |
| 68 | +.game-container.is-started > .heads-up-display > .start-button { |
| 69 | + transform: scale(0); |
81 | 70 | } |
82 | 71 |
|
83 | | -.game-container > .main-menu > .game-logo, |
84 | | -.game-container > .main-menu > .start-button { |
| 72 | +.game-container.is-loaded > .heads-up-display > .start-button { |
| 73 | + opacity: 1; |
| 74 | + pointer-events: auto; |
| 75 | +} |
| 76 | + |
| 77 | +.game-container > .heads-up-display > .loading-bar { |
85 | 78 | width: 80%; |
86 | | - max-width: 300px; |
| 79 | + max-width: 200px; |
| 80 | + height: 20px; |
| 81 | + background-color: #ffffff73; |
| 82 | + border-radius: 10px; |
| 83 | + box-shadow: 0 0 20px rgba(0, 0, 0, 0.2); |
| 84 | + overflow: hidden; |
| 85 | + transition: opacity 0.2s ease-in-out; |
87 | 86 | } |
88 | 87 |
|
89 | | -.game-container > .main-menu > .start-button { |
90 | | - cursor: pointer; |
91 | | - transition: transform 0.2s ease-in-out; |
| 88 | +.game-container.is-loaded > .heads-up-display > .loading-bar { |
| 89 | + opacity: 0; |
92 | 90 | } |
93 | 91 |
|
94 | | -.game-container > .main-menu > .start-button:hover { |
95 | | - transform: scale(1.05); |
| 92 | +.game-container > .heads-up-display > .loading-bar > .loading-fill { |
| 93 | + width: 0; |
| 94 | + height: 100%; |
| 95 | + background-image: linear-gradient(0deg, #ffa229, #ff6f61); |
| 96 | + transition: width 0.1s ease-in-out; |
96 | 97 | } |
97 | 98 |
|
98 | 99 | .game-container > .score-display { |
99 | 100 | position: absolute; |
100 | 101 | top: 20px; |
101 | 102 | left: 20px; |
| 103 | + right: 20px; |
102 | 104 | z-index: 80; |
103 | | - font-size: 60px; |
104 | | - font-family: "Trebuchet MS", sans-serif; |
| 105 | + font-size: 10rem; |
| 106 | + font-family: "Crash-a-Like", sans-serif; |
105 | 107 | font-weight: bold; |
106 | | - background: linear-gradient(90deg, #ffa229, #ff6f61); |
107 | | - background-clip: text; |
108 | | - color: transparent; |
109 | | - text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2); |
| 108 | + color: #ffa229; |
| 109 | + text-shadow: 0 0 5px #ff6f61, 0 0 20px rgba(224, 210, 175, 0.3); |
| 110 | + text-align: center; |
110 | 111 | } |
111 | 112 |
|
112 | 113 | .game-container > .fps-counter { |
113 | 114 | position: absolute; |
114 | | - top: 10px; |
| 115 | + bottom: 10px; |
115 | 116 | left: 10px; |
116 | 117 | right: 10px; |
117 | 118 | z-index: 70; |
118 | 119 | color: yellow; |
119 | | - font-family: "Courier New", Courier, monospace; |
120 | | - font-size: 14px; |
| 120 | + font-family: monospace; |
| 121 | + font-size: 1rem; |
121 | 122 | text-align: center; |
122 | 123 | pointer-events: none; |
123 | 124 | } |
0 commit comments