/* ✅ 전체 구조 안정화 */
#heada {
  margin-top: 100px;
}

.Topic {
  text-align: center;
  margin-bottom: 40px;
}

.buttons {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* ✅ 주제 버튼 스타일 */
.button {
 padding: 8px 16px;
  background: linear-gradient(45deg, #00bfff, #2980b9); /* 하늘색 계열 */
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.3s ease;
  background-size: 200% 200%;
  animation: gradientAnimation 5s linear infinite;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
}

/* ✅ Furigana 토글 버튼 */
#toggleFurigana {
  display: block;
  margin: 20px auto;
  padding: 8px 16px;
  background: linear-gradient(45deg, #87cefa, #2980b9); /* 연한 하늘색 → 진한 하늘색 */
  color: #fff;
  border: none;
  border-radius: 25px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

#toggleFurigana:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
  background: linear-gradient(45deg, #2980b9, #1e90ff);
}

/* ✅ 표 컨테이너 */
.hiragana-container {
  width: 90%;
  max-width: 800px;
  margin: 50px auto;
  text-align: center;
  display: none;
  animation: fadeIn 0.5s ease;
}

/* ✅ 표 */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 18px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  background-color: #fff;
}

thead {
  background: linear-gradient(45deg, #2980b9, #2980b9); /* 하늘색 계열 */
  color: #fff;
}

th, td {
  border: 1px solid #ddd;
  padding: 12px 10px;
}

tbody tr:nth-child(even) {
  background-color: #f0f8ff; /* 연한 하늘색 배경 */
}

tbody tr:hover {
  background-color: #add8e6; /* 밝은 하늘색 */
}

th:nth-child(1),
td:nth-child(1) {
  width: 50%;
}

th:nth-child(2),
td:nth-child(2) {
  width: 50%;
}

/* ✅ 위로가기 버튼 */
#btn-back-to-top {
  display: none;
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 9999;
  border: none;
  outline: none;
  background-color: #555;
  color: white;
  cursor: pointer;
  padding: 15px 18px;
  border-radius: 50px;
  font-size: 14px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#btn-back-to-top:hover {
  background-color: #333;
  transform: translateY(-2px);
}

/* ✅ 반응형 디자인 */
@media (max-width: 768px) {
  .buttons {
    gap: 8px;
  }

  .button, #toggleFurigana {
    font-size: 14px;
    padding: 8px 14px;
  }

  table {
    font-size: 15px;
  }

  th, td {
    padding: 8px;
  }

  #heada {
    margin-top: 60px;
  }
}

/* ✅ 애니메이션 */
@keyframes gradientAnimation {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
