:root {
  --c64-bg: #4040c0;
  --c64-border: #7878ec;
  --c64-text: #a7a7ff;
  --c64-bright: #ffffff;
  --c64-yellow: #f0f088;
  --bezel: #141414;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bezel);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-family: 'VT323', monospace;
}

.bezel {
  background: #050505;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 0 0 2px #000, 0 20px 60px rgba(0, 0, 0, 0.6);
  max-width: 760px;
  width: 100%;
}

.c64-screen {
  background: var(--c64-bg);
  border: 10px solid var(--c64-border);
  border-radius: 4px;
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  color: var(--c64-text);
}

.c64-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.16) 0px,
    rgba(0, 0, 0, 0.16) 1px,
    transparent 1px,
    transparent 3px
  );
}

.title {
  font-family: 'Press Start 2P', 'VT323', monospace;
  font-size: 16px;
  color: var(--c64-bright);
  text-align: center;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.status-bar {
  font-size: 20px;
  color: var(--c64-yellow);
  border-bottom: 2px solid var(--c64-border);
  padding-bottom: 6px;
  margin-bottom: 10px;
  white-space: pre-wrap;
}

.transcript {
  font-size: 20px;
  line-height: 1.3;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 46vh;
  overflow-y: auto;
  margin: 0 0 12px 0;
  font-family: 'VT323', monospace;
}

.cmd-form {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 22px;
}

.prompt {
  color: var(--c64-bright);
}

.cmd-form input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--c64-bright);
  font-family: 'VT323', monospace;
  font-size: 22px;
  caret-color: var(--c64-bright);
}

.restart-form {
  margin-top: 10px;
  text-align: right;
}

.restart-form button {
  background: transparent;
  border: 2px solid var(--c64-border);
  color: var(--c64-text);
  font-family: 'VT323', monospace;
  font-size: 16px;
  padding: 4px 10px;
  border-radius: 3px;
  cursor: pointer;
}

.restart-form button:hover {
  background: var(--c64-border);
  color: var(--c64-bg);
}

@media (max-width: 480px) {
  .title {
    font-size: 12px;
  }
  .status-bar,
  .transcript,
  .cmd-form {
    font-size: 18px;
  }
}
