97 lines
2.3 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Task2 vanilla</title>
<style>
html,
body {
margin: 0;
background: #f3f5f8;
width: 100%;
height: 100%;
overflow: hidden;
font-family: "Avenir Next", "Segoe UI", sans-serif;
}
canvas {
display: block;
width: 100%;
height: 100%;
}
#state-panel {
position: fixed;
top: 16px;
left: 16px;
z-index: 10;
background: rgba(255, 255, 255, 0.82);
border: 1px solid rgba(0, 0, 0, 0.12);
border-radius: 12px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
padding: 12px;
display: flex;
flex-direction: column;
gap: 8px;
backdrop-filter: blur(6px);
}
#state-panel h2 {
margin: 0;
font-size: 14px;
letter-spacing: 0.03em;
color: #1b2530;
font-weight: 700;
}
.state-buttons {
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.state-btn {
border: 1px solid #cfd8e3;
background: #ffffff;
color: #203448;
border-radius: 8px;
padding: 8px 10px;
font-size: 13px;
cursor: pointer;
transition: all 0.2s ease;
}
.state-btn:hover {
border-color: #8ea2b8;
transform: translateY(-1px);
}
.state-btn.active {
background: #203448;
border-color: #203448;
color: #f4f8fb;
}
#hint {
margin: 0;
font-size: 12px;
color: #4f647a;
}
</style>
</head>
<body>
<div id="state-panel">
<h2>Scene States</h2>
<div class="state-buttons">
<button class="state-btn" data-state="state1">State 1 (1)</button>
<button class="state-btn" data-state="state2">State 2 (2)</button>
<button class="state-btn" data-state="state3">State 3 (3)</button>
</div>
<p id="hint">Press 1, 2, or 3 to switch state.</p>
</div>
<script type="module" src="/main.js"></script>
</body>
</html>