/* Main Landing Page Styles */

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.split-container {
  position: relative;
  width: 100vw;
  height: 200vh; /* 3개 section이 80vh씩 */
  overflow: hidden;
}

.section {
  position: absolute;
  width: 100vw;
  height: 100vh;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: none;
}

.choreographer-section {
  background: #fff;
  color: #111;
}

.developer-section {
  background: #111;
  color: #fff;
}

.dancer-figure {
  margin-bottom: 2rem;
}

/* 데스크탑 버전 댄스바디 (기본) */
.dancer-body {
  position: relative;
  width: 100px; /* 데스크탑용 큰 크기 */
  height: 180px; /* 데스크탑용 큰 높이 */
}

.head {
  position: absolute;
  top: -10px; /* 데스크탑용 머리 위치 */
  left: 50%;
  transform: translateX(-50%);
  width: 30px; /* 데스크탑용 큰 머리 */
  height: 30px;
  background: #111;
  border-radius: 50%;
  animation: headDance 2.5s infinite cubic-bezier(0.7, 0, 0.3, 1) alternate;
}

.paused .head {
  animation-play-state: paused;
}

.torso {
  position: absolute;
  top: 25px; /* 데스크탑용 몸통 위치 */
  left: 50%;
  transform: translateX(-50%);
  width: 20px; /* 데스크탑용 큰 몸통 */
  height: 60px;
  background: #111;
  border-radius: 8px;
  animation: torsoDance 3.2s infinite cubic-bezier(0.6, 0, 0.4, 1) alternate;
}

.paused .torso {
  animation-play-state: paused;
}

.arm {
  position: absolute;
  top: 30px; /* 데스크탑용 팔 위치 */
  width: 8px; /* 데스크탑용 큰 팔 */
  height: 40px;
  background: #111;
  border-radius: 3px;
  transform-origin: top center;
}

.arm-left {
  left: 15px; /* 데스크탑용 팔 간격 */
  animation: armDanceLeft 2.8s infinite cubic-bezier(0.8, 0, 0.2, 1) alternate;
}

.paused .arm-left {
  animation-play-state: paused;
}

.arm-right {
  right: 15px; /* 데스크탑용 팔 간격 */
  animation: armDanceRight 2.3s infinite cubic-bezier(0.9, 0, 0.1, 1) alternate;
}

.paused .arm-right {
  animation-play-state: paused;
}

.leg {
  position: absolute;
  top: 85px; /* 70px에서 85px로 증가하여 몸통과의 거리 늘림 */
  width: 10px; /* 데스크탑용 큰 다리 */
  height: 60px; /* 45px에서 60px로 증가하여 다리 길이 늘림 */
  background: #111;
  border-radius: 4px;
}

.leg-left {
  left: 15px; /* 8px에서 15px로 변경하여 다리 간격 줄임 */
  animation: legDanceLeft 3.5s infinite cubic-bezier(0.5, 0, 0.5, 1) alternate;
}

.paused .leg-left {
  animation-play-state: paused;
}

.leg-right {
  right: 15px; /* 8px에서 15px로 변경하여 다리 간격 줄임 */
  animation: legDanceRight 2.9s infinite cubic-bezier(0.7, 0, 0.3, 1) alternate;
}

.paused .leg-right {
  animation-play-state: paused;
}

/* 더 복잡하고 곡선적인 댄스 애니메이션 키프레임 */
@keyframes headDance {
  0% {
    transform: translateX(-50%) translateY(0px) rotate(-5deg) scale(1);
  }
  16.67% {
    transform: translateX(-45%) translateY(-3px) rotate(8deg) scale(1.1);
  }
  33.33% {
    transform: translateX(-40%) translateY(-5px) rotate(-3deg) scale(0.9);
  }
  50% {
    transform: translateX(-55%) translateY(-2px) rotate(12deg) scale(1.05);
  }
  66.67% {
    transform: translateX(-60%) translateY(1px) rotate(-8deg) scale(1.15);
  }
  83.33% {
    transform: translateX(-52%) translateY(-1px) rotate(6deg) scale(0.95);
  }
  100% {
    transform: translateX(-50%) translateY(0px) rotate(-5deg) scale(1);
  }
}

