@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;700&display=swap');

body {
  font-family: 'Noto Sans KR', sans-serif;
  background-color: rgb(255, 244, 229);
  color: #2b2b2b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: auto;
  margin: 0;
  padding-top: 10px;
  transition: background-color 0.2s ease;
}

h1 {
  margin-bottom: 20px;
  color: #222;
}

.button-container {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.rotate-btn {

  transition: transform 0.4s ease;
}


button {
/*  background-color: #007bff;*/
  background: #f59e6e;   /* 살구 포인트 */
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

@keyframes shake {
  0%   { transform: translateX(0); }
  25%  { transform: translateX(-2px); }
  50%  { transform: translateX(2px); }
  75%  { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}

/* 기본 hover 떨림 */
button:hover:not(.no-hover) {
  animation: shake 0.3s linear infinite;
}

/* hover 완전 차단 */
button.no-hover {
  animation: none !important;
}

/* 클릭 회전 */
button.rotating {
  transform: rotate(20deg);
  transition: transform 0.35s cubic-bezier(.2,.8,.3,1);
}

/* 원상복구 */
button.reset {
  transform: rotate(0deg);
  transition: transform 0.5s ease;
}
#wordList {
  margin-top: 0px;
  width: 80%;
  max-width: 800px;
  background: white;
  padding: 7.5px 30px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  font-size: 18px;
  line-height: 1.8;
  color: #000;
}



.word-item {
  
  margin-bottom: 15px;
}

.english {
  font-weight: bold;
  font-size: 20px;
}

.ipa {
  color: #555;
}

@media (max-width: 768px) {
  /* 1. 하단 여백 해결 및 배경 설정 */
  html, body {
    height: auto;
    min-height: 100vh; /* 화면 전체 높이를 확보 */
    background-color: rgb(255, 244, 229); /* 기존 배경색 유지 */
  }

  body {
    padding: 20px 0 40px; /* 하단에 적절한 숨통(여백) 확보 */
    justify-content: flex-start; 
  }

  /* 2. 제목 최적화 */
  h1 {
    font-size: 1.5rem;
    margin-bottom: 24px;
    font-weight: 700;
  }

  /* 3. 버튼 영역: "앱" 버튼처럼 변경 */
  .button-container {
    flex-direction: column;
    width: 85%; /* 양옆 여백 확보 */
    gap: 10px;
    margin-bottom: 30px;
  }

  button {
    width: 100%;
    padding: 14px 0; /* 터치하기 편하도록 높이 증가 */
    font-size: 1.05rem;
    border-radius: 12px; /* 둥글게 */
    box-shadow: 0 4px 0px #d4865a; /* 버튼 하단 입체감 */
    transition: transform 0.1s, box-shadow 0.1s; /* 부드러운 클릭 애니메이션 */
    /* 모바일에서는 hover 애니메이션 제거 */
  }

  /* 모바일 터치 시 클릭 효과 */
  button:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0px #d4865a;
  }

  /* 4. 단어 리스트: 모바일 전용 카드 디자인 */
  #wordList {
    width: 85%; /* 버튼 컨테이너와 정렬 맞춤 */
    padding: 24px 20px;
    font-size: 16px;
    border-radius: 16px; /* 부드러운 곡선 */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05); /* 은은한 그림자 */
    line-height: 1.6;
  }

  .word-item {
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #eee; /* 구분선 */
  }

  .word-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
  }

  .english {
    font-size: 1.2rem;
  }

  .ipa {
    display: block; /* 줄바꿈 */
    margin-top: 4px;
    font-size: 0.9rem;
    color: #777;
  }
}

  
