Update index.html

pull/1516/head
MR.NOBODY 2 months ago committed by GitHub
parent acaf91cfa9
commit 60efd3c772
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -19,6 +19,318 @@
<!-- Optional PWA hooks (files to be created later) -->
<link rel="manifest" href="manifest.webmanifest">
</head>
<style>
/* Space Game — CSS */
/* Typography + Theme */
:root {
--bg: #070a1a;
--bg-2: #0b1023;
--panel: rgba(12, 17, 38, 0.75);
--panel-solid: #0c1126;
--primary: #5ac8fa;
--accent: #a78bfa;
--danger: #ff6b6b;
--success: #34d399;
--warning: #fbbf24;
--text: #e6eaf2;
--muted: #9aa4bf;
--border: #192243;
--shadow: rgba(0, 0, 0, 0.6);
}
*,
*::before,
*::after {
box-sizing: border-box;
}
html, body {
height: 100%;
}
body {
margin: 0;
color: var(--text);
background:
radial-gradient(circle at 20% 10%, #0f1533 0%, transparent 50%),
radial-gradient(circle at 80% 30%, #0b1b3a 0%, transparent 40%),
radial-gradient(circle at 30% 80%, #111a39 0%, transparent 40%),
var(--bg);
font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
line-height: 1.5;
}
/* Header + Nav */
header {
position: sticky;
top: 0;
z-index: 20;
background: linear-gradient(180deg, rgba(7,10,26,0.85) 0%, rgba(7,10,26,0.6) 100%);
backdrop-filter: blur(6px);
border-bottom: 1px solid var(--border);
padding: 0.75rem 1rem;
}
header h1 {
margin: 0;
font-family: "Orbitron", "Poppins", sans-serif;
font-weight: 800;
letter-spacing: 0.5px;
display: inline-flex;
align-items: center;
gap: 0.6rem;
}
nav[aria-label="Primary"] {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin-top: 0.5rem;
}
nav[aria-label="Primary"] button {
appearance: none;
border: 1px solid var(--border);
background: linear-gradient(180deg, #121a3a 0%, #0d1430 100%);
color: var(--text);
border-radius: 10px;
padding: 0.55rem 0.85rem;
display: inline-flex;
align-items: center;
gap: 0.5rem;
cursor: pointer;
transition: transform 0.06s ease, box-shadow 0.2s ease, border-color 0.2s ease;
box-shadow: 0 2px 12px var(--shadow);
}
nav[aria-label="Primary"] button:hover {
border-color: var(--primary);
box-shadow: 0 4px 18px rgba(90, 200, 250, 0.25);
}
nav[aria-label="Primary"] button:active {
transform: translateY(1px) scale(0.98);
}
nav [data-action="start"] { background: linear-gradient(180deg, #10314a 0%, #0d2438 100%); }
nav [data-action="pause"] { background: linear-gradient(180deg, #1a1f3f 0%, #131936 100%); }
nav [data-action="reset"] { background: linear-gradient(180deg, #3b0d0d 0%, #2a0a0a 100%); }
nav [data-action="mute"][aria-pressed="true"] { background: linear-gradient(180deg, #3f1a1a 0%, #2a0e0e 100%); }
nav [data-action="fullscreen"] { background: linear-gradient(180deg, #162c3a 0%, #0f2331 100%); }
nav [data-action="open-settings"] { background: linear-gradient(180deg, #1a1440 0%, #13103a 100%); }
/* Main Layout */
main {
max-width: 1200px;
margin: 0 auto;
padding: 1rem;
}
/* HUD overlay */
#hud {
position: fixed;
left: 50%;
top: 64px;
transform: translateX(-50%);
width: min(100% - 2rem, 1180px);
z-index: 15;
}
#hud [role="status"] {
display: flex;
flex-wrap: wrap;
gap: 0.75rem 1rem;
align-items: center;
background: var(--panel);
border: 1px solid var(--border);
border-radius: 12px;
padding: 0.5rem 0.75rem;
backdrop-filter: blur(4px);
}
#hud span {
display: inline-flex;
align-items: center;
gap: 0.4rem;
color: var(--muted);
font-weight: 600;
}
#hud output {
color: var(--primary);
font-family: "Orbitron", "Poppins", sans-serif;
letter-spacing: 0.4px;
}
/* Canvas section */
#play {
position: relative;
margin-top: 1rem;
}
#play figure {
margin: 0;
border: 1px solid var(--border);
border-radius: 14px;
background:
radial-gradient(1200px 600px at 70% 30%, rgba(70, 78, 150, 0.15), transparent 60%),
radial-gradient(800px 400px at 20% 70%, rgba(88, 131, 186, 0.12), transparent 60%),
#081022;
box-shadow: 0 8px 28px rgba(0,0,0,0.45), inset 0 0 0 1px rgba(255,255,255,0.02);
overflow: hidden;
}
#play figcaption {
position: absolute;
z-index: 5;
inset: 0 auto auto 0;
margin: 0.5rem 0 0 0.5rem;
padding: 0.25rem 0.5rem;
background: rgba(8, 16, 34, 0.7);
border: 1px solid var(--border);
border-radius: 8px;
color: var(--muted);
font-size: 0.85rem;
}
#myCanvas {
display: block;
width: 100%;
height: auto;
background: linear-gradient(180deg, #000814 0%, #001d3d 100%);
}
/* Help + Leaderboard */
#help, #leaderboard {
margin-top: 1rem;
background: var(--panel);
border: 1px solid var(--border);
border-radius: 12px;
padding: 1rem;
}
#help h2, #leaderboard h2 {
margin-top: 0;
font-family: "Orbitron", "Poppins", sans-serif;
}
#help ul {
margin: 0.5rem 0 0 1rem;
padding: 0;
}
#scores {
margin: 0.5rem 0 0 1rem;
padding: 0;
}
#scores li {
margin: 0.25rem 0;
color: var(--text);
}
/* Dialogs */
dialog {
border: 1px solid var(--border);
border-radius: 14px;
padding: 1rem;
background: var(--panel-solid);
color: var(--text);
width: min(520px, calc(100% - 2rem));
box-shadow: 0 24px 60px rgba(0,0,0,0.55);
}
dialog header h2 {
margin: 0 0 0.5rem 0;
font-family: "Orbitron", "Poppins", sans-serif;
}
dialog section {
display: grid;
gap: 0.75rem;
margin-bottom: 0.5rem;
}
dialog label {
font-size: 0.95rem;
color: var(--muted);
}
dialog input[type="range"],
dialog select,
dialog input[type="url"],
dialog input[type="file"] {
width: 100%;
color: var(--text);
background: #0f1733;
border: 1px solid var(--border);
border-radius: 10px;
padding: 0.5rem;
}
dialog menu {
display: flex;
justify-content: flex-end;
gap: 0.5rem;
margin: 0;
padding: 0.5rem 0 0 0;
}
dialog button {
appearance: none;
border: 1px solid var(--border);
background: linear-gradient(180deg, #121a3a 0%, #0d1430 100%);
color: var(--text);
border-radius: 10px;
padding: 0.5rem 0.85rem;
cursor: pointer;
}
dialog::backdrop {
background: rgba(3, 6, 20, 0.6);
backdrop-filter: blur(3px);
}
/* Footer */
footer {
margin: 1rem 0;
color: var(--muted);
text-align: center;
}
/* Focus styles */
:focus-visible {
outline: 2px solid var(--primary);
outline-offset: 2px;
border-radius: 6px;
}
/* Fullscreen adjustments */
#play:fullscreen, /* section fullscreen */
#myCanvas:fullscreen {
background: #000;
}
#play:fullscreen #myCanvas,
#myCanvas:fullscreen {
width: 100vw;
height: 100vh;
}
/* Small screens */
@media (max-width: 600px) {
#hud [role="status"] {
justify-content: space-between;
}
nav[aria-label="Primary"] {
gap: 0.4rem;
}
nav[aria-label="Primary"] button {
padding: 0.5rem 0.65rem;
}
}
</style>
<body>
<a href="#play" aria-label="Skip to game">Skip to Game</a>

Loading…
Cancel
Save