/* E-008 CONTAINMENT PROTOCOL - STYLES */
/* Base & Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a1a0a;
  --bg2: #0d200d;
  --text: #33ff33;
  --text-dim: #1a8a1a;
  --amber: #ffaa00;
  --red: #ff3333;
  --blue: #00ccff;
  --white: #d0ffd0;
  --border: #1a3a1a;
  --font: 'Courier New', monospace;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0,255,0,0.03) 2px, rgba(0,255,0,0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* HEADER */
#site-header {
  border-bottom: 2px solid var(--amber);
  padding: 0;
  text-align: center;
}
.classification-bar {
  background: var(--amber);
  color: #000;
  font-size: 11px;
  font-weight: bold;
  padding: 4px 0;
  letter-spacing: 2px;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 16px 20px;
  background: var(--bg2);
}
.burp-seal {
  border: 2px solid var(--amber);
  border-radius: 50%;
  width: 60px; height: 60px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: bold; color: var(--amber);
  flex-shrink: 0;
}
h1 {
  font-size: 24px;
  color: var(--amber);
  text-shadow: 0 0 10px rgba(255,170,0,0.5);
  letter-spacing: 3px;
}
.doc-stamp {
  border: 2px solid var(--red);
  color: var(--red);
  padding: 4px 10px;
  font-size: 10px;
  transform: rotate(3deg);
  flex-shrink: 0;
  line-height: 1.3;
}

/* BRIEFING */
#briefing {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
}
#briefing h2 {
  color: var(--amber);
  font-size: 16px;
  margin-bottom: 12px;
}
.brief-text {
  margin-bottom: 6px;
  color: var(--white);
}
.highlight { color: var(--text); font-weight: bold; }
.warning { color: var(--red); font-weight: bold; }

