:root {
  --yellow: #FFC800;
  --black: #111;
  --gray: #666;
  --light: #f9f9f9;
}

/* RESET */
* {
  box-sizing: border-box;
}

/* BODY */
body {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f3f3f3;
  margin: 0;
  padding: 16px;

  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100dvh;
}

/* CONTAINER */
.container {
  width: 100%;
  max-width: 380px;
  padding: 24px 18px;

  background: white;
  border-radius: 20px;

  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* TITLE */
h2 {
  text-align: center;
  margin-bottom: 20px;
  font-weight: 600;
  color: var(--black);
}

/* INPUT */
input {
  width: 100%;
  padding: 14px 14px;
  margin-top: 12px;

  border-radius: 12px;
  border: 1px solid #e8e8e8;

  background: var(--light);
  font-size: 14px;

  transition: all 0.2s ease;
}

/* FOCUS */
input:focus {
  outline: none;
  border-color: var(--yellow);
  background: white;
  box-shadow: 0 0 0 3px rgba(255,200,0,0.15);
}

/* ROW (optional future use) */
.row {
  display: flex;
  gap: 10px;
}

.row input {
  flex: 1;
}

button {
  width: 100%;
  margin-top: 20px;
  padding: 14px;

  border-radius: 14px;
  border: none;

  background: var(--yellow);
  color: black;
  font-weight: 600;

  display: flex;               /* 🔥 penting */
  justify-content: center;
  align-items: center;

  position: relative;          /* 🔥 penting */
}

/* BUTTON HOVER */
button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255,200,0,0.4);
}

/* BUTTON ACTIVE */
button:active {
  transform: scale(0.98);
}

/* LOADING */
.loading {
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  color: var(--gray);
}

/* SUCCESS */
.success {
  background: #fff9db;
  color: #8a6d00;
  border-left: 4px solid var(--yellow);

  padding: 12px;
  border-radius: 10px;
  margin-top: 14px;
  text-align: center;

  animation: fadeIn 0.25s ease;
}

/* ERROR */
.error {
  background: #ffecec;
  color: red;
  padding: 12px;
  border-radius: 10px;
  margin-top: 14px;
  text-align: center;
}

/* ANIMATION */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* MOBILE FIX */
@media (max-width: 480px) {
  body {
    padding: 0;
  }

  .container {
    border-radius: 0;
    height: 100dvh;
    justify-content: center;
    display: flex;
    flex-direction: column;
  }
}
/* BUTTON LOADING STATE */
button.loading {
  position: relative;
  opacity: 0.8;
  pointer-events: none;
}

button.loading::after {
  content: "";
  width: 16px;
  height: 16px;

  border: 2px solid rgba(0,0,0,0.2);
  border-top: 2px solid black;
  border-radius: 50%;

  position: absolute;
  right: 12px;

  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

button {
  transition: all 0.2s ease;
}

button:disabled {
  opacity: 0.7;
}

/* NAVBAR */
.bottom-nav {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);

  width: 92%;
  max-width: 420px;
  height: 62px;

  background: #ffc800;
  border-radius: 30px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 6px;
  box-shadow: 0 10px 16px rgba(0,0,0,0.2);
  z-index: 100;
}
body {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.nav-item {
  transition: all 0.25s ease;
}

.nav-item.active {
  transition: all 0.25s ease;
}
/* ITEM */
.nav-item {
  flex: 1;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 30px;
  gap: 6px;

  transition: all 0.25s ease;
  cursor: pointer;
}

/* ICON */
.icon {
  width: 20px;
  height: 20px;

  filter: brightness(0) invert(1); /* putih */
  transition: 0.2s;
}

/* LABEL */
.label {
  font-size: 13px;
  font-weight: 500;

  opacity: 0;
  width: 0;
  overflow: hidden;
  transition: all 0.25s ease;
  white-space: nowrap;
}

/* ACTIVE */
.nav-item.active {
  flex: 0 0 46px; /* 🔥 fix size biar bulat */
  height: 46px;

  background: white;
  border-radius: 50%; /* 🔥 ini bikin lingkaran */

  display: flex;
  justify-content: center;
  align-items: center;

  box-shadow: 0 2px 6px rgba(0,0,0,0.15); /* 🔥 shadow tipis */
}

/* ACTIVE ICON */
.nav-item.active .icon {
  filter: brightness(0) invert(0); /* hitam */
}

/* ACTIVE LABEL */
.nav-item.active .label {
  opacity: 1;
  width: auto;
  color: black;
}

/* NON ACTIVE */
.nav-item:not(.active) {
  opacity: 0.6;
}
.bottom-nav {
  transform: translateX(-50%) translateY(0);
  transition: 0.3s ease;
}