/* ===========================
   GLOBAL
=========================== */
body {
  background: #0f172a;
  background-image: linear-gradient(to bottom, #000, #181818, #1f1f1f);
  background-repeat: no-repeat;       /* ⭐ กันไม่ให้พื้นหลังซ้ำ */
  background-attachment: fixed;       /* ⭐ ล็อคพื้นหลัง */
  background-size: cover;             /* ⭐ ทำให้เต็มจอจริง */
  color: #fff;
  font-family: "Inter", sans-serif;
  margin: 0;

  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
}


@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.container {
  max-width: 600px;
  margin: auto;
  padding: 30px;
}

h1 {
  text-align: center;
  margin-bottom: 25px;
  font-size: 26px;
  font-weight: 600;
}

/* ===========================
   SEARCH BOX
=========================== */
#search {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 20px;
  background: #1a1a1a;
  border: 1px solid #464646;
  border-radius: 10px;
  color: white;
  font-size: 16px;
  transition: 0.2s;
  box-sizing: border-box;
}

#search:focus {
  outline: none;
  border-color: #ffffff;
  box-shadow: 0 0 0 2px #1a1a1a;
}

/* ===========================
   MEMBER ITEM
=========================== */
.item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  background: #252525;
  border-radius: 12px;
  margin-bottom: 12px;
  border: 1px solid transparent;
  transition: 0.2s;

  opacity: 0;
  transform: translateY(15px);
  animation: itemFade 0.4s ease forwards;
}

@keyframes itemFade {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Animation delay ทีละตัว */
.item:nth-child(n) {
  animation-delay: calc(0.05s * var(--i));
}

.item:hover {
  border-color: #ffffff;
  background: #3f3f3f;
}

/* ===========================
   LEFT SECTION (AVATAR + NAME)
=========================== */
.left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  background: #444444;
}

.avatar-wrap {
  width: 50px;
  height: 50px;
  position: relative;
  flex-shrink: 0;
}

.initial {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #4b4b4b;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  font-weight: 700;
  color: #cbd5e1;
  position: absolute;
  top: 0;
  left: 0;
}

.name {
  font-size: 16px;
  font-weight: 600;
}

.link {
  color: #c0c0c0;
  font-size: 14px;
  display: block;
  margin-top: 2px;
}

/* ===========================
   FACEBOOK BUTTON
=========================== */
.fb {
  font-size: 22px;
  color: #ffffff;
  text-decoration: none;
  transition: 0.2s;
}

.fb:hover {
  color: #0073ff;
  transform: scale(1.1);
}

/* ===========================
   PAGINATION
=========================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin: -10px 0;
}

.page-btn {
  background: #444444;
  padding: 8px 20px;
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: 0.2s;
}

.page-btn:not(.disabled):hover {
  background: #979797;
}

.page-btn.active {
  background: #444444;
  cursor: default;
}

.page-btn.disabled {
  background: #353535;
  cursor: default;
  color: #dfdfdf;
}

.page-info {
  color: #ffffff;
  font-size: 15px;
}

/* ===========================
   CREDITS
=========================== */
.footer-credit,
.footer-credit2 {
  text-align: center;
  font-size: 10px; /* ⭐ เล็กลงตามที่ขอ */
  color: #646464;
}

.footer-credit {
  margin-top: 60px;
}

.footer-credit2 {
  margin-top: -5px;
}

/* ===========================
   BOTTOM NAV
=========================== */
.bottom-nav {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 20px 0 40px;
}

.nav-btn {
  background: #444444;
  padding: 8px 20px;
  border-radius: 8px;
  text-decoration: none;
  color: white;
  font-weight: 600;
}

.nav-btn.active {
  background: #444444;
}

/* ===========================
   LOGO
=========================== */
.logo {
  width: 120px;
  display: block;
  margin: 0 auto 20px auto;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 480px) {
  h1 {
    font-size: 22px;
  }

  .name { font-size: 15px; }
  .link { font-size: 12px; }
  .fb { font-size: 20px; }

  .logo { width: 95px; }

  .page-btn {
    padding: 7px 16px;
    font-size: 14px;
  }

  .footer-credit,
  .footer-credit2 {
    font-size: 8.5px; /* ⭐ เล็กลงบนมือถือ */
  }
}
