Skip to content
Source
Sign inSign up
samwillis/one-million-boxes
Open History to see the last commit

global.css

257 lines4.6 KB

1/* Import mobile-specific styles - must be at top */
2@import "./mobile.css";
3​
4/* Neon docs use Inter for body text and headings, including medium weights. */
5@font-face {
6 font-family: "Inter";
7 font-style: normal;
8 font-weight: 100 900;
9 font-display: swap;
10 src: url("/fonts/Inter-Latin.woff2") format("woff2");
12​
13:root {
14 /* Team colors */
15 --color-red: #e53935;
16 --color-blue: #1e88e5;
17 --color-green: #43a047;
18 --color-yellow: #fdd835;
19​
20 /* Team fill colors (with alpha for watercolor effect) */
21 --color-red-fill: rgba(229, 57, 53, 0.5);
22 --color-blue-fill: rgba(30, 136, 229, 0.5);
23 --color-green-fill: rgba(67, 160, 71, 0.5);
24 --color-yellow-fill: rgba(253, 216, 53, 0.5);
25​
26 /* Neon docs neutrals and brand accent; team colors stay independent. */
27 --color-bg: #fafafa;
28 --color-surface: #ffffff;
29 --color-surface-hover: #f2f2f3;
30 --color-surface-active: #efeff0;
31 --color-text: #131415;
32 --color-border: #e4e5e7;
33 --color-border-strong: #c9cbcf;
34 --color-muted: #61646b;
35 --color-accent: #00e599;
36 --color-accent-hover: #00cc88;
37 --color-link: #087f5b;
38​
39 /* Raised game controls share a firm outline and a small physical edge. */
40 --hud-outline: #42464d;
41 --hud-border-width: 1px;
42 --hud-edge: #b8bcc2;
43 --hud-radius: 10px;
44 --hud-shadow: 0 3px 0 var(--hud-edge), 0 5px 10px rgb(19 20 21 / 8%);
45​
46 /* Quota colors */
47 --quota-full: #43a047;
48 --quota-mid: #ffc107;
49 --quota-low: #e53935;
50​
51 /* Spacing */
52 --header-height: 56px;
53 --bottom-controls-height: 56px;
54 --bottom-dial-size: 56px;
55 --minimap-size: 150px;
56 --minimap-margin: 16px;
57​
58 /* Touch targets */
59 --touch-min: 44px;
60​
61 /* Shadows */
62 --shadow-sm: 0 1px 2px rgba(19, 20, 21, 0.04);
63 --shadow-md: 0 4px 16px rgba(19, 20, 21, 0.06);
64 --shadow-lg: 0 12px 40px rgba(19, 20, 21, 0.12);
65​
66 /* Border radius */
67 --radius-sm: 4px;
68 --radius-md: 8px;
69 --radius-lg: 12px;
70​
71 /* Transitions */
72 --transition-fast: 150ms ease;
73 --transition-normal: 250ms ease;
75​
76/* Reset */
77*,
78*::before,
79*::after {
80 box-sizing: border-box;
81 margin: 0;
82 padding: 0;
84​
85html,
86body {
87 height: 100%;
88 overflow: hidden;
90​
91html,
92body {
93 /* White background for iOS Safari safe areas (notch, home indicator) */
94 background-color: #ffffff;
96​
97body {
98 font-family:
99 "Inter",
100 system-ui,
101 -apple-system,
102 BlinkMacSystemFont,
103 "Segoe UI",
104 Roboto,
105 sans-serif;
106 color: var(--color-text);
107 line-height: 1.5;
108 letter-spacing: -0.01em;
109 -webkit-font-smoothing: antialiased;
110 -moz-osx-font-smoothing: grayscale;
112​
113/* App root */
114#root {
115 height: 100%;
116 display: flex;
117 flex-direction: column;
119​
120/* App loading state */
121.app-loading {
122 display: flex;
123 align-items: center;
124 justify-content: center;
125 height: 100%;
126 background: #ffffff;
128​
129.app-loading-spinner {
130 width: 40px;
131 height: 40px;
132 border: 3px solid var(--color-border);
133 border-top-color: var(--color-link);
134 border-radius: 50%;
135 animation: app-spin 0.8s linear infinite;
137​
138@keyframes app-spin {
139 to {
140 transform: rotate(360deg);
141 }
143​
144/* Typography */
145h1,
146h2,
147h3,
148h4,
149h5,
150h6 {
151 font-weight: 500;
152 line-height: 1.25;
153 letter-spacing: -0.04em;
155​
156/* Buttons */
157button {
158 font: inherit;
159 cursor: pointer;
160 border: none;
161 background: none;
163​
164button:disabled {
165 cursor: not-allowed;
166 opacity: 0.5;
168​
169input {
170 font: inherit;
172​
173/* Links */
174a {
175 color: inherit;
176 text-decoration: none;
178​
179/* Focus styles for accessibility */
180:focus-visible {
181 outline: 2px solid var(--color-link);
182 outline-offset: 2px;
184​
185/* Utility classes */
186.visually-hidden {
187 position: absolute;
188 width: 1px;
189 height: 1px;
190 padding: 0;
191 margin: -1px;
192 overflow: hidden;
193 clip: rect(0, 0, 0, 0);
194 white-space: nowrap;
195 border: 0;
197​
198/* Team color utilities */
199.team-red {
200 color: var(--color-red);
202​
203.team-blue {
204 color: var(--color-blue);
206​
207.team-green {
208 color: var(--color-green);
210​
211.team-yellow {
212 color: var(--color-yellow);
214​
215.team-red-bg {
216 background-color: var(--color-red);
218​
219.team-blue-bg {
220 background-color: var(--color-blue);
222​
223.team-green-bg {
224 background-color: var(--color-green);
226​
227.team-yellow-bg {
228 background-color: var(--color-yellow);
230​
231/* ============================================
232 Responsive Breakpoints
233 ============================================ */
234​
235/* Large screens */
236@media (min-width: 1024px) {
237 :root {
238 --minimap-size: 180px;
239 }
241​
242/* Tablet/Mobile (< 768px) */
243@media (max-width: 768px) {
244 :root {
245 --header-height: 60px;
246 --minimap-size: 120px;
247 --minimap-margin: 8px;
248 --touch-min: 44px;
249 }
251​
252/* Very small screens (< 400px) */
253@media (max-width: 400px) {
254 :root {
255 --minimap-size: 100px;
256 }