*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:'Poppins', sans-serif;
}

/* =========================
   MENU TOGGLE
========================= */

.menu-toggle{
    position:fixed;
    top:20px;
    right:20px;
    left:auto;

    width:50px;
    height:50px;

    background:#ff4d6d;
    color:white;

    font-size:28px;

    display:flex;
    justify-content:center;
    align-items:center;

    border-radius:12px;

    cursor:pointer;

    z-index:1001;

    box-shadow:0 4px 10px rgba(0,0,0,0.2);

    transition:0.3s;
}

.menu-toggle:hover{
    transform:scale(1.05);
}

/* =========================
   DROPDOWN MENU
========================= */

.dropdown-menu{
    position:fixed;

    top:80px;
    right:20px;
    left:auto;

    width:240px;

    background:white;

    border-radius:15px;

    box-shadow:0 5px 15px rgba(0,0,0,0.15);

    padding:15px;

    display:none;

    flex-direction:column;

    gap:12px;

    z-index:99999;

    overflow:hidden;
}

/* SAAT MENU AKTIF */

.dropdown-menu.active{
    display:flex;
}

/* LINK MENU */

.dropdown-menu a{
    text-decoration:none;

    color:#333;

    background:#f5f5f5;

    padding:14px;

    border-radius:12px;

    font-size:17px;

    transition:0.3s;
}

.dropdown-menu a:hover{
    background:#ff4d6d;
    color:white;

    transform:translateX(5px);
}

body{
  min-height:100vh;
  padding:20px;
  background:#ffe6ef;
  background-image:url("depan.BG.png");
  background-size:cover;
  background-position:center;
  background-attachment:fixed;
}

/* =========================
   CONTAINER
========================= */

.container{
  max-width:900px;
  margin:auto;
  background:rgba(255,255,255,0.15);
  backdrop-filter:blur(10px);
  border-radius:30px;
  padding:20px;
  box-shadow:0 10px 30px rgba(0,0,0,0.15);
}

/* =========================
   JUDUL
========================= */

h1{
  text-align:center;
  color:white;
  margin-bottom:25px;
  font-size:32px;
  text-shadow:0 3px 10px rgba(0,0,0,0.2);
}

/* =========================
   MENU
========================= */

.menu{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:12px;
  margin-bottom:25px;
}

.menu button{
  width:130px;
  background:linear-gradient(135deg,#ff9ec2,#ff6fa5);
  color:white;
  border:none;
  padding:14px 34px;
  border-radius:18px;
  font-size:16px;
  font-weight:bold;
  text-align: center;
  cursor:pointer;
  box-shadow:0 6px 15px rgba(255,111,165,0.4);
  transition:0.25s;
}

.menu button:hover{
  transform:translateY(-3px) scale(1.03);
  box-shadow:0 10px 20px rgba(255,111,165,0.5);
}

/* =========================
   CARD (ANTI SHIFT)
========================= */

.card{
  background:rgba(255,255,255,0.92);
  border-radius:30px;
  padding:20px 20px;
  text-align:center;
  box-shadow:0 10px 25px rgba(0,0,0,0.1);
  animation:fadeIn 0.3s ease;

  margin-bottom:40px;

  width:100%;
  height:420px;          /* tetap tinggi fix */
  display:flex;
  flex-direction:column;
  justify-content:flex-start; /* biar isi tidak “loncat” */
  gap:10px;              /* jarak antar elemen stabil */
}


.kotoba{
  font-size:70px;
  margin-top: 15px;
  color:#000;
  margin-bottom:10px;
  font-weight:bold;
}

ruby rt{
  font-size:25px;
  margin-bottom: 5px;
  color:#4d4d4d;
}

/* =========================
   ARTI + PENJELASAN (FIX STABIL)
========================= */

.arti {
  font-size: 38px;
  color: #555;
  font-weight: bold;
  line-height: 1.2;
  /* Memberikan ruang tetap agar penjelasan tidak naik saat arti pendek */
  min-height: 50px; 
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0px; /* Jarak kecil ke penjelasan */
}

.penjelasan {
  font-size: 22px;
  color: #696969; /* Warna sedikit lebih muda agar kontras dengan arti */
  min-height: 100px; 
  margin-top: 0; /* Menempel tepat di bawah arti */
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0 20px;
}

/* =========================
   BUTTON FLASH / NEXT
========================= */

.flash-buttons{
  margin-top:50px;
  display:flex;
  justify-content:center;
  gap:15px;
  flex-wrap:wrap;
}

.flash-buttons button{
  background:linear-gradient(135deg,#ffb3cc,#ff7aa8);
  border:none;
  padding:14px 22px;
  color:white;
  border-radius:18px;
  font-size:16px;
  font-weight:bold;
  cursor:pointer;
  transition:0.2s;
  box-shadow:0 5px 15px rgba(255,122,168,0.3);
}

.flash-buttons button:hover{
  transform:translateY(-2px);
}

/* tombol utama */
#flashBtn{
  position:absolute;
  bottom:80px;
  left:50%;
  transform:translateX(-50%);
  width:200px;
  ;

  background:linear-gradient(135deg,#ffb3cc,#ff7aa8);
  border:none;
  padding:14px 22px;
  color:white;
  border-radius:18px;
  font-size:18px;
  font-weight:bold;
  cursor:pointer;
  transition:0.2s;
  box-shadow:0 5px 15px rgba(255,122,168,0.3);
}

#flashBtn:hover{
  transform:translateX(-50%) translateY(-2px);
}

#kotobaListBox {
  background: rgba(255, 255, 255, 0.95);
  padding: 20px;
  border-radius: 25px;
  animation: fadeIn 0.3s ease;
}