/* GAME AREA */
#game-area {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}
.game-status-bar {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  font-size: 13px;
}
.game-split {
  display: flex;
  gap: 20px;
}
.grid-panel {
  flex: 0 0 420px;
}
.control-panel {
  flex: 1;
  min-width: 280px;
}
.panel-title {
  color: var(--amber);
  font-size: 14px;
  margin-bottom: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

/* GRID */
.grid-labels-top {
  display: grid;
  grid-template-columns: 30px repeat(5, 1fr);
  gap: 3px;
  margin-bottom: 3px;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
}
#containment-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  background: var(--border);
  border: 2px solid var(--amber);
  padding: 3px;
}
.grid-cell {
  aspect-ratio: 1;
  background: #0d1f0d;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
  min-height: 60px;
}
.grid-cell:hover { background: #1a2f1a; }
.grid-cell.edge { border-color: #442200; }
.grid-cell.yogurt {
  background: #2a1a2a;
  box-shadow: inset 0 0 20px rgba(255,100,255,0.3);
  animation: yogurt-pulse 1s ease-in-out infinite;
}
@keyframes yogurt-pulse {
  0%, 100% { box-shadow: inset 0 0 20px rgba(255,100,255,0.3); }
  50% { box-shadow: inset 0 0 30px rgba(255,100,255,0.6); }
}
.grid-cell.frozen {
  background: #0a1a2a;
  border-color: var(--blue);
  box-shadow: inset 0 0 15px rgba(0,200,255,0.4);
}
.grid-cell.bait {
  background: #1a2a1a;
  border-color: var(--text);
}
.grid-cell.stunned {
  background: #2a2a0a;
  animation: stun-flash 0.5s ease-in-out infinite;
}
@keyframes stun-flash {
  0%, 100% { background: #2a2a0a; }
  50% { background: #3a3a0a; }
}
.grid-cell .cell-label {
  position: absolute;
  top: 2px; left: 4px;
  font-size: 9px;
  color: var(--text-dim);
}

/* GRID LEGEND */
.grid-legend {
  display: flex;
  gap: 14px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-dim);
}
.legend-item { display: flex; align-items: center; gap: 4px; }
.legend-dot {
  width: 10px; height: 10px;
  border-radius: 2px;
}
.yogurt-dot { background: #cc66cc; }
.frozen-dot { background: var(--blue); }
.bait-dot { background: var(--text); }
.edge-dot { background: #442200; border: 1px solid #664400; }

/* TOOL BUTTONS */
.tool-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.tool-btn {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}
.tool-btn:hover:not(.on-cooldown) {
  border-color: var(--amber);
  background: #1a2f1a;
}
.tool-btn.active {
  border-color: var(--amber);
  background: #1a2a0a;
  box-shadow: 0 0 8px rgba(255,170,0,0.3);
}
.tool-btn.on-cooldown {
  opacity: 0.5;
  cursor: not-allowed;
}
.tool-icon { margin-right: 8px; }
.tool-name { font-weight: bold; }
.tool-hint {
  display: block;
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 2px;
}
.cooldown-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(0,0,0,0.5);
}
.cooldown-fill {
  height: 100%;
  width: 0%;
  background: var(--amber);
  transition: width 0.1s linear;
}

/* READOUTS */
.readouts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 16px;
}
.readout {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 6px 10px;
}
.readout label {
  display: block;
  font-size: 9px;
  color: var(--text-dim);
  margin-bottom: 2px;
}
.readout span {
  font-size: 14px;
  color: var(--amber);
  font-weight: bold;
}
/* EVENT LOG */
#event-log {
  background: #050f05;
  border: 1px solid var(--border);
  height: 200px;
  overflow-y: auto;
  padding: 8px;
  font-size: 11px;
  line-height: 1.6;
}
#event-log .log-line {
  border-bottom: 1px solid rgba(26,58,26,0.3);
  padding: 2px 0;
}
#event-log .log-line.warning { color: var(--amber); }
#event-log .log-line.danger { color: var(--red); }
#event-log .log-line.info { color: var(--blue); }

/* OVERLAYS */
.overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.overlay.hidden { display: none; }
.overlay-content {
  text-align: center;
  padding: 40px;
  border: 2px solid var(--amber);
  background: var(--bg);
  max-width: 500px;
}
.overlay-content h2 {
  color: var(--amber);
  font-size: 20px;
  margin-bottom: 12px;
}
.overlay-content p { margin-bottom: 12px; color: var(--white); }
.action-btn {
  background: var(--amber);
  color: #000;
  border: none;
  padding: 10px 24px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  letter-spacing: 1px;
  margin-top: 10px;
}
.action-btn:hover { background: #ffcc44; }
.breach-title { color: var(--red) !important; animation: breach-flash 0.5s infinite; }
@keyframes breach-flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.breach-msg { font-style: italic; color: var(--red) !important; }
.final-stats { margin: 16px 0; }
.final-stats p { font-size: 16px; }
/* INCIDENT HISTORY */
#incident-history, #field-notes {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px 20px;
  border-top: 1px solid var(--border);
}
#incident-history h2, #field-notes h2 {
  color: var(--amber);
  font-size: 16px;
  margin-bottom: 16px;
}
.log-entries { display: flex; flex-direction: column; gap: 10px; }
.log-entry {
  background: var(--bg2);
  border-left: 3px solid var(--text-dim);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--white);
  line-height: 1.6;
}
.log-entry.redacted {
  border-left-color: var(--red);
  color: var(--red);
}
.log-date { color: var(--amber); font-weight: bold; }
.log-agent { color: var(--text); font-weight: bold; }

/* FIELD NOTES */
.notes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.note {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 12px;
  font-size: 12px;
  color: var(--white);
  font-style: italic;
}
.note-author {
  display: block;
  margin-top: 6px;
  font-style: normal;
  color: var(--text);
  font-size: 11px;
}

/* WEBRING & FOOTER */
#webring-section {
  max-width: 900px;
  margin: 20px auto;
  padding: 20px;
  border-top: 1px solid var(--border);
}
footer {
  text-align: center;
  padding: 20px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-dim);
}
.footer-warn { color: var(--red); margin-top: 4px; font-size: 10px; }
/* RADAR SWEEP */
.grid-panel { position: relative; }
.grid-panel::after {
  content: '';
  position: absolute;
  top: 40px; left: 50%;
  width: 300px; height: 300px;
  margin-left: -150px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(51,255,51,0.08) 30deg,
    transparent 60deg
  );
  animation: radar-sweep 4s linear infinite;
  pointer-events: none;
  z-index: 1;
}
@keyframes radar-sweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* SCROLLBAR */
#event-log::-webkit-scrollbar { width: 6px; }
#event-log::-webkit-scrollbar-track { background: var(--bg); }
#event-log::-webkit-scrollbar-thumb { background: var(--border); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .game-split { flex-direction: column; }
  .grid-panel { flex: 1; }
  .notes-grid { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; gap: 10px; }
  .game-status-bar { font-size: 11px; }
}
