* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}
body, html {
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  color: #000000;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

#start-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  z-index: 100;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  text-align: center;
}
#start-screen h1 {
  font-size: 80px;
  font-weight: 100;

}
#start-screen p {
  margin-top: 12px;
  font-size: 13px;
  color: #555;
  line-height: 1.5;
}
/* 배경/테두리 없이 검정 텍스트 + 밑줄만 — start-btn/dev-toggle-btn/lang-toggle-btn 공통 베이스 */
.text-btn {
  background: none;
  border: none;
  color: #000;
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
  padding: 4px 2px;
}

#start-btn {
  margin-top: 24px;
  font-size: 16px;
  font-weight: normal;
}

/* ★ 모자이크/블러 효과가 적용된 비밀 텍스트 컨테이너
   position:absolute + translate(-50%,-50%)로 정중앙 고정 — body의 flex 정렬에 기대면
   nowrap 텍스트가 flex item 크기를 밀어내면서 정렬이 어긋날 수 있어서 여기서 분리함. */
#secret-container {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 80%;
  max-width: 360px;
  text-align: center;
  line-height: 1.6;
  font-size: 18px;
  letter-spacing: -0.01em;
  white-space: nowrap; /* 기본(한글) — 한 줄 유지 */
  /* opacity, filter(블러), transform(축소) 속성을 0.15초 동안 빠르게 전환 */
  transition: opacity 0.15s ease-out, filter 0.15s ease-out, transform 0.15s ease-out;
  opacity: 0;
  filter: blur(12px); /* 텍스트가 안 보일 때 12px 정도로 뿌옇게 모자이크 처리 */
  transform: translate(-50%, -50%) scale(0.96); /* 약간 축소되며 흐려짐 */
}

/* 영어일 때만 줄바꿈 허용 — 문장이 한글보다 훨씬 길어서 한 줄로는 화면 밖으로 넘침 */
html[lang="en"] #secret-container {
  white-space: normal;
  word-break: keep-all;
}

#secret-container.visible {
  opacity: 1;
  filter: blur(0px); /* 눈을 가리면 모자이크가 풀어지며 선명해짐 */
  transform: translate(-50%, -50%) scale(1);
}

#dev-toggle-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 90;
  font-size: 11px;
  font-family: monospace;
  opacity: 0.8;
}

/* 화면 중앙 하단 — 한글/EN 언어 변경. z-index를 start-screen(100)보다 높여서
   첫 메인화면 위에서도 눌려야 함 — 예전엔 start-screen(z-index:100)한테 가려져서 안 보였음. */
#lang-toggle-btn {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 110;
  font-size: 13px;
}
#lang-toggle-btn .active {
  font-weight: bold;
}

.dev-ui { display: block; }
.dev-ui.hidden { display: none !important; }

#status-hint {
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 13px;
  font-weight: bold;
  color: #000;
  background: rgba(255, 255, 255, 0.85);
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid #ddd;
}

#debug-info {
  position: absolute;
  bottom: 20px;
  left: 20px;
  font-size: 11px;
  font-family: monospace;
  color: #444;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  pointer-events: none;
  line-height: 1.4;
}

#canvas-container {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 320px;
  height: 240px;
  border: 2px solid #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  background-color: #000;
}
#canvas-container canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  /* 셀피처럼 보이게 화면에서만 좌우 반전 (실제 픽셀 버퍼/좌표계는 안 건드림) */
  transform: scaleX(-1);
}

@media (max-width: 600px) {
  #start-screen h1 {
    font-size: 20px;
  }

  /* 한글 비밀 중 긴 문장(예: "14살 때 동네 일진에게 홀리스터 후드집업 골목에서 뺏김")이
     nowrap 상태로 화면 폭을 넘어가 잘리던 문제 — 모바일에서는 언어 상관없이 줄바꿈 허용 */
  #secret-container {
    width: 88%;
    font-size: 16px;
    white-space: normal;
    word-break: keep-all;
  }

  #start-btn {
    font-size: 10px;
  }
}
