html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: auto;
  background: #000;
  color: #6BE5FF;
  font-family: "Noto Sans Mono CJK KR", monospace;
  font-size: 1rem;
  line-height: 1.5em;
}

body {
  display: flex;
  flex-direction: column;
}

#top-bar {
  padding: 30px;
  flex: 0 0 auto;
}

#content-viewer {
  flex: 1 1 auto;
  width: 100%;
  overflow: visible;
}

/* 공통 영역 */
*, *::before, *::after {
  box-sizing: border-box;
}
pre {
  margin: 0;
  padding: 0;
  font-family: inherit !important;
}

/* CRT 화면 잔상 효과 */ 
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.1) 0px,
    rgba(0, 0, 0, 0.1) 2px,
    rgba(0, 0, 0, 0.2) 2px,
    rgba(0, 0, 0, 0.2) 4px
  );
  opacity: 0.3;
  animation: flicker 0.15s infinite;
}

/* CRT 플리커 효과 */
@keyframes flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { opacity: .3; }
  20%, 24%, 55% { opacity: .15; }
}

/* 출력 영역 */
#output {
  white-space: pre-wrap;
  line-height: 1.4;
}

/* 메뉴 */
.menu-item {
  padding: 2px 4px;
  display: inline-block;
  width: 200px;
}
.menu-selected {
  background-color: #6BE5FF;
  color: #000;
}

/* 비밀 코드 입력 */
#secret {
  margin-top: 1.5em;
}
#secret input,
.cmd-input {
  all: unset;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: transparent;
  outline: none;
  width: 70%;
}

/* 스크롤바 */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 10px;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: #6BE5FF;
  border-radius: 0;
}

/* 박수버튼 */
#clap-btn {
  all: unset;
  display: inline-block;
  padding: 6px 14px;
  line-height: 1;
  border: 1px solid #6BE5FF;
  color: #6BE5FF;
  cursor: pointer;
  font-family: inherit;
}

#clap-btn:hover,
#clap-btn.active {
  background: #6BE5FF;
  color: #000;
}

@keyframes shake {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-3px, 0); }
  50% { transform: translate(3px, 0); }
  75% { transform: translate(-3px, 0); }
  100% { transform: translate(0, 0); }
}

button.active {
  background:#6BE5FF;
  color:#000;
}