.kotoba-item {
  background: white;
  padding: 15px;
  border-radius: 15px;
  border-left: 5px solid #007db8;
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.kotoba-item ruby rt {
    font-size: 15px; /* Anda bisa ubah ke 12px jika ingin lebih kecil lagi */
    margin-bottom: 0px;
    color: #888;
}

.kotoba-item ruby {
  font-size: 25px;
  font-weight: bold;
}

.kotoba-item .item-arti {
  font-size: 18px;
  color: #007db8;
  font-weight: bold;
}

.kotoba-item .item-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.4;
}
/* Tambahkan ini di paling bawah file style.css */

#listContainer {
    max-height: 500px; /* Membatasi tinggi kotak agar tidak tembus ke bawah */
    overflow-y: auto;  /* Memunculkan scrollbar jika kata sudah banyak */
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Mempercantik tampilan scrollbar (opsional) */
#listContainer::-webkit-scrollbar {
    width: 8px;
}

#listContainer::-webkit-scrollbar-thumb {
    background: #ff9ec2;
    border-radius: 10px;
}

.search-box input:focus {
    outline: 2px solid #007db8;
    background: #fff;
}

/* =========================
   INFO
========================= */

.info{
  margin-bottom:20px;
  font-size:18px;
  color:#666;
}

/* =========================
   SOAL
========================= */

.question{
  font-size:75px;
  color:#000;
  margin-bottom:15px;
  font-weight:bold;
}

/* =========================
   PILIHAN
========================= */

.option{
  width:80%;
  margin:5px 0;
  padding:12px;
  border:none;
  border-radius:20px;
  background:#d4d4d4;
  font-size:25px;
  cursor:pointer;
  transition:0.2s;
  color:#000;
  font-weight:500;
}

.option:hover{
  transform:scale(1.02);
  background:#ffd0df;
}

.correct{
  background:#6fdc92 !important;
  color:white;
}

.wrong{
  background:#ff6b6b !important;
  color:white;
}

/* =========================
   RESULT
========================= */

#resultBox h2{
  color:#ff4f87;
  margin-bottom:20px;
  font-size:32px;
}

#resultBox p{
  margin:12px 0;
  font-size:22px;
  color:#555;
}

#resultBox button{
  margin-top:25px;
  background:linear-gradient(135deg,#ff9ec2,#ff6fa5);
  border:none;
  color:white;
  padding:14px 24px;
  border-radius:18px;
  font-size:18px;
  cursor:pointer;
  box-shadow:0 5px 15px rgba(255,111,165,0.4);
}

/* =========================
   UTIL
========================= */

.hidden{
  display:none;
}

/* =========================
   ANIMATION
========================= */

@keyframes fadeIn{
  from{
    opacity:0;
    transform:translateY(10px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

/* =========================
   RESPONSIVE
========================= */

@media(max-width:600px){

  h1{
    font-size:24px;
  }

  .kotoba{
    font-size:32px;
  }
  ruby rt {
    font-size: 18px;
  }

  .question{
    font-size:28px;
  }

  .arti{
    font-size:22px;
  }

  .option{
    font-size:16px;
    padding:15px;
  }
  .kotoba-item ruby {
    font-size: 18px; /* Kanji di list agar tidak makan tempat */
  }
  
  .kotoba-item ruby rt {
    font-size: 11px; /* Furigana di list sangat kecil */
  }

}