SandGame/index.css

449 lines
9.9 KiB
CSS
Raw Permalink Normal View History

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');
2026-10-22 14:05:51 +00:00
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
background-color: #111215;
color: #e2e8f0;
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
2026-10-22 14:05:51 +00:00
position: fixed;
width: 100%;
height: 100%;
overflow: hidden;
user-select: none;
-webkit-user-select: none;
2026-10-22 14:05:51 +00:00
}
canvas {
border: none;
background-color: #111215;
2026-10-22 14:05:51 +00:00
display: block;
width: 100%;
height: 100%;
touch-action: none;
cursor: crosshair;
2026-10-22 14:05:51 +00:00
}
/* ==========================================================================
Elements Drawer (Left)
========================================================================== */
2026-10-22 14:05:51 +00:00
#elementDrawer {
position: fixed;
top: 0;
left: 0;
width: 180px;
2026-10-22 14:05:51 +00:00
height: 100%;
background: rgba(18, 20, 26, 0.92);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
border-right: 1px solid rgba(255, 255, 255, 0.1);
box-shadow: 4px 0 24px rgba(0, 0, 0, 0.45);
transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
2026-10-22 14:05:51 +00:00
z-index: 1000;
}
#elementDrawer.closed {
transform: translateX(-180px);
2026-10-22 14:05:51 +00:00
}
#toggleElements {
position: absolute;
left: 100%;
top: 14px;
height: 38px;
padding: 0 14px;
background: rgba(28, 32, 42, 0.95);
backdrop-filter: blur(12px);
border: 1px solid rgba(255, 255, 255, 0.12);
border-left: none;
color: #f1f5f9;
2026-10-22 14:05:51 +00:00
cursor: pointer;
border-radius: 0 8px 8px 0;
font-family: 'Inter', sans-serif;
font-size: 13px;
font-weight: 600;
2026-10-22 14:05:51 +00:00
white-space: nowrap;
display: flex;
align-items: center;
gap: 6px;
box-shadow: 4px 2px 12px rgba(0, 0, 0, 0.3);
transition: background 0.15s, color 0.15s;
}
#toggleElements:hover {
background: rgba(40, 46, 60, 0.98);
color: #fff;
2026-10-22 14:05:51 +00:00
}
#elementContent {
height: 100%;
overflow-y: auto;
padding: 14px 10px 24px 10px;
2026-10-22 14:05:51 +00:00
display: flex;
flex-direction: column;
gap: 12px;
2026-10-22 14:05:51 +00:00
}
#elementContent::-webkit-scrollbar {
width: 5px;
}
#elementContent::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.15);
border-radius: 4px;
}
/* Brush Size Header in Drawer */
.brush-size-box {
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 8px;
2026-10-22 14:05:51 +00:00
padding: 10px;
display: flex;
flex-direction: column;
gap: 6px;
}
.brush-size-header {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
color: #94a3b8;
}
.brush-val {
font-family: 'JetBrains Mono', monospace;
font-size: 11px;
background: rgba(255, 255, 255, 0.1);
padding: 2px 6px;
border-radius: 4px;
color: #f8fafc;
}
.brush-slider {
-webkit-appearance: none;
appearance: none;
width: 100%;
height: 5px;
border-radius: 3px;
background: rgba(255, 255, 255, 0.15);
outline: none;
}
.brush-slider::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 14px;
height: 14px;
border-radius: 50%;
background: #38bdf8;
2026-10-22 14:05:51 +00:00
cursor: pointer;
box-shadow: 0 0 6px rgba(56, 189, 248, 0.6);
}
/* Categories */
.element-category {
display: flex;
flex-direction: column;
gap: 5px;
}
.category-title {
font-size: 10px;
font-weight: 700;
2026-10-22 14:05:51 +00:00
text-transform: uppercase;
letter-spacing: 0.8px;
color: #64748b;
margin-top: 4px;
padding-left: 2px;
}
/* Element Buttons */
.element-btn {
position: relative;
padding: 8px 10px;
border: 1px solid rgba(255, 255, 255, 0.15);
border-radius: 6px;
cursor: pointer;
font-family: 'Inter', sans-serif;
font-size: 12px;
font-weight: 600;
color: #ffffff;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
transition: transform 0.1s, box-shadow 0.1s, border-color 0.1s;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.element-btn:hover {
transform: translateY(-1px);
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
filter: brightness(1.08);
2026-10-22 14:05:51 +00:00
}
.element-btn:active {
transform: translateY(1px);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
2026-10-22 14:05:51 +00:00
}
.element-btn.selected {
border: 2px solid #ffffff;
box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4), 0 4px 14px rgba(0, 0, 0, 0.5);
transform: scale(1.02);
}
.hotkey-badge {
font-family: 'JetBrains Mono', monospace;
font-size: 10px;
font-weight: 600;
background: rgba(0, 0, 0, 0.35);
border: 1px solid rgba(255, 255, 255, 0.2);
padding: 1px 5px;
border-radius: 4px;
color: #ffffff;
}
/* ==========================================================================
Quick Controls (Pause & Step)
========================================================================== */
#quickControls {
position: absolute;
right: 100%;
top: 60px;
display: flex;
flex-direction: column;
gap: 8px;
margin-right: 10px;
}
#togglePause, #btnStep {
width: 38px;
height: 38px;
background: rgba(28, 32, 42, 0.95);
backdrop-filter: blur(12px);
border: 1px solid rgba(255, 255, 255, 0.12);
color: #f1f5f9;
cursor: pointer;
border-radius: 8px;
font-size: 16px;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
transition: background 0.15s, transform 0.1s, border-color 0.15s;
}
#togglePause:hover, #btnStep:hover {
background: rgba(45, 52, 68, 0.98);
border-color: rgba(255, 255, 255, 0.25);
2026-10-22 14:05:51 +00:00
transform: scale(1.05);
}
#togglePause:active, #btnStep:active {
transform: scale(0.96);
}
/* ==========================================================================
Settings Drawer (Right)
========================================================================== */
2026-10-22 14:05:51 +00:00
#settingsDrawer {
position: fixed;
top: 0;
right: 0;
width: 310px;
2026-10-22 14:05:51 +00:00
height: 100%;
background: rgba(18, 20, 26, 0.94);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
border-left: 1px solid rgba(255, 255, 255, 0.1);
box-shadow: -4px 0 24px rgba(0, 0, 0, 0.45);
transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
2026-10-22 14:05:51 +00:00
z-index: 1000;
transform: translateX(310px);
2026-10-22 14:05:51 +00:00
}
#settingsDrawer.open {
transform: translateX(0);
2026-10-22 14:05:51 +00:00
}
#toggleDrawer {
position: absolute;
right: 100%;
top: 14px;
height: 38px;
padding: 0 14px;
background: rgba(28, 32, 42, 0.95);
backdrop-filter: blur(12px);
border: 1px solid rgba(255, 255, 255, 0.12);
border-right: none;
color: #f1f5f9;
2026-10-22 14:05:51 +00:00
cursor: pointer;
border-radius: 8px 0 0 8px;
font-family: 'Inter', sans-serif;
font-size: 13px;
font-weight: 600;
2026-10-22 14:05:51 +00:00
white-space: nowrap;
display: flex;
align-items: center;
gap: 6px;
box-shadow: -4px 2px 12px rgba(0, 0, 0, 0.3);
transition: background 0.15s, color 0.15s;
2026-10-22 14:05:51 +00:00
}
#toggleDrawer:hover {
background: rgba(40, 46, 60, 0.98);
color: #fff;
}
#settingsContent {
height: 100%;
overflow-y: auto;
padding: 16px 18px 40px 18px;
}
#settingsContent::-webkit-scrollbar {
width: 5px;
}
#settingsContent::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.15);
border-radius: 4px;
2026-10-22 14:05:51 +00:00
}
.setting-group {
margin-bottom: 16px;
background: rgba(255, 255, 255, 0.03);
border: 1px solid rgba(255, 255, 255, 0.07);
border-radius: 8px;
padding: 12px;
2026-10-22 14:05:51 +00:00
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.setting-group h3 {
2026-10-22 14:05:51 +00:00
width: 100%;
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.8px;
color: #38bdf8;
margin-bottom: 2px;
2026-10-22 14:05:51 +00:00
}
.setting-group fieldset {
width: 100%;
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 6px;
padding: 8px 10px;
font-size: 12px;
}
.setting-group legend {
padding: 0 4px;
font-size: 11px;
color: #94a3b8;
2026-10-22 14:05:51 +00:00
}
.setting-control {
display: grid;
grid-template-columns: 1.2fr 2fr 0.6fr;
2026-10-22 14:05:51 +00:00
align-items: center;
gap: 8px;
2026-10-22 14:05:51 +00:00
font-size: 12px;
width: 100%;
color: #cbd5e1;
2026-10-22 14:05:51 +00:00
}
.setting-control input[type=range] {
-webkit-appearance: none;
appearance: none;
2026-10-22 14:05:51 +00:00
width: 100%;
height: 5px;
border-radius: 3px;
background: rgba(255, 255, 255, 0.15);
outline: none;
}
.setting-control input[type=range]::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 13px;
height: 13px;
border-radius: 50%;
background: #38bdf8;
cursor: pointer;
}
.control-val {
font-family: 'JetBrains Mono', monospace;
font-size: 11px;
text-align: right;
color: #94a3b8;
2026-10-22 14:05:51 +00:00
}
.setting-checkbox {
display: flex;
align-items: center;
gap: 8px;
2026-10-22 14:05:51 +00:00
width: calc(50% - 5px);
font-size: 12px;
color: #cbd5e1;
cursor: pointer;
}
.setting-checkbox input[type=checkbox] {
accent-color: #38bdf8;
width: 15px;
height: 15px;
cursor: pointer;
}
.reset-defaults-btn {
width: 100%;
padding: 10px;
background: rgba(239, 68, 68, 0.15);
border: 1px solid rgba(239, 68, 68, 0.35);
color: #fca5a5;
border-radius: 6px;
cursor: pointer;
font-family: 'Inter', sans-serif;
font-size: 13px;
font-weight: 600;
transition: background 0.15s, border-color 0.15s;
margin-top: 10px;
}
.reset-defaults-btn:hover {
background: rgba(239, 68, 68, 0.25);
border-color: rgba(239, 68, 68, 0.55);
color: #ffffff;
2026-10-22 14:05:51 +00:00
}
@media (max-width: 768px) {
#elementDrawer {
width: 150px;
2026-10-22 14:05:51 +00:00
}
#elementDrawer.closed {
transform: translateX(-150px);
2026-10-22 14:05:51 +00:00
}
#settingsDrawer {
width: 270px;
transform: translateX(270px);
2026-10-22 14:05:51 +00:00
}
#settingsDrawer.open {
transform: translateX(0);
2026-10-22 14:05:51 +00:00
}
.setting-checkbox {
width: 100%;
}
}