  @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
  @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&text=◊♦&display=swap');

	@font-face {
		font-family: 'tt';
		src: url('../fonts/26/tt_regular.woff') format('woff2'),
			url('../fonts/26/tt_regular.woff2') format('woff'),
			url('../fonts/26/tt_regular.ttf') format('truetype');
		font-weight: 400;
		font-style: normal;

	}

	@font-face {
		font-family: 'tt';
		src: url('../fonts/26/tt_italic.woff') format('woff2'),
			url('../fonts/26/tt_italic.woff2') format('woff'),
			url('../fonts/26/tt_italic.ttf') format('truetype');
		font-weight: 400;
		font-style: italic;

	}

	@font-face {
		font-family: 'tt';
		src: url('../fonts/26/tt_bold.woff') format('woff2'),
			url('../fonts/26/tt_bold.woff2') format('woff'),
			url('../fonts/26/tt_bold.ttf') format('truetype');
		font-weight: 700;
		font-style: normal;

	}

	@font-face {
		font-family: 'tt';
		src: url('../fonts/26/tt_bold_italic.woff') format('woff2'),
			url('../fonts/26/tt_bold_italic.woff2') format('woff'),
			url('../fonts/26/tt_bold_italic.ttf') format('truetype');
		font-weight: 700;
		font-style: italic;

	}

  :root {
    --green: #39ff14;
    --amber: #ffb000;
    --red: #ff2020;
    --blue: #00cfff;
    --crt-bg: #050a0a;
    --scanline: rgba(0,0,0,0.18);
    --cabinet-white: #e8e8e4;
    --cabinet-shadow: #b0b0a8;
    --bezel: #111;
  }

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

  html, body {
	background-image: url("../images/home26.jpg");
	min-height: 100%;
	height: 100%;
	overflow: hidden;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	background-attachment: fixed;
    font-family: 'Share Tech Mono', monospace;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0;
  }

  /* ── CABINET SHELL ── */
  .cabinet {
    width: 100%;
    max-width: 420px;
	min-width: 420px;
	min-height: 100svh;
	height: 100svh;
	margin-top: 8px;
    background: var(--cabinet-white);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: -8px 0 32px rgba(0,0,0,0.7), 8px 0 32px rgba(0,0,0,0.7);
    overflow: hidden;
    border-radius: 60px 60px 0 0;
}

  /* ── MARQUEE BEZEL HOUSING ── */
  .marquee-housing {
    width: 92%;
    background: #2a2a2a;
    border-radius: 40px 40px 6px 6px;
    margin-top: 4px;
    padding: 8px;
    box-shadow:
      inset 0 4px 12px rgba(0,0,0,0.8),
      0 4px 16px rgba(0,0,0,0.5);
  }

  /* ── TOP MARQUEE ── */
  .marquee-bar {
    width: 100%;
    background: linear-gradient(180deg, #222 0%, #111 100%);
    border-bottom: 4px solid #333;
    padding: 10px 0 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
    overflow: hidden;
    border-radius: 14px 14px 4px 4px;
  }
  .marquee-bar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--green);
  }
  .marquee-title {
	margin-top: 2px;
	filter: drop-shadow(0 0 10px rgba(0, 255, 0, 0.6)) drop-shadow(0 0 20px rgba(0, 255, 0, 0.2));
    animation: flicker 4s infinite;
  }
  .marquee-title img {
	width: 75%;
	display: block;
	margin-left: auto;
  	margin-right: auto;
	height: auto;
  }
  @keyframes flicker {
    0%,96%,100% { opacity: 1; }
    97% { opacity: 0.6; }
    98% { opacity: 1; }
    99% { opacity: 0.4; }
  }

  /* ── BEZEL / MONITOR HOUSING ── */
  .monitor-housing {
    width: 92%;
    background: #2a2a2a;
    border-radius: 8px 8px 4px 4px;
    margin: 12px 0px 12px 0px;
    padding: 10px;
    box-shadow:
      inset 0 4px 12px rgba(0,0,0,0.8),
      0 4px 20px rgba(0,0,0,0.5);
    position: relative;
    display: flex;
    flex-direction: column;
  }

  /* ── CRT SCREEN ── */
  .crt-screen {
    width: 100%;
	height: 310px;
	min-height: 310px;
	max-height: 310px;
    background: var(--crt-bg);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    border: 3px solid #000;
    box-shadow:
      inset 0 0 60px rgba(0, 207, 255, 0.05),
      inset 0 0 120px rgba(0,0,0,0.6),
      0 0 30px rgba(57, 255, 20, 0.15);
  }

  /* scanlines */
  .crt-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
      0deg,
      var(--scanline) 0px,
      var(--scanline) 1px,
      transparent 1px,
      transparent 3px
    );
    pointer-events: none;
    z-index: 100;
    border-radius: 4px;
  }

  /* CRT glass curve reflection */
  .crt-screen::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
      ellipse at 30% 25%,
      rgba(255,255,255,0.04) 0%,
      transparent 60%
    );
    pointer-events: none;
    z-index: 101;
  }

  /* phosphor glow overlay */
  .phosphor-glow {
    position: absolute;
    inset: 0;
    border-radius: 4px;
    background: radial-gradient(
      ellipse at 50% 50%,
      rgba(57,255,20,0.03) 0%,
      transparent 70%
    );
    pointer-events: none;
    z-index: 99;
  }

  /* ── SCREEN CONTENT ── */
  .screen-content {
    position: relative;
    z-index: 10;
    height: 100%;
	width: 100%;
    flex-direction: column;
    color: var(--green);
    font-family: 'Press Start 2P', monospace;
    font-size: 7px;
    padding: 4px 10px 12px 10px;
    overflow: hidden;
  }

  a, a:visited {
	color: inherit;
  }

  /* score bar */
  .score-bar {
    display: flex;
    justify-content: space-between;
    color: var(--blue);
    font-size: 13px;
    margin-top: 4px;
    border-bottom: 1px solid rgba(0,207,255,0.2);
    padding-bottom: 6px;
  }
  .score-bar .logout { 
	color: var(--amber);
	text-decoration:underline;
  }

  /* title section */
  .game-title-area {
    text-align: center;
    margin: 10px 0 8px;
  }
  .game-title {
    font-size: 36px;
	font-family: 'Press Start 2P', monospace;
    color: var(--amber);
    text-shadow: 0 0 12px var(--amber), 0 0 24px rgba(255,176,0,0.5);
    animation: flicker 6s infinite;
	margin-top: 8px;
	margin-bottom: 8px;
  }
  .win {
	margin-top: 44px;
  }
  .game-subtitle {
    font-size: 24px;
	font-family: 'tt';
    color: var(--blue);
    margin-top: 8px;
  }
