@import url('https://fonts.googleapis.com/css?family=Nanum+Pen+Script&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Nanum+Pen+Script&display=swap');


html, body {
  margin: 0; padding: 0; height: 100vh; width: 100vw; overflow: hidden;
  background-color: #F4EFEB; /* 변경 */
  font-family: 'Nanum Pen Script', cursive;
}

#beach-wrap {
  position: relative;
  width: 100vw; height: 100vh;
  overflow: hidden;
}

#sand-canvas, #wave-canvas {
  position: absolute; left: 0; top: 0; width: 100vw; height: 100vh;
  display: block;
  pointer-events: none;
}

#sand-canvas { z-index: 1; }
#wave-canvas { z-index: 3; }

/* 로고 및 설명 */
#logo-container {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 2;
  cursor: pointer;
  font-family: 'Abril Fatface', cursive;
}
#logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #567C8D;
}
#site-desc {
  margin-top: 8px;
  background: rgba(255,255,255,0.8);
  padding: 8px 12px;
  border-radius: 8px;
  display: none;
  max-width: 260px;
  font-size: 1rem;
  color: #555;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
#logo-container:hover #site-desc {
  display: block;
}

/* 소개 텍스트 */
#intro-text {
  position: absolute;
  top: 30%; left: 50%;
  transform: translateX(-50%);
  text-align: center;
  font-family: 'Abril Fatface', cursive; /* 변경 */
  color: #2F4156;
  transition: opacity 1.5s ease;
  pointer-events: none;
  margin: 0; padding: 0;
  z-index: 2;
}
#intro-text.visible {
  opacity: 1;
}
#intro-text.hidden {
  opacity: 0;
}
#intro-text h1 {
  margin: 0;
  font-size: 10rem;
  font-weight: 200;
}
#intro-text p {
  margin: 0.5em 0 0 0;
  font-size: 1.2rem;
  font-family: 'Nanum Pen Script', cursive;
  color: #555;
}

/* 모래 글씨 */
#sand-text {
  position: absolute;
  left: 20vw; right: 20vw; top: 38vh;
  text-align: center;
  font-size: 5rem;
  font-family: 'Nanum Pen Script', cursive;
  color: #c7b299;
  text-shadow: 0 3px 2px #dacdbb,
               0 1px 0 #f8e7ca;
  letter-spacing: 0.04em;
  z-index: 2; /* wave-canvas(z=3) 아래, sand-canvas(z=1) 위 */
  white-space: pre-wrap;
  word-break: break-word;
}
.sand-char {
  opacity: 1;
  display: inline-block;
}
.sand-char.last-char {
  opacity: 0;
  animation: fadeIn 0.4s forwards;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 입력창 */
#input-box {
  width: 60vw; min-width: 220px; max-width: 640px;
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 44px; font-size: 1.4rem; font-family: 'Nanum Pen Script', cursive; padding: 12px 18px;
  border-radius: 12px; border: none; outline: none;
  background: #F5EFEB; box-shadow: 0 4px 24px #b7a68b20;
  color: #a4845d;
  z-index: 5;
  transition: opacity 0.3s;
}
#input-box.hidden {
  opacity: 0.3;
  pointer-events: none;
}