/* styles.css */

/* Using Google Fonts  */
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Teko:wght@400;500;600;700&display=swap');


html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background: #060810;
  overflow: hidden;
  font-family: 'Share Tech Mono', monospace;
  color: #dce8f0;
}

/* Header Styles */
#game-header {
  width: 100%;
  max-width: 1280px;
  background: rgba(6, 10, 18, 0.98);
  border: 1px solid #1a3344;
  border-bottom: 2px solid #7ab0cc;
  box-sizing: border-box;
  position: relative;
}

.gameTitle {
  font-family: 'Teko', sans-serif;
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  color: #a8d4ed;
  text-shadow: 0 0 24px rgba(168, 212, 237, .4), 0 0 60px rgba(122, 176, 204, .1);
  text-transform: uppercase;
  line-height: 1;
}


.statusSymbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  color: #c0392b;
  border: 1px solid rgba(192, 57, 43, .4);
  padding: 6px 14px;
  text-transform: uppercase;
  background: rgba(192, 57, 43, .05);
  animation: blink 2.8s step-end infinite;
}

.status-cluster {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.statusSymbol::before {
  content: '▶ ';
  font-size: 0.5rem;
}

@keyframes blink {

  62%,
  68% {
    opacity: 0;
  }
}


/* Setup to have canvas center */
#shell {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
}

canvas#gameCanvas {
  display: block;
  width: 100%;
  height: auto;
  background: #050810;
  border: 1px solid #2a4a5a;
  outline: none;
}

/* Nav tabs */
#game-nav {
  display: flex;
  align-items: stretch;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 24px;
  cursor: pointer;
  letter-spacing: .22em;
  color: #2a4a5a;
  border-bottom: 2px solid transparent;
  border-right: 1px solid rgba(122, 176, 204, .06);
  transition: color .15s, background .15s;
  font-family: 'Teko', sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  text-transform: uppercase;
  user-select: none;
}

.nav-item:hover {
  color: #dce8f0;
  background: rgba(122, 176, 204, .04);
}

.nav-item.active {
  color: #a8d4ed;
  background: rgba(122, 176, 204, .06);
  border-bottom: 2px solid #7ab0cc;
}

/* Panels sit on top of the canvas */
#canvas-container {
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin: 15px 0;
}

.content-panel {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 16, 0.97);
  padding: 50px 60px;
  color: #dce8f0;
  overflow-y: auto;
  z-index: 1;
}

.content-panel.active {
  display: block;
}

.content-panel h2 {
  font-family: 'Teko', sans-serif;
  font-size: 3.5rem;
  font-weight: 600;
  letter-spacing: .15em;
  margin-bottom: 4px;
  color: #a8d4ed;
  text-transform: uppercase;
  line-height: 1;
}

/* Controls grid */
.controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 48px;
  max-width: 700px;
}

.ctrl-row {
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid rgba(122, 176, 204, .15);
  padding-bottom: 10px;
}

.ctrl-key {
  min-width: 90px;
  text-align: center;
  padding: 6px 12px;
  border: 1px solid #2a4a5a;
  color: #a8d4ed;
  font-size: .9rem;
  letter-spacing: .08em;
}

.ctrl-desc {
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: .9rem;
}

#game-footer {
  width: 100%;
  max-width: 1280px;
  background: rgba(8, 12, 20, 0.96);
  border: 1px solid #2a4a5a;
  border-top: 2px solid #7ab0cc;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 9px 22px;
  box-sizing: border-box;
}

.footer-center {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7ab0cc;
  box-shadow: 0 0 6px rgba(122, 176, 204, 0.8);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.3;
    transform: scale(0.6);
  }
}

.build-info {
  font-size: .85rem;
  letter-spacing: 0.12em;
  color: rgba(220, 232, 240, 0.25);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(100, 160, 200, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 160, 200, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 10;
  background: repeating-linear-gradient(to bottom,
      transparent 0px, transparent 3px,
      rgba(0, 0, 0, 0.09) 3px, rgba(0, 0, 0, 0.09) 4px);
  pointer-events: none;
}

.nv-vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at center, transparent 38%, rgba(2, 4, 10, 0.82) 100%);
  pointer-events: none;
}

#canvas-wrap {
  position: relative;
  width: 100%;
}

/* Corner brackets */
.corner-tl,
.corner-tr,
.corner-bl,
.corner-br {
  position: absolute;
  width: 18px;
  height: 18px;
  z-index: 3;
  pointer-events: none;
}

/* Get the Sharp corners in the canvas */
.corner-tl {
  top: -1px;
  left: -1px;
  border-top: 2px solid #7ab0cc;
  border-left: 2px solid #7ab0cc;
}

.corner-tr {
  top: -1px;
  right: -1px;
  border-top: 2px solid #7ab0cc;
  border-right: 2px solid #7ab0cc;
}

.corner-bl {
  bottom: -1px;
  left: -1px;
  border-bottom: 2px solid #7ab0cc;
  border-left: 2px solid #7ab0cc;
}

.corner-br {
  bottom: -1px;
  right: -1px;
  border-bottom: 2px solid #7ab0cc;
  border-right: 2px solid #7ab0cc;
}


