/**
 * Retro NES Contra Arcade Stylesheet
 * Author: Tiggy Chan
 * E-mail: tiggychan233@gmail.com
 */

/* Retro NES Contra Arcade Stylesheet */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

body {
  background-color: #050508;
  color: #f8f8f8;
  font-family: 'Press Start 2P', 'Courier New', Courier, monospace;
  font-size: 11px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  padding: 12px;
}

.arcade-cabinet {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(180deg, #181820 0%, #0d0d12 100%);
  border: 4px solid #3a3a4c;
  border-radius: 12px;
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.9), 0 0 15px rgba(248, 56, 0, 0.25);
  padding: 16px 20px 20px 20px;
  max-width: 100%;
}

.marquee {
  width: 100%;
  text-align: center;
  padding-bottom: 12px;
  border-bottom: 2px solid #2a2a3a;
  margin-bottom: 14px;
}

.marquee-title {
  font-size: 20px;
  letter-spacing: 3px;
  color: #f83800;
  text-shadow: 3px 3px 0 #0058f8, 5px 5px 0 #000;
  margin-bottom: 6px;
}

.marquee-subtitle {
  font-size: 9px;
  color: #f8b800;
  letter-spacing: 1px;
}

.screen-container {
  position: relative;
  width: 768px; /* 3x 256 */
  height: 720px; /* 3x 240 */
  max-width: 92vw;
  max-height: 70vh;
  aspect-ratio: 256 / 240;
  background-color: #000;
  border: 3px solid #222;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.95);
}

#game-canvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-crisp-edges;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* CRT Scanlines and curvature filter */
.crt-overlay {
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.35) 50%);
  background-size: 100% 4px;
  z-index: 10;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.crt-vignette {
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.7);
  border-radius: 4px;
  z-index: 11;
}

.crt-overlay.disabled {
  opacity: 0;
}

.control-panel {
  margin-top: 14px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.key-guide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  background-color: #121218;
  border: 1px solid #282834;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 9px;
  color: #b0b0c8;
}

.key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.key-badge {
  background-color: #242436;
  border: 1px solid #484860;
  border-radius: 3px;
  color: #f8b800;
  padding: 2px 6px;
  font-size: 8px;
  box-shadow: 0 2px 0 #111;
}

.action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.arcade-btn {
  background: linear-gradient(180deg, #d82000 0%, #881000 100%);
  color: #fff;
  border: 1px solid #f85898;
  border-radius: 4px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 9px;
  cursor: pointer;
  box-shadow: 0 3px 0 #500800;
  transition: transform 0.05s, box-shadow 0.05s;
}

.arcade-btn:hover {
  filter: brightness(1.15);
}

.arcade-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #500800;
}

.arcade-btn.secondary {
  background: linear-gradient(180deg, #0058f8 0%, #0028a0 100%);
  border-color: #6888fc;
  box-shadow: 0 3px 0 #001460;
}

.arcade-btn.secondary:active {
  box-shadow: 0 1px 0 #001460;
}

.author-badge {
  text-align: center;
  font-size: 8px;
  color: #8888a8;
  letter-spacing: 0.5px;
  margin-top: 6px;
}

.author-badge strong {
  color: #f8b800;
}

.author-badge a {
  color: #3cbcfc;
  text-decoration: none;
}

.author-badge a:hover {
  text-decoration: underline;
}
