.fox-hantu-card {
    position: relative;
    display: grid;
    gap: 10px;
    grid-template-columns: 40px 1fr 1fr 1fr;
    align-items: center;
    background: #fff;
    border: 1px solid #96bee1;
    border-radius: 10px;
    padding: 10px;
    margin: 15px 0;
}

span.fox-hantu-hui {
    position: absolute;
    background: #96bee1;
    bottom: 10px;
    top: 10px;
    display: block;
    width: 5px;
    left: 10px;
    border-radius: 10px;
}

.fox-hantu-card:hover span.fox-hantu-hui{
  background: #777;
}
.fox-hantu-card:hover .fox-hantu-edit-btn svg{
   color:#777;
}

  .fox-hantu-card-index span {
    display: flex;
    text-align: center;
    color: #a12424;
    background: #fff;
    justify-content: center;
    align-items: center;
    align-content: center;
}

  .fox-hantu-pinyin {
    color: #777;
    font-style: italic;
  }

  .fox-hantu-tag {
    font-size: 12px;
    color: #777;
    margin-top: 4px;
  }

  .fox-hantu-edit-btn {
    margin-left: auto;
    cursor: pointer;
    opacity: 0.9;
  }

  .fox-hantu-edit-btn svg {
    width: 28px;
    height: 28px;
    color: #a12424;
  }

.fox-hantu-hanzi {
    font-weight: bold;
}


.fox-hantu-vidu {
  background: #fffdf7; /* màu giấy */
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 16px 20px 16px 40px; /* chừa lề trái */
  position: relative;
  font-family: "Segoe UI", Arial, sans-serif;
  margin-top: 20px;
}

/* gáy giấy bên trái */
.fox-hantu-vidu::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  width: 2px;
  height: 100%;
  background: #f2a3a3; /* đỏ nhạt */
}

/* tiêu đề */
.fox-hantu-vidu > span {
  display: inline-block;
  font-weight: 600;
  color: #555;
}

/* nội dung giấy kẻ */
.fox-hantu-vidu-content {
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 27px,
    #eaeaea 28px
  );
  line-height: 28px;
  padding: 4px 0;
}

/* dòng chữ Hán */
.fox-hantu-vidu-content-1 {
  font-size: 18px;
  font-weight: 500;
  color: #222;
}

/* dòng dịch */
.fox-hantu-vidu-content div {
  color: #444;
}

/* Hiển thị nhiều ô HanziWriter cạnh nhau trong khung hình */
.hantu-box-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    text-align: center;
}

.hantu-box-hinh {
    display: flex;
    align-content: center;
    justify-content: center;
    align-items: center;
}
.hantu-char {
    border: 3px solid #dfdfdf;
    border-radius: 10px;
    margin-bottom: 10px;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.hantu-char svg {
    position: relative;
    z-index: 1;
}

/* Đường kẻ dấu cộng ở giữa ô chữ */
.hantu-char::before,
.hantu-char::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background-color: #e0e0e0;
    pointer-events: none;
}

/* Đường kẻ dọc */
.hantu-char::before {
    width: 1px;
    height: 100%;
}

/* Đường kẻ ngang */
.hantu-char::after {
    width: 100%;
    height: 1px;
}

div#character-target-div {
    border: 2px solid #ccc;
    border-radius: 10px;
    margin: auto;
}

.hantu-box-nut {
    width: 200px;
    display: flex;
    gap: 10px;
    align-content: center;
    justify-content: center;
    align-items: center;
    margin: auto;
}

.hantu-box-nut button {
    height: 50px;
    width: 50px;
    border-radius: 100%;
    color: #a12424;
    background: none;
    border: 2px solid #a12424;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    align-content: center;
}
.hantu-box-nut button:hover{
    background: #a12424;
    color: #fff;
}

.hantu-box-nut button svg{
  width:25px;
  height:25px;
}

/* Nút 1 và 3 nhỏ hơn */
.hantu-box-nut button:first-child,
.hantu-box-nut button:last-child {
    height: 40px;
    width: 40px;
}

.hantu-box-nut button:first-child svg,
.hantu-box-nut button:last-child svg {
  width:20px;
  height:20px;
}
.foxhan-view {
    text-align: center;
    margin-top: 10px;
    display: flex;
    align-content: center;
    justify-content: center;
    align-items: center;
    gap: 10px;
}
.foxhan-view span{
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid #ccc;
  color:#b17171;
  border-radius: 5px;
  font-size: 14px;
}

.fox-hantu-luyen-img {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 10px;
    border: 1px solid #02ab02b8;
    background: #f4fff4;
    padding: 10px;
    border-radius: 10px;
}

.fox-hantu-luyen-img img{
    width: 100%;
    max-width: 500px;
}
button.fox-hantu-speak{background: none;}
button.fox-hantu-speak span {
    display: inline-flex;
    gap: 10px;
    padding: 2px 10px;
    border: 1px solid #a12424;
    background: #a12424;
    font-weight: bold;
    color: #fff;
    border-radius: 5px;
    align-content: center;
    justify-content: center;
    align-items: center;
    height: 27px;
}
button.fox-hantu-speak:hover span {
  background: #333;
  border-color:#333;
}