coastkeeper-sim / style.css
kevinconka's picture
Implement Coastal Surveillance Simulator with HTML, CSS, and JavaScript. Added interactive canvas for simulation, control panel for camera and boat settings, and responsive design for better usability.
c40323b
raw
history blame
6.81 kB
html,
body,
#app {
height: 100%;
margin: 0;
}
body {
overflow: hidden;
}
.coastal-surveillance-sim {
--bg0: #080e14;
--bg1: #0c1520;
--bg2: #111d2c;
--bg3: #162030;
--accent: #4a9eff;
--accent-dim: rgba(74, 158, 255, 0.18);
--accent-glow: rgba(74, 158, 255, 0.08);
--text: #c8daf0;
--text-muted: #4a6a8a;
--text-dim: #2a4a6a;
--border: rgba(74, 158, 255, 0.15);
--border-bright: rgba(74, 158, 255, 0.35);
--danger: #ff4a4a;
--success: #00e5a0;
--warn: #ffcc44;
--font: 'Courier New', monospace;
box-sizing: border-box;
width: 100%;
min-height: 100%;
height: 100%;
background: var(--bg0);
color: var(--text);
font-family: var(--font);
font-size: 13px;
overflow: hidden;
display: grid;
grid-template-columns: 1fr 252px;
grid-template-rows: 38px 1fr;
}
.coastal-surveillance-sim *,
.coastal-surveillance-sim *::before,
.coastal-surveillance-sim *::after {
box-sizing: border-box;
}
#header {
grid-column: 1 / -1;
padding: 0 16px;
border-bottom: 1px solid var(--border);
background: var(--bg1);
display: flex;
align-items: center;
gap: 16px;
}
#header h1 {
font-size: 11px;
font-weight: normal;
letter-spacing: 0.18em;
color: var(--accent);
text-transform: uppercase;
}
#header .sub {
font-size: 10px;
color: var(--text-muted);
letter-spacing: 0.08em;
}
#header .spacer {
flex: 1;
}
#header .hstat {
font-size: 10px;
letter-spacing: 0.1em;
color: var(--text-muted);
display: flex;
align-items: center;
gap: 5px;
}
#header .hstat span {
color: var(--accent);
}
.blink {
display: inline-block;
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--success);
animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink {
0%,
100% {
opacity: 1;
}
50% {
opacity: 0.15;
}
}
#canvas-wrap {
position: relative;
background: var(--bg0);
overflow: hidden;
}
#canvas-wrap canvas {
display: block;
width: 100%;
height: 100%;
}
.zoom-bar {
position: absolute;
bottom: 10px;
right: 10px;
display: flex;
align-items: center;
gap: 4px;
z-index: 10;
}
.zoom-label {
font-family: var(--font);
font-size: 10px;
color: var(--accent);
min-width: 34px;
text-align: center;
letter-spacing: 0.08em;
}
#panel {
background: var(--bg1);
border-left: 1px solid var(--border);
padding: 10px;
overflow-y: auto;
display: flex;
flex-direction: column;
gap: 8px;
}
.section {
border: 1px solid var(--border);
background: var(--bg2);
}
.section-title {
font-size: 9px;
letter-spacing: 0.2em;
text-transform: uppercase;
color: var(--accent);
padding: 5px 8px;
background: rgba(74, 158, 255, 0.05);
border-bottom: 1px solid var(--border);
}
.section-body {
padding: 8px;
}
.stats-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1px;
background: var(--border);
}
.stat {
background: var(--bg2);
padding: 6px 8px;
}
.stat .lbl {
font-size: 8px;
letter-spacing: 0.14em;
text-transform: uppercase;
color: var(--text-muted);
margin-bottom: 2px;
}
.stat .val {
font-size: 15px;
color: var(--text);
letter-spacing: 0.02em;
}
.stat .val.active {
color: var(--success);
}
.stat .val.inactive {
color: var(--danger);
}
.stats-extra {
margin-top: 1px;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1px;
background: var(--border);
}
.stats-extra .stat-risk {
grid-column: 1 / -1;
border-top: 1px solid rgba(255, 74, 74, 0.2);
}
.st-sm {
font-size: 13px;
}
.stat-sub {
font-size: 9px;
color: var(--text-muted);
opacity: 0.5;
margin-top: 2px;
letter-spacing: 0.06em;
}
.risk-row {
display: flex;
align-items: center;
gap: 8px;
margin-top: 3px;
}
.st-risk-val {
font-size: 14px;
min-width: 38px;
}
.risk-track {
flex: 1;
height: 3px;
background: rgba(255, 255, 255, 0.06);
overflow: hidden;
}
.risk-fill {
height: 100%;
width: 0%;
background: #ff4a4a;
transition: width 0.4s;
}
.ctrl {
margin-bottom: 8px;
}
.ctrl:last-child {
margin-bottom: 0;
}
.ctrl label {
display: flex;
justify-content: space-between;
font-size: 10px;
color: var(--text-muted);
margin-bottom: 3px;
letter-spacing: 0.06em;
text-transform: uppercase;
}
.ctrl label span {
color: var(--text);
font-size: 11px;
}
input[type='range'] {
width: 100%;
-webkit-appearance: none;
height: 2px;
background: rgba(74, 158, 255, 0.15);
outline: none;
cursor: pointer;
}
input[type='range']::-webkit-slider-thumb {
-webkit-appearance: none;
width: 10px;
height: 10px;
background: var(--accent);
cursor: pointer;
border-radius: 50%;
box-shadow: 0 0 4px rgba(74, 158, 255, 0.6);
}
input[type='range']::-moz-range-thumb {
width: 10px;
height: 10px;
background: var(--accent);
cursor: pointer;
border-radius: 50%;
border: none;
}
.dir-toggle {
display: flex;
gap: 4px;
margin-top: 4px;
}
.dir-btn {
flex: 1;
padding: 5px 4px;
background: var(--bg3);
border: 1px solid var(--border);
color: var(--text-muted);
font-family: var(--font);
font-size: 10px;
letter-spacing: 0.1em;
cursor: pointer;
text-align: center;
text-transform: uppercase;
transition: all 0.12s;
}
.dir-btn:hover {
border-color: var(--accent);
color: var(--accent);
}
.dir-btn.active {
background: var(--accent-dim);
border-color: var(--accent);
color: var(--accent);
}
.hint {
font-size: 9px;
color: var(--text-muted);
letter-spacing: 0.04em;
line-height: 1.7;
opacity: 0.7;
}
.hint-s {
color: #ff6b6b;
}
.hint-e {
color: #ff9944;
}
.legend {
display: flex;
flex-direction: column;
gap: 4px;
}
.leg-item {
display: flex;
align-items: center;
gap: 7px;
font-size: 10px;
color: var(--text-muted);
}
.leg-dot {
width: 7px;
height: 7px;
border-radius: 50%;
flex-shrink: 0;
}
.leg-dot--cam {
background: #4a9eff;
}
.leg-dot--boat {
background: #ff4a4a;
}
.leg-dot--det {
background: #00e5a0;
}
.leg-line {
width: 14px;
height: 1px;
flex-shrink: 0;
}
.leg-line--rings {
background: rgba(74, 158, 255, 0.4);
}
.leg-line--arc {
background: rgba(74, 158, 255, 0.25);
border-top: 1px dashed rgba(74, 158, 255, 0.4);
height: 0;
padding-top: 1px;
}
.zoom-btn {
width: 26px;
height: 26px;
background: rgba(8, 14, 20, 0.9);
border: 1px solid var(--border-bright);
color: var(--text);
font-family: var(--font);
font-size: 15px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: border-color 0.12s;
}
.zoom-btn:hover {
border-color: var(--accent);
color: var(--accent);
}
@media (max-width: 700px) {
.coastal-surveillance-sim {
grid-template-columns: 1fr;
grid-template-rows: 38px 55vw 1fr;
}
#panel {
border-left: none;
border-top: 1px solid var(--border);
}
}