@keyframes torsoDance {
  0% {
    transform: translateX(-50%) translateY(0px) rotate(-3deg) scale(1);
  }
  14.29% {
    transform: translateX(-48%) translateY(-2px) rotate(5deg) scale(1.15);
  }
  28.57% {
    transform: translateX(-45%) translateY(-4px) rotate(-2deg) scale(0.85);
  }
  42.86% {
    transform: translateX(-52%) translateY(-1px) rotate(8deg) scale(1.1);
  }
  57.14% {
    transform: translateX(-55%) translateY(2px) rotate(-4deg) scale(0.95);
  }
  71.43% {
    transform: translateX(-47%) translateY(-3px) rotate(6deg) scale(1.2);
  }
  85.71% {
    transform: translateX(-53%) translateY(1px) rotate(-1deg) scale(0.9);
  }
  100% {
    transform: translateX(-50%) translateY(0px) rotate(-3deg) scale(1);
  }
}

@keyframes armDanceLeft {
  0% {
    transform: rotate(-25deg) scale(1); /* 어깨를 중심으로 회전 */
  }
  20% {
    transform: rotate(45deg) scale(1.1); /* 위로 올라감 */
  }
  40% {
    transform: rotate(-15deg) scale(0.9); /* 아래로 내려감 */
  }
  60% {
    transform: rotate(60deg) scale(1.15); /* 더 위로 올라감 */
  }
  80% {
    transform: rotate(-5deg) scale(0.95); /* 중간 위치 */
  }
  100% {
    transform: rotate(35deg) scale(1.05); /* 위쪽 위치 */
  }
}

@keyframes armDanceRight {
  0% {
    transform: rotate(30deg) scale(1); /* 어깨를 중심으로 회전 */
  }
  16.67% {
    transform: rotate(-20deg) scale(0.9); /* 아래로 내려감 */
  }
  33.33% {
    transform: rotate(55deg) scale(1.15); /* 위로 올라감 */
  }
  50% {
    transform: rotate(-10deg) scale(0.85); /* 아래로 내려감 */
  }
  66.67% {
    transform: rotate(70deg) scale(1.1); /* 더 위로 올라감 */
  }
  83.33% {
    transform: rotate(5deg) scale(0.95); /* 중간 위치 */
  }
  100% {
    transform: rotate(40deg) scale(1); /* 위쪽 위치 */
  }
}

@keyframes legDanceLeft {
  0% {
    transform: rotate(-8deg) translateX(0px) translateY(0px) scale(1);
  }
  25% {
    transform: rotate(12deg) translateX(2px) translateY(-1px) scale(1.1);
  }
  50% {
    transform: rotate(-5deg) translateX(-3px) translateY(-2px) scale(0.9);
  }
  75% {
    transform: rotate(18deg) translateX(4px) translateY(1px) scale(1.05);
  }
  100% {
    transform: rotate(8deg) translateX(0px) translateY(0px) scale(1);
  }
}

@keyframes legDanceRight {
  0% {
    transform: rotate(10deg) translateX(0px) translateY(0px) scale(1);
  }
  20% {
    transform: rotate(-15deg) translateX(-2px) translateY(-1px) scale(0.9);
  }
  40% {
    transform: rotate(20deg) translateX(3px) translateY(-3px) scale(1.15);
  }
  60% {
    transform: rotate(-8deg) translateX(-1px) translateY(-4px) scale(0.85);
  }
  80% {
    transform: rotate(25deg) translateX(5px) translateY(2px) scale(1.1);
  }
  100% {
    transform: rotate(-5deg) translateX(0px) translateY(0px) scale(1);
  }
}

/* 타이핑 애니메이션 키프레임 추가 */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

/* 타이핑 커서 깜빡임 애니메이션 */
@keyframes blink-caret {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: #00ff00;
  }
}

.computer-screen {
  margin-bottom: 2rem;
}