.panel-rule {
  height: 1px;
  background: linear-gradient(90deg, #7ab0cc, transparent);
  margin: 12px 0 36px;
  width: 80%;
}

.about-lead {
  font-size: 1rem;
  letter-spacing: .15em;
  color: #a8d4ed;
  text-transform: uppercase;
  margin-bottom: 8px;
  margin-top: 28px;
}

.about-body {
  color: rgba(220, 232, 240, 0.65);
  line-height: 1.8;
  font-size: 1rem;
  max-width: 800px;
}

.about-stats {
  margin-top: 40px;
  display: flex;
  gap: 40px;
  font-size: 0.8rem;
  letter-spacing: .15em;
  color: #2a4a5a;
  border-top: 1px solid rgba(122, 176, 204, .15);
  padding-top: 20px;
}

.about-stats span {
  color: #a8d4ed;
  margin-left: 6px;
}

.header-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #7ab0cc 30%, #a8d4ed 50%, #7ab0cc 70%, transparent);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 22px 8px;
  border-bottom: 1px solid rgba(122, 176, 204, .08);
}

.logo-block {
  display: flex;
  flex-direction: column;
}


/* ── Nav bar ── */
.header-bottom {
  display: flex;
  align-items: stretch;
  height: 38px;
  padding: 0 4px;
}

.nav-readouts {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 18px;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  color: #2a4a5a;
  border-left: 1px solid rgba(122, 176, 204, .08);
}

.rval {
  color: #a8d4ed;
  margin-left: 3px;
}

.logo-rule {
  height: 2px;
  background: linear-gradient(90deg, #7ab0cc, transparent);
  margin-top: 3px;
  width: 100%;
}

#loading-overlay {
  position: absolute;
  inset: 0;
  background: #050810;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

#loading-overlay.hidden {
  opacity: 0;
}

.load-title {
  font-family: 'Teko', sans-serif;
  font-size: 5rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: #a8d4ed;
  text-shadow: 0 0 30px rgba(122, 176, 204, .35);
  line-height: 1;
  margin-bottom: 4px;
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
}

.dot {
  display: inline-block;
  font-size: 4.5rem;
  line-height: 1;
  animation: dotBounce 1.4s ease-in-out infinite;
  color: #a8d4ed;
  text-shadow: 0 0 20px rgba(122, 176, 204, .3);
}

.dot:nth-child(1) {
  animation-delay: 0s;
}

.dot:nth-child(2) {
  animation-delay: 0.15s;
}

.dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes dotBounce {

  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }

  40% {
    transform: translateY(-12px);
    opacity: 1;
    text-shadow: 0 0 25px rgba(122, 176, 204, .6), 0 0 45px rgba(168, 212, 237, .3);
  }
}

.load-bar-wrap {
  width: 260px;
  height: 2px;
  background: #1a2a36;
  overflow: hidden;
}

.load-bar {
  height: 100%;
  width: 0;
  background: #7ab0cc;
  box-shadow: 0 0 8px rgba(122, 176, 204, .7);
  transition: width 0.3s ease;
}

@keyframes loadProg {
  from {
    width: 0
  }

  to {
    width: 100%
  }
}

.load-status {
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  color: #2a4a5a;
  margin-top: 12px;
  text-transform: uppercase;
}

.load-percent {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #a8d4ed;
  margin: 8px 0 4px;
  text-shadow: 0 0 10px rgba(122, 176, 204, .4);
  animation: percentPulse 0.3s ease;
}

@keyframes percentPulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.05);
    opacity: 0.85;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}


body.game-active::before,
body.game-active::after {
  display: none !important;
}

/* ── Audio Controls ── */
.nav-audio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-left: 1px solid rgba(122, 176, 204, .08);
  border-right: 1px solid rgba(122, 176, 204, .08);
}

.audio-toggle {
  background: transparent;
  border: 1px solid #2a4a5a;
  color: #2a4a5a;
  font-family: 'Teko', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  padding: 3px 10px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  text-transform: uppercase;
}

.audio-toggle:hover,
.audio-toggle.active {
  color: #a8d4ed;
  border-color: #7ab0cc;
}

/* Custom range slider */
#audioSlider {
  -webkit-appearance: none;
  appearance: none;
  width: 90px;
  height: 2px;
  background: #1a3344;
  outline: none;
  cursor: pointer;
  position: relative;
}

/* The filled track — use a CSS custom property updated by JS */
#audioSlider {
  background: linear-gradient(to right,
      #7ab0cc 0%,
      #7ab0cc var(--val, 50%),
      #1a3344 var(--val, 50%),
      #1a3344 100%);
}

#audioSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 0;
  /* square — matches your angular UI aesthetic */
  background: #a8d4ed;
  box-shadow: 0 0 6px rgba(122, 176, 204, .7);
  cursor: pointer;
  transition: transform .1s;
}

#audioSlider::-webkit-slider-thumb:hover {
  transform: scale(1.3);
  box-shadow: 0 0 12px rgba(168, 212, 237, .8);
}

#audioSlider::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 0;
  border: none;
  background: #a8d4ed;
  box-shadow: 0 0 6px rgba(122, 176, 204, .7);
  cursor: pointer;
}