*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Noto Sans JP", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
}
li{
    list-style: none;
}
header{
    position: absolute;
    top: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1;
    position: fixed;
}
header .container{
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
}
header button{
    background-color: transparent;
    border: 0;
    cursor: pointer;
    color: white;
}
header button a{
    color: #fff;
    text-decoration: none;
}
header h1 button a{
    color: #FFA500;
    font-size: 2rem;
    font-weight: bold;
}
small{
    font-size: 1rem;
}
.container ul{
    display: flex;
}
.container ul li{
    padding: 10px 15px;
}

.container ul li button{
    font-size: 1.2rem;
}


/* 메인 */
.kanji-top{
    text-align:center;
    margin:100px 0 40px;
}

.kanji-top h2{
    font-size:24px;
    margin-bottom:24px;
}

.grade-menu{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:12px;
}

.grade-btn{
    border:none;
    background:white;
    padding:12px 22px;
    border-radius:14px;
    font-size:12px;
    font-weight:bold;
    cursor:pointer;
    transition:0.2s;
    box-shadow:0 4px 12px rgba(0,0,0,0.08);
}

.grade-btn:hover{
    transform:translateY(-2px);
}

.grade-btn.active{
    background:#222;
    color:white;
}
/* 학년 버튼 */
.grade-menu{
  display:flex;
  justify-content:center;
  gap:12px;
  flex-wrap:wrap;
}

.grade-btn{
  padding:12px 20px;
  border:none;
  border-radius:12px;
  background:white;
  cursor:pointer;
  font-size:12px;
  font-weight:bold;
  box-shadow:0 4px 10px rgba(0,0,0,0.08);
  transition:0.2s;
}

.grade-btn:hover{
  transform:translateY(-2px);
}

.grade-btn.active{
  background:#222;
  color:white;
}

/* 카드 영역 */
.kanji-container{
  max-width:900px;
  margin:0 auto;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
  gap:20px;
}

.meaning{
  text-align:center;
  font-size: 14px;
  margin-bottom: 10px;
}

/* 카드 */
.kanji-card{
  background:white;
  border-radius:24px;
  padding:12px;
  box-shadow:0 8px 20px rgba(0,0,0,0.08);
}

.kanji{
  font-size:48px;
  font-weight:bold;
  text-align:center;
}

.info{
  margin-bottom:12px;
  line-height:1.8;
  font-size:12px;
}

.label{
  font-weight:bold;
  color:#444;
}

/* 단어 */
.word-list{
  margin-top:15px;
}

.word-item{
  background:#f5f5f5;
  border-radius:10px;
  margin-top:8px;
  font-size:12px;
}

/* 페이지네이션 */
.pagination{
  margin-top:40px;
  display:flex;
  justify-content:center;
  align-items:center;
  gap:20px;
}

.pagination button{
  border:none;
  background:#222;
  color:white;
  padding:12px 22px;
  border-radius:12px;
  cursor:pointer;
  font-size:16px;
}

.pagination button:disabled{
  opacity:0.4;
  cursor:not-allowed;
}

#page-info{
  font-size:18px;
  font-weight:bold;
}

/* 음성 */
.word-item{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  border-bottom:1px solid #eee;
}

.word-content{
  flex:1;
  margin-left: 15px;
}

.word-voice-btn{
  border:none;
  background:#f3f4f6;
  border-radius:12px;
  padding:8px 12px;
  cursor:pointer;
  font-size:16px;
  transition:0.2s;
  flex-shrink:0;
}

.word-voice-btn:hover{
  background:#e5e7eb;
}

/* 모바일 */
@media(max-width:768px){

  .top-header h1{
    font-size:30px;
  }

  .kanji{
    font-size:56px;
  }

  .info{
    font-size:16px;
  }

}