| 1 | /* Meteors — responsive, portrait-friendly, no page scroll during play. */ |
| 2 | *, *::before, *::after { box-sizing: border-box; } |
| 3 | |
| 4 | html, body { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | width: 100%; |
| 8 | height: 100%; |
| 9 | overflow: hidden; |
| 10 | background: #0b1020; |
| 11 | color: #e8eaf2; |
| 12 | font-family: "Segoe UI", system-ui, -apple-system, sans-serif; |
| 13 | touch-action: none; |
| 14 | -webkit-user-select: none; |
| 15 | user-select: none; |
| 16 | -webkit-tap-highlight-color: transparent; |
| 17 | } |
| 18 | |
| 19 | #stars { |
| 20 | position: fixed; |
| 21 | inset: 0; |
| 22 | pointer-events: none; |
| 23 | background: |
| 24 | radial-gradient(1px 1px at 12% 18%, #fff 0 50%, transparent 51%), |
| 25 | radial-gradient(1px 1px at 28% 72%, #cde 0 50%, transparent 51%), |
| 26 | radial-gradient(1.5px 1.5px at 47% 32%, #fff 0 50%, transparent 51%), |
| 27 | radial-gradient(1px 1px at 63% 81%, #bbd 0 50%, transparent 51%), |
| 28 | radial-gradient(1px 1px at 81% 22%, #fff 0 50%, transparent 51%), |
| 29 | radial-gradient(1.5px 1.5px at 91% 64%, #def 0 50%, transparent 51%), |
| 30 | radial-gradient(1px 1px at 8% 88%, #fff 0 50%, transparent 51%), |
| 31 | radial-gradient(2px 2px at 72% 48%, #89a 0 50%, transparent 51%), |
| 32 | linear-gradient(180deg, #0b1020 0%, #141a33 55%, #1a1440 100%); |
| 33 | z-index: 0; |
| 34 | } |
| 35 | |
| 36 | .screen { |
| 37 | position: fixed; |
| 38 | inset: 0; |
| 39 | z-index: 5; |
| 40 | display: flex; |
| 41 | flex-direction: column; |
| 42 | align-items: center; |
| 43 | justify-content: center; |
| 44 | padding: 24px 20px; |
| 45 | text-align: center; |
| 46 | } |
| 47 | |
| 48 | .screen[hidden], #hud[hidden], #game-over[hidden] { display: none !important; } |
| 49 | |
| 50 | h1 { |
| 51 | font-size: clamp(48px, 14vw, 96px); |
| 52 | letter-spacing: 0.06em; |
| 53 | margin: 0 0 8px; |
| 54 | font-weight: 800; |
| 55 | background: linear-gradient(180deg, #fff6c8 0%, #ff9a3a 45%, #e85d3a 100%); |
| 56 | -webkit-background-clip: text; |
| 57 | background-clip: text; |
| 58 | color: transparent; |
| 59 | filter: drop-shadow(0 2px 12px rgba(232, 93, 58, 0.55)); |
| 60 | } |
| 61 | |
| 62 | .tagline { |
| 63 | margin: 0 0 28px; |
| 64 | font-size: clamp(15px, 3.6vw, 20px); |
| 65 | color: #c5cae0; |
| 66 | max-width: 28em; |
| 67 | } |
| 68 | |
| 69 | #btn-play { |
| 70 | appearance: none; |
| 71 | border: 0; |
| 72 | cursor: pointer; |
| 73 | font: inherit; |
| 74 | font-size: clamp(20px, 5vw, 28px); |
| 75 | font-weight: 700; |
| 76 | letter-spacing: 0.08em; |
| 77 | text-transform: uppercase; |
| 78 | color: #1a1020; |
| 79 | background: linear-gradient(180deg, #ffe27a, #f0c53a 40%, #e89a20); |
| 80 | padding: 14px 48px; |
| 81 | border-radius: 999px; |
| 82 | box-shadow: |
| 83 | 0 0 0 3px rgba(255, 220, 120, 0.25), |
| 84 | 0 8px 24px rgba(240, 197, 58, 0.45); |
| 85 | touch-action: manipulation; |
| 86 | min-height: 52px; |
| 87 | min-width: 200px; |
| 88 | } |
| 89 | |
| 90 | #btn-play:is(:hover, :focus-visible) { |
| 91 | transform: translateY(-1px); |
| 92 | box-shadow: |
| 93 | 0 0 0 3px rgba(255, 220, 120, 0.4), |
| 94 | 0 10px 28px rgba(240, 197, 58, 0.6); |
| 95 | } |
| 96 | |
| 97 | #btn-play:active { transform: translateY(1px); } |
| 98 | |
| 99 | .last-score { |
| 100 | margin: 22px 0 0; |
| 101 | font-size: clamp(16px, 4vw, 22px); |
| 102 | color: #ffe27a; |
| 103 | } |
| 104 | |
| 105 | .hint { |
| 106 | margin: 36px auto 0; |
| 107 | max-width: 32em; |
| 108 | font-size: clamp(13px, 3.2vw, 16px); |
| 109 | line-height: 1.45; |
| 110 | color: #8e95b3; |
| 111 | } |
| 112 | |
| 113 | #hud { |
| 114 | position: fixed; |
| 115 | top: 0; |
| 116 | left: 0; |
| 117 | right: 0; |
| 118 | z-index: 4; |
| 119 | display: flex; |
| 120 | justify-content: space-between; |
| 121 | align-items: flex-start; |
| 122 | padding: calc(8px + env(safe-area-inset-top, 0px)) 14px 4px; |
| 123 | pointer-events: none; |
| 124 | text-shadow: 0 1px 4px #000; |
| 125 | gap: 12px; |
| 126 | } |
| 127 | |
| 128 | .hud-label { |
| 129 | font-size: 11px; |
| 130 | letter-spacing: 0.14em; |
| 131 | text-transform: uppercase; |
| 132 | color: #9aa3c2; |
| 133 | } |
| 134 | |
| 135 | #score { |
| 136 | font-size: clamp(28px, 8vw, 42px); |
| 137 | font-weight: 800; |
| 138 | line-height: 1; |
| 139 | color: #fff6c8; |
| 140 | } |
| 141 | |
| 142 | #planet-name { |
| 143 | font-weight: 700; |
| 144 | font-size: clamp(14px, 3.5vw, 18px); |
| 145 | text-align: right; |
| 146 | } |
| 147 | |
| 148 | #planet-stats { |
| 149 | font-variant-numeric: tabular-nums; |
| 150 | font-size: clamp(11px, 2.8vw, 14px); |
| 151 | color: #b7bdd4; |
| 152 | text-align: right; |
| 153 | white-space: nowrap; |
| 154 | } |
| 155 | |
| 156 | .overlay { |
| 157 | background: rgba(8, 10, 22, 0.78); |
| 158 | backdrop-filter: blur(6px); |
| 159 | } |
| 160 | |
| 161 | .overlay h2 { |
| 162 | font-size: clamp(32px, 9vw, 56px); |
| 163 | margin: 0 0 8px; |
| 164 | color: #ffb0a0; |
| 165 | } |
| 166 | |
| 167 | .go-score { |
| 168 | font-size: clamp(20px, 5vw, 28px); |
| 169 | color: #ffe27a; |
| 170 | margin-top: 18px; |
| 171 | } |
| 172 | |
| 173 | /* Framework canvases sit on the body. Keep them above the starfield, below HUD. */ |
| 174 | canvas { |
| 175 | z-index: 2; |
| 176 | touch-action: none; |
| 177 | display: block; |
| 178 | } |
| 179 | |
| 180 | /* Very narrow / short phones: shrink hints so the Play button stays on screen. */ |
| 181 | @media (max-height: 520px) { |
| 182 | .hint { display: none; } |
| 183 | h1 { font-size: 42px; } |
| 184 | #btn-play { padding: 10px 36px; } |
| 185 | } |
projects-timfalken-com meteors