.screen-frame {
  width: 300px; /* 200px에서 300px로 더 크게 증가 */
  height: 180px; /* 120px에서 180px로 더 크게 증가 */
  background: #333;
  border-radius: 8px;
  padding: 16px; /* 12px에서 16px로 증가 */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.screen-header {
  height: 30px; /* 25px에서 30px로 증가 */
  background: #555;
  border-radius: 4px;
  margin-bottom: 12px; /* 10px에서 12px로 증가 */
}

.screen-body {
  height: 100px; /* 90px에서 100px로 증가하여 두 줄 텍스트 완벽 수용 */
  background: #222;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00ff00;
  font-family: monospace;
  font-size: 16px;
  padding: 12px;
}

.typing-code {
  overflow: hidden;
  white-space: pre; /* 줄바꿈 보존, 자동 줄바꿈 방지 */
  word-wrap: normal; /* 자동 줄바꿈 방지 */
  word-break: keep-all; /* 단어 중간에서 줄바꿈 방지 */
  border-right: 2px solid #00ff00;
  animation: typing 3s steps(40, end) infinite, blink-caret 0.75s step-end infinite;
  max-width: 100%;
  text-align: center;
  line-height: 1.1; /* 줄 간격 줄임 */
  font-size: 14px; /* 폰트 크기 조정 */
}

.enter-btn {
  background: #00ff00;
  color: #000;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-family: monospace;
  font-weight: bold;
  margin-top: 1rem;
  transition: all 0.3s ease;
}

.enter-btn::before {
  content: ">";
  margin-right: 0.5rem;
}

.enter-btn:hover {
  background: #00cc00;
  transform: scale(1.05);
}

.artist-btn {
  background: #fff;
  color: #111;
  border: none;
  padding: 1rem 2rem;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 1rem;
  transition: all 0.3s ease;
}

.artist-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.dev-btn {
  background: #111;
  color: #fff;
  border: none; /* 2px solid #fff에서 none으로 변경하여 보더라인 제거 */
  padding: 1rem 2rem;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 1rem;
  transition: all 0.3s ease;
}

.dev-btn:hover {
  background: #fff;
  color: #111;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
}

/* Responsive design */
@media (max-width: 768px) {
  /* 모바일 버전 댄스바디 */
  .dancer-body {
    width: 60px; /* 모바일용 작은 크기 */
    height: 100px; /* 모바일용 작은 높이 */
    border-radius: 8px;
    position: relative;
    animation: bodyDance 4s infinite ease-in-out;
  }

  .head {
    position: absolute;
    top: -5px; /* 모바일용 머리 위치 */
    left: 50%;
    transform: translateX(-50%);
    width: 20px; /* 모바일용 작은 머리 */
    height: 20px;
    background: #111;
    border-radius: 50%;
    animation: headDance 3.2s infinite ease-in-out;
  }

  .torso {
    position: absolute;
    top: 15px; /* 모바일용 몸통 위치 */
    left: 50%;
    transform: translateX(-50%);
    width: 12px; /* 모바일용 작은 몸통 */
    height: 35px;
    background: #111;
    border-radius: 6px;
    animation: torsoDance 3.8s infinite ease-in-out;
  }

  .arm {
    position: absolute;
    top: 20px; /* 모바일용 팔 위치 */
    width: 4px; /* 모바일용 작은 팔 */
    height: 25px;
    background: #111;
    border-radius: 2px;
    transform-origin: top center;
  }

  .arm-left {
    left: 10px; /* 모바일용 팔 간격 */
    animation: armDanceLeft 2.8s infinite ease-in-out;
  }

  .arm-right {
    right: 10px; /* 모바일용 팔 간격 */
    animation: armDanceRight 3.1s infinite ease-in-out;
  }

  .leg {
    position: absolute;
    top: 45px; /* 모바일용 다리 위치 */
    width: 6px; /* 모바일용 작은 다리 */
    height: 40px; /* 30px에서 40px로 증가하여 다리 길이 늘림 */
    background: #111;
    border-radius: 3px;
  }

  .leg-left {
    left: 12px; /* 8px에서 12px로 변경하여 다리 간격 줄임 */
    animation: legDanceLeft 3.5s infinite ease-in-out;
  }

  .leg-right {
    right: 12px; /* 8px에서 12px로 변경하여 다리 간격 줄임 */
    animation: legDanceRight 2.9s infinite ease-in-out;
  }

  .screen-frame {
    width: 280px; /* 220px에서 280px로 더 크게 증가 */
    height: 160px; /* 130px에서 160px로 더 크게 증가 */
  }

  .screen-header {
    height: 25px; /* 20px에서 25px로 증가 */
    margin-bottom: 10px; /* 8px에서 10px로 증가 */
  }

  .screen-body {
    height: 80px; /* 60px에서 80px로 증가하여 두 줄 텍스트 완벽 수용 */
    font-size: 14px; /* 12px에서 14px로 증가 */
  }

  .artist-btn,
  .dev-btn {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    margin: 0.5rem;
  }
}

@media (max-width: 480px) {
  /* 작은 모바일 버전 댄스바디 */
  .dancer-body {
    width: 50px; /* 작은 모바일용 더 작은 크기 */
    height: 85px; /* 작은 모바일용 더 작은 높이 */
    border-radius: 6px;
  }

  .head {
    top: -4px; /* 작은 모바일용 머리 위치 */
    width: 18px; /* 작은 모바일용 더 작은 머리 */
    height: 18px;
  }

  .torso {
    top: 12px; /* 작은 모바일용 몸통 위치 */
    width: 10px; /* 작은 모바일용 더 작은 몸통 */
    height: 30px;
    border-radius: 5px;
  }

  .arm {
    top: 17px; /* 작은 모바일용 팔 위치 */
    width: 3px; /* 작은 모바일용 더 작은 팔 */
    height: 22px;
  }

  .arm-left {
    left: 8px; /* 작은 모바일용 팔 간격 */
  }

  .arm-right {
    right: 8px; /* 작은 모바일용 팔 간격 */
  }

  .leg {
    top: 38px; /* 작은 모바일용 다리 위치 */
    width: 5px; /* 작은 모바일용 더 작은 다리 */
    height: 35px; /* 25px에서 35px로 증가하여 다리 길이 늘림 */
    border-radius: 2.5px;
  }

  .leg-left {
    left: 10px; /* 작은 모바일용 다리 간격 */
  }

  .leg-right {
    right: 10px; /* 작은 모바일용 다리 간격 */
  }

  .screen-frame {
    width: 280px; /* 220px에서 280px로 더 크게 증가 */
    height: 160px; /* 130px에서 160px로 더 크게 증가 */
  }

  .screen-header {
    height: 25px; /* 20px에서 25px로 증가 */
    margin-bottom: 10px; /* 8px에서 10px로 증가 */
  }

  .screen-body {
    height: 80px; /* 60px에서 80px로 증가하여 두 줄 텍스트 완벽 수용 */
    font-size: 14px; /* 12px에서 14px로 증가 */
  }

  .artist-btn,
  .dev-btn {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    margin: 0.5rem;
  }
}

@media (max-width: 360px) {
  /* 매우 작은 모바일 버전 댄스바디 */
  .dancer-body {
    width: 40px; /* 매우 작은 모바일용 가장 작은 크기 */
    height: 70px; /* 매우 작은 모바일용 가장 작은 높이 */
    border-radius: 5px;
  }

  .head {
    top: -3px; /* 매우 작은 모바일용 머리 위치 */
    width: 15px; /* 매우 작은 모바일용 가장 작은 머리 */
    height: 15px;
  }

  .torso {
    top: 10px; /* 매우 작은 모바일용 몸통 위치 */
    width: 8px; /* 매우 작은 모바일용 가장 작은 몸통 */
    height: 25px;
    border-radius: 4px;
  }

  .arm {
    top: 14px; /* 매우 작은 모바일용 팔 위치 */
    width: 2.5px; /* 매우 작은 모바일용 가장 작은 팔 */
    height: 18px;
  }

  .arm-left {
    left: 6px; /* 매우 작은 모바일용 팔 간격 */
  }

  .arm-right {
    right: 6px; /* 매우 작은 모바일용 팔 간격 */
  }

  .leg {
    top: 30px; /* 매우 작은 모바일용 다리 위치 */
    width: 4px; /* 매우 작은 모바일용 가장 작은 다리 */
    height: 28px; /* 20px에서 28px로 증가하여 다리 길이 늘림 */
    border-radius: 2px;
  }

  .leg-left {
    left: 8px; /* 매우 작은 모바일용 다리 간격 */
  }

  .leg-right {
    right: 8px; /* 매우 작은 모바일용 다리 간격 */
  }

  .screen-frame {
    width: 200px; /* 140px에서 200px로 더 크게 증가 */
    height: 120px; /* 80px에서 120px로 더 크게 증가 */
  }

  .screen-header {
    height: 18px; /* 14px에서 18px로 증가 */
    margin-bottom: 6px; /* 5px에서 6px로 증가 */
  }

  .screen-body {
    height: 60px; /* 40px에서 60px로 증가하여 두 줄 텍스트 완벽 수용 */
    font-size: 10px; /* 8px에서 10px로 증가 */
  }

  .artist-btn,
  .dev-btn {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
    margin: 0.2rem;
  }
}
