* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #e8fce8;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top bar */
.top-bar {
  background-color: rgb(95, 190, 125);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  font-size: 18px;
}

/* Main content area */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.card {
  background-color: #c6ffc6;
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 10px;
  font-size: 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.profile1 {
  background-color: #c6ffc6;
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 10px;
  font-size: 20px;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.rewardBox-container {
  display: flex;
  gap: 20px; /* space between cards */
  justify-content: center; /* center the cards horizontally */
}

.rewardBox {
  background-color: #c6ffc6;
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 10px;
  font-size: 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  text-align: center;
  flex: 0 0 auto; /* prevent cards from stretching */
}

.bottom-nav {
  position: fixed; /* instead of relative */
  bottom: 0;
  left: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr auto 1fr 1fr;
  align-items: center;
  height: 70px;
  background: #fff;
  border-top: 1px solid #ccc;
  z-index: 1000; /* keep it above other content */
}

.nav-item {
  text-align: center;
  text-decoration: none;
  color: #000;
}

.nav-item .icon {
  font-size: 22px;
}
.nav-item .label {
  font-size: 12px;
  margin-top: 2px;
}

/* Center QR button */
.nav-center {
  display: flex;
  justify-content: center;
}

.circle-btn {
  width: 80px;
  height: 80px;
  background-color: #1aff00;
  border-radius: 50%;
  border: 4px solid white;
  font-size: 30px;
  color: black;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transform: translateY(-30px); /* optional: to raise it slightly */
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* .circle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background-color: #1aff00;
  border-radius: 50%;
  border: 3px solid white;
  font-size: 24px;
  color: black;
  text-decoration: none;
}*/


/* Responsive */
@media (max-width: 600px) {
  .top-bar {
    font-size: 16px;
  }

  .card {
    font-size: 14px;
  }

  .nav-item .icon {
    font-size: 20px;
  }

  .circle-btn {
    width: 55px;
    height: 55px;
    font-size: 22px;
  }
}

.voucher-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding-bottom: 120px;
}

.voucher-card {
  background-color: white;
  border-radius: 10px;
  text-align: center;
  padding: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.voucher-card img {
  width: 100%;
  border-radius: 8px;
}

.voucher-value {
  font-size: 20px;
  font-weight: bold;
  margin-top: 6px;
}

.voucher-points {
  background-color: #c6ffc6;
  color: #555;
  font-weight: bold;
  padding: 3px 6px;
  border-radius: 5px;
  display: inline-block;
  margin: 5px 0;
}

.voucher-desc {
  font-size: 14px;
  color: #333;
}
.parent {
  position: relative;
  display: inline-block; /* better than inline so size fits content */
}

.parent img:first-child {
  display: block;
  max-width: 100%;   /* make sure it scales inside container */
  height: auto;
}

.ontop {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* centers perfectly */
  max-width: 70%;  /* adjust size of overlay */
  height: auto;
}

.star-balance {
  font-size: 2rem;
  font-weight: bold;
}
.star-icon {
  color: goldenrod;
  margin-left: 4px;
  display: inline-block;             
  animation: spin 4s linear infinite; 
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.milestone {
  font-size: 0.9rem;
  text-align: center;
  flex: 1;
  position: relative;
}
.milestone::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ccc;
}
.milestone.active::before {
  background: goldenrod;
}
.progress-line {
  height: 4px;
  background: #ccc;
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  z-index: -1;
}
.progress-fill {
  height: 4px;
  background: goldenrod;
  width: 45%; /* Adjust according to current stars */
}

.postcontent img {
  width: 100%;          /* take full width of the card */
  height: 300px;        /* set a fixed height (adjust as you like) */
  object-fit: cover;    /* crop to fill while keeping aspect ratio */
  object-position: center; /* keep it centered */
  border-top-left-radius: 0.5rem;  /* optional, match card rounding */
  border-top-right-radius: 0.5rem;
}