

/* 기본 레이아웃 */
html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: #e4cec8;
  color: #fff;
  font-family: 'Helvetica', sans-serif;
  overflow: hidden;
}

.title {
  flex: 0;
  padding: 10px;
  text-align: center;
  font-size: clamp(14px, 3vw, 24px);
  opacity: 0.5;
}

/* 폰트 등록-배경 특수효과 (weight/format 일치) */
@font-face {
  font-family: 'Radlush-Black';
  src: url('Radlush-Black.otf') format('opentype');
        /*url('../fonts/Parkinsans[wght].ttf') format('truetype');*/
  font-weight: 500;
  font-style: normal;
}
/* 폰트 등록-정보텍스트 (weight/format 일치) */
@font-face {
  font-family: 'Acumin';
  src: url('Acumin-BdPro.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: 'Courier';
  src: url('Courier.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: 'Parkinsans';
  src: url('Parkinsans-ExtraBold.ttf') format('opentype');
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: 'Jacquard';
  src: url('Jacquard12-Regular.ttf') format('opentype');
  font-weight: 700;
  font-style: normal;
}

/* Touch 안내 오버레이 */
.touch-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* 뒤 배경을 흐리게 */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  /* 어둡게 반투명 처리 */
  background: rgba(0, 0, 0, 0.7);
  /* 가운데 정렬 */
  display: flex;
  justify-content: center;
  align-items: center;
  /* 텍스트 스타일 */
  font-family: 'Courier', monospace;
  font-size: clamp(18px, 4vw, 24px);
  color: #fff;
  /* 다른 모든 요소 위에 */
  z-index: 10000;
  /* 터치 이벤트를 이 오버레이에서만 받아들이도록 */
  pointer-events: all;
  text-align: center;
}

@media (min-width: 1024px) {
  .touch-overlay {
    /* 1) 좌우/상하 중앙 정렬 */
    justify-content: center;
    align-items: center;

    /* 2) padding 제거 */
    padding: 0;

    /* 3) position, 크기만 유지 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
  }

  .touch-overlay .touch-tip {
    font-size: 0.9rem;
    max-width: 700px;
    text-align: center; /* 가운데 정렬로 바꿔도 좋습니다 */
  }
}


.touch-tip {
  max-width: 90%;
  line-height: 1.5;
  font-size: clamp(14px, 3vw, 24px);
}
.touch-tip-second-screen {
  display: none; /* 一开始隐藏，第一次点击后才出现 */
  pointer-events: all;  /* 一定要能接收点击 */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(8px);
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-family: 'Courier', monospace;
  font-size: clamp(14px, 4vw, 20px);
  z-index: 10001;
  text-align: center;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.fixed-link-tip {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.32);
  color: #fff;
  padding: 10px 16px;
  border-radius: 4px;
  font-size: 0.95rem;
  cursor: pointer;
  z-index: 10000;
  transition: background 0.3s ease;
}
.fixed-link-tip:hover {
  background: rgba(0, 0, 0, 0.32);
  text-decoration: underline;
}


/* 데스크탑(1024px 이상)에서만 초록 박스 내부 위치로 이동 */
@media (min-width: 1024px) {
  .touch-tip-second-screen {
    justify-content: flex-start;
    align-items: flex-start;
    padding-top: 5vh;
    padding-left: 5vw; /* 오른쪽 상단으로 이동 */
    text-align: left;   /* 중앙 정렬 해제 */
  }

  .touch-tip-second-screen .project-info {
    max-width: 300px;
    font-size: 0.9rem;
    text-align: left;
  }
}


.project-info {
  max-width: 80vw;
  margin: auto;
  line-height: 1.3;
  font-size: 0.9rem; /* 또는 14px 등으로 지정 */

}
.highlight {
  font-weight: 70;
  font-size: clamp(14px, 4vw, 28px);
  
  font-weight: bold;
  color: hsl(25, 100%, 50%); /* 亮色强调 */
  text-shadow: 0 0 0px hsl(25, 100%, 50%);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.7; }
}





/* 최상단 텍스트 */
.overlay-img {
  position: absolute;  /* 부모가 position: relative 여야 합니다 */
  top: 0;
  left: 0;
  width: 100%;         /* 필요하다면 max-width 등 추가 */
  height: auto; 
}

/* 2) 실제 <img> 요소 스타일 */
.overlay-img img {
  display: block;           /* inline-gap 제거 */
  width: 30%;              /* 컨테이너 너비에 맞춤 */
  height: auto;             /* 비율 유지 */
  /* 필요 시 object-fit: contain; 추가 가능 */
}

/* 오른쪽 상단 텍스트 */
.overlay-text2 {
  top: 20px;
  right: 0;
  max-width: 90%;
  font-family: 'Acumin', sans-serif;
  font-size: clamp(25px, 15vw, 200px);
  line-height: 1.4;
  text-align: right;
}

/* 오버레이 텍스트 공통 */
.overlay-img,
.overlay-text2{
  position: absolute;
  padding: 8px;
  box-sizing: border-box;
  z-index: 9999;
  white-space: pre-line;
  pointer-events: none;
  color: #fff;
}


/* 왼쪽 하단 텍스트 */
.overlay-text3 {
  position: absolute;
  padding: 6px;
  bottom: 20px;
  font-family: 'Acumin', sans-serif;
  font-size: clamp(12px, 3vw, 120px);
  line-height: 0.8;
  white-space: nowrap;
  pointer-events: none;
  left: 0;
  text-align: left;
  max-width: 45vw;
}
.overlay-text3 .heading-large {
  font-size: calc(clamp(12px, 4vw, 120px) + 5px);
  font-weight: 500;
}
.reminder-text {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 1rem;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.reminder-text.show {
  opacity: 0.7;
}


/* 캔버스 */
canvas#grid {
  flex: 1;
  width: 100%;
  display: block;
}


/*don't show buttons*/
#startBtn { display: none; }
#stopBtn { display: none; }
#textBtn { display: none; }
#autoUndoBtn { display: none; }
#stopUndoBtn { display: none; }
#clearBtn { display: none; }
#reverseBtn { display: none; }
#speedSlider { display: none; }

/* 컨트롤 UI */
.controls {
  position: fixed;
  bottom: 20px;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  opacity: 0.3;
  transition: opacity 0.3s;
}
.controls:hover {
  opacity: 1;
}
.controls input[type="range"] {
  width: 120px;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.32);
  border-radius: 4px;
  height: 4px;
  transition: background 0.2s;
}
.controls input[type="range"]:hover {
  background: rgba(0, 0, 0, 0.32);
}
.controls button {
  background: rgba(0, 0, 0, 0.32);
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}



body{
  -webkit-user-select: none; /* Safari / Chrome */
  -moz-user-select: none;    /* Firefox */
  -ms-user-select: none;     /* IE10+ */
  user-select: none;         /* 标准语法 */
}


/* 비디오 */
video#replay {
  flex: 0;
  width: 80%;
  max-width: 800px;
  margin: 10px auto;
  background: #000;
}