.login-modal {
  position: absolute;
  inset: 0;
  z-index: 98;
  background: var(--crt-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--green);
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  padding: 0px 10px 12px 10px;
  border-radius: 6px;
}

.login-modal.hidden {
  display: none;
}

.login-modal p {
	margin-top: 8px;
	font-family: 'tt';
	font-weight: bold;
	color: var(--blue);
	font-size: 18px;
}

.storybox {
  position: absolute;
  text-align: center;
  inset: 0;
  z-index: 97;
  background: var(--crt-bg);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  color: var(--amber);
  font-size: 18px;
  font-family: 'tt';
  padding: 0px 10px 12px 10px;
  border-radius: 6px;
}
.storybox p {
    margin-top: 8px;
}

.close {
	display:inline-block;
	padding:5px 5px 3px;
	margin-left: auto;
	margin-top: 8px;
	margin-bottom: 8px;
	background: var(--green);
	font-family: 'Press Start 2P', monospace;
	font-size:18px;
	color: var(--crt-bg);
	cursor: pointer;
}

	input[type=text], input[type=number] {
		width:200px;
		text-align:center;
		font-size: 24px;
		font-family: 'Press Start 2P', monospace;
		color: var(--blue);
		text-shadow: 0 0 12px var(--blue), 0 0 24px rgba(255,176,0,0.5);
		border-width: 0 0 2px 0;
		border-style: solid;
		border-color: var(--blue);
		background: none;
		padding: 4px 0 0;
	}
	label {
		font-family: 'tt';
		font-weight: bold;
		color: var(--blue);
		font-size: 18px;
		padding-bottom: 10px;
	}
	input[type=button], input[type=submit], input[type=reset], button {
		background-color: var(--amber);
		color: #000000;
		font-size: 24px;
		border: none;
		font-family: 'Press Start 2P', monospace;
		margin-top: 10px;
		padding: 6px 8px 1px;
		cursor: pointer;
	}

  /* stats grid */
  .hidden {
	visibility: hidden;
  }
  .stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
	column-gap: 18px;
    margin: 10px 0;
  }
  .stat-box {
    background: rgba(57,255,20,0.05);
    border: 1px solid rgba(57,255,20,0.2);
    border-radius: 2px;
    padding: 8px;
	height: 33px;
    text-align: center;
  }
  .lastscan {
	animation: fadeHighlight 2s ease-out forwards;
  }
  @keyframes fadeHighlight {
    from {
      background-color: var(--green);
    }
    to {
	  background-color: rgba(57, 255, 20, 0.05);
    }
  }
  .building {
	height: 33px;
    text-align: center;
  }
  .building-val {
    font-size: 18px;
    color: var(--blue);
    text-shadow: 0 0 8px var(--blue);
	position: relative;
	top: 9px;
  }
  .skybridge {
	grid-column: span 2;
	padding-right: 57%;
  }
  .stat-val {
    font-size: 18px;
    color: var(--amber);
    text-shadow: 0 0 8px rgba(255, 176, 0, 0.6);
	position: relative;
  }

  /* ── CONTROL PANEL ── */
  .control-panel {
    width: 92%;
    background: #1c1c1c;
    border-radius: 0 0 8px 8px;
    margin-top: 0;
    padding: 14px 14px 18px;
    position: relative;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
  }

  .controls-row {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  /* joystick */
  .joystick-area {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
  }
  .joystick-base {
    width: 44px;
    height: 44px;
    background: radial-gradient(circle at 40% 35%, #555, #222);
    border-radius: 50%;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 4px 10px rgba(0,0,0,0.6), inset 0 2px 4px rgba(255,255,255,0.1);
  }
  .joystick-stick {
    width: 10px;
    height: 32px;
    background: linear-gradient(180deg, #555 0%, #333 100%);
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 3px;
  }
  .joystick-ball {
    width: 48px;
    height: 48px;
    background: radial-gradient(circle at 35% 30%, #66ff44, #22aa00);
    border-radius: 50%;
	z-index: 200;
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 4px 12px rgba(57,255,20,0.4), 0 2px 4px rgba(0,0,0,0.5);
    cursor: pointer;
    transition: transform 0.1s;
  }

  /* buttons cluster */
  .buttons-cluster {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  /* small coin buttons */
  .coin-row {
    display: flex;
    gap: 6px;
    margin-bottom: 2px;
  }
  .coin-btn {
    width: 22px;
    height: 10px;
    background: radial-gradient(circle at 40% 30%, #ffcc44, #cc8800);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5), inset 0 1px 2px rgba(255,255,255,0.3);
    cursor: pointer;
  }
  /* main green buttons */
  .btn-row {
    display: flex;
	justify-content: flex-end;
    gap: 12px;
	padding-right: 18px;
  }
  .btn-row + .btn-row { padding-right: 30px; }
  .arcade-btn {
    width: 36px;
    height: 18px;
    background: radial-gradient(circle at 35% 30%, #77ff44, #22aa00);
    border-radius: 50%;
    box-shadow:
      0 5px 0 #116600,
      0 6px 8px rgba(0,0,0,0.6),
      inset 0 2px 4px rgba(255,255,255,0.3);
    cursor: pointer;
    transition: transform 0.08s, box-shadow 0.08s;
    position: relative;
  }
  .arcade-btn::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 25%;
    width: 30%;
    height: 20%;
    background: rgba(255,255,255,0.4);
    border-radius: 50%;
    filter: blur(2px);
  }
  .arcade-btn:active {
    transform: translateY(4px);
    box-shadow: 0 1px 0 #116600, 0 2px 4px rgba(0,0,0,0.6), inset 0 2px 4px rgba(255,255,255,0.2);
  }
  .btn-row .arcade-btn:nth-child(2) {
    transform: translateY(-25%);
  }
  .btn-row .arcade-btn:nth-child(2):active {
    transform: translateY(calc(-25% + 4px));
  }

  /* cabinet sides */
  .cabinet-side-left,
  .cabinet-side-right {
    position: absolute;
    top: 0;
    width: 4%;
    height: 100%;
    background: var(--cabinet-shadow);
  }
  .cabinet-side-left { left: 0; box-shadow: inset -4px 0 8px rgba(0,0,0,0.2); }
  .cabinet-side-right { right: 0; box-shadow: inset 4px 0 8px rgba(0,0,0,0.2); }

  /* top cap shape */
  .cabinet-top {
    width: 100%;
    height: 24px;
    background: linear-gradient(180deg, #d0d0cc 0%, var(--cabinet-white) 100%);
    border-radius: 28px 28px 0 0;
    position: relative;
  }

  /* base */
  .cabinet-base {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--cabinet-white) 0%, #c8c8c4 100%);
  }

  /* PHOSPHOR BURN ANIMATION for the screen bg */
  @keyframes phosphor-pulse {
    0%,100% { opacity: 0.03; }
    50% { opacity: 0.06; }
  }
  .phosphor-glow { animation: phosphor-pulse 3s ease-in-out infinite; }

  /* STAR FIELD */
  .starfield {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
  }
  .star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle var(--d, 2s) var(--delay, 0s) ease-in-out infinite alternate;
  }
  @keyframes twinkle {
    from { opacity: var(--min, 0.1); transform: scale(1); }
    to { opacity: var(--max, 0.9); transform: scale(1.3); }
  }

  /* ENEMY SPRITE (CSS pixel art) */
  .enemy-ship {
    position: absolute;
    z-index: 5;
    animation: enemy-drift 8s linear infinite;
    right: 10%;
    top: 15%;
  }
  @keyframes enemy-drift {
    0% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(8px) translateX(-6px); }
    75% { transform: translateY(-6px) translateX(4px); }
    100% { transform: translateY(0) translateX(0); }
  }