@font-face {
  font-family: 'VT323';
  src: url('https://fonts.googleapis.com/css2?family=VT323&display=swap');
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #000;
  font-family: 'VT323', monospace;
  color: #0f0;
  overflow: hidden;
}

.game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
}

#gameCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#ui-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

#score-display {
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 24px;
  text-shadow: 0 0 5px #0f0;
}

#baud {
  display: inline-block;
  transform-origin: center;
  transition: all 0.3s ease;
}

#game-timer {
  position: absolute;
  bottom: 10px;
  left: 10px;
  color: #0f0;
  font-family: monospace;
  font-size: 20px;
  text-shadow: 0 0 5px #0f0;
}

#boost-meter {
  position: absolute;
  bottom: 30px;
  right: 30px;
  width: 200px;
}

#boost-label {
  font-size: 16px;
  margin-bottom: 5px;
  text-align: center;
}

#boost-bar {
  width: 100%;
  height: 20px;
  border: 2px solid #0f0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 10px #0f0;
}

#boost-fill {
  height: 100%;
  width: 0%;
  background-color: #0f0;
  transition: width 0.2s ease;
}

.hidden {
  display: none !important;
}

#game-over, #pause-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.8);
  pointer-events: auto;
}

#terminal, .terminal {
  width: 90%;
  max-width: 800px;
  background-color: #000;
  border: 2px solid #0f0;
  box-shadow: 0 0 20px #0f0;
  padding: 20px;
}

.terminal-header {
  text-align: center;
  font-size: 24px;
  margin-bottom: 20px;
  border-bottom: 1px solid #0f0;
  padding-bottom: 10px;
}

.terminal-content {
  font-size: 18px;
  line-height: 1.5;
  margin-bottom: 20px;
}

button {
  background-color: #000;
  color: #0f0;
  border: 2px solid #0f0;
  padding: 10px 20px;
  font-family: 'VT323', monospace;
  font-size: 18px;
  cursor: pointer;
  display: block;
  margin: 0 auto;
  box-shadow: 0 0 10px #0f0;
  transition: all 0.2s ease;
  pointer-events: auto;
}

button:hover {
  background-color: #0f0;
  color: #000;
}

#start-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #000;
  z-index: 3;
}

/* Connecting screen styles */
#connecting-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #000;
  z-index: 4;
}

#connecting-status {
  font-size: 32px;
  text-align: center;
  margin: 20px 0;
  animation: pulse 1.5s infinite;
}

.connecting-progress {
  width: 80%;
  height: 20px;
  border: 2px solid #0f0;
  margin: 20px auto;
  background: #000;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background-color: #0f0;
  transition: width 27s linear;
  transform-origin: left center;
  will-change: width;
}

@keyframes pulse {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

#start-screen h1,
#win-screen #terminal {
  font-size: 48px;
  margin-bottom: 40px;
  text-shadow: 0 0 20px #0f0;
  text-align: center;
}

#win-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 5;
}

.instructions {
  margin-bottom: 40px;
  font-size: 22px;
  text-align: center;
  line-height: 1.5;
}

.credits-table {
  margin: 20px auto;
  border-collapse: collapse;
  width: 95%;
}

.credits-table th,
.credits-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #0f03;
}

.credits-table th {
  color: #0f0;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.special-thanks {
  margin-top: 30px;
  color: #0f5;
  border-top: 1px solid #0f03;
  padding-top: 20px;
  line-height: 1.4;
}

/* Loading effect styles */
[style*="--reveal"] {
  clip-path: inset(calc(100% - var(--reveal)) 0 0 0);
}
