.navbar {
  display: flex;
  position: sticky;
  top: 0;
  left: 0;
  align-items: center;
  justify-content: space-between;
  height: 110px;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 0 30px;
  z-index: 85;
}

.navbar .logo {
  display: flex;
  align-items: center;
  gap: 2em;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.search-bar {
  position: relative;
  display: inline-block;
}

.search-bar input {
  width: 400px;
  height: 60px;
  padding: 0 44px 0 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  outline: none;
  box-sizing: border-box;
  font-size: 14px;
}

.search-bar .search-button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  height: 30px;
  width: 30px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 16px;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
}

.challenge-card {
  display: inline-flex;
  align-items: center;
  width: 264px;
  height: 56px;
  cursor: pointer;
  gap: 16px;
  padding: 8px 16px;
  background-color: #fbfbfb;
  border: 1px solid #e9e9e9;
  border-radius: 7px;
}

.challenge-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.challenge-icon {
  width: 40px;
  height: 40px;
}

.challenge-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 144px;
}

.challenge-label {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  color: #141414;
  white-space: nowrap;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background-color: #e3e8e0;
  border: 1px solid #fcfff8;
  border-radius: 6px;
  overflow: hidden;
  padding: 1px;
}

.progress-fill {
  height: 100%;
  width: 69px;
  background-color: #e3e8e0;
  border-radius: 6px;
}

.challenge-counter {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
}

.counter-current {
  color: #141414;
}

.counter-total {
  color: #676767;
}

.login-button {
  width: 120px;
  height: 50px;
  font-size: 16px;
  color: #fff;
  background-color: #be263b;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.profile {
  position: relative;
  display: none;
  /* Default hidden, shown when logged in */
}

.profile img {
  width: 56px;
  height: 56px;
  border-radius: 4px;
  cursor: pointer;
}

.overlay {
  position: absolute;
  top: 75px;
  right: -15px;
  width: 290px;
  background-color: #fff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  display: none;
  z-index: 100;
}

.overlay.active {
  display: block;
}

.overlay .profile-info {
  display: flex;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid #f0f0f0;
}

.overlay .profile-info img {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  margin-right: 10px;
}

.overlay .profile-info .details {
  font-size: 14px;
  cursor: pointer;
}

.overlay .profile-info .details .name {
  font-weight: bold;
}

.overlay .menu {
  list-style: none;
  margin: 0;
  padding: 10px 0;
}

.overlay .menu li {
  padding: 10px 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 14px;
}

.overlay .menu li:hover {
  background-color: #f0f0f0;
}

.overlay .menu li img {
  margin-right: 12px;
  width: 24px;
}

#profile-email {
  word-break: break-word;
}

/* Media Query for Smaller Screens */
@media (max-width: 768px) {
  .navbar {
    padding: 0 20px;
  }

  .search-bar input {
    width: 250px;
    padding: 0 36px 0 8px;
  }

  .challenge-card {
    width: auto; /* drop fixed 264px */
    height: auto; /* drop fixed 56px */
    padding: 6px 12px;
    gap: 12px;
  }

  .challenge-info {
    width: 100px;
  }

  /* .navbar .logo img {
    width: 60px;
    height: 24px;
  } */

  .login-button {
    padding: 6px 10px;
    font-size: 16px;
  }

  .overlay .profile-info {
    padding: 10px;
  }
}

@media (max-width: 500px) {
  .navbar {
    padding: 0 10px;
    height: 90px;
  }

  .logo img {
    width: 30px;
  }

  .search-bar input {
    width: 180px;
    padding: 0 32px 0 8px;
    height: 45px;
  }

  /* .search-bar input {
    width: 10px;
  } */

  .challenge-card {
    padding: 4px 8px;
    gap: 8px;
  }

  .challenge-icon {
    width: 28px;
    height: 28px;
  }

  .challenge-info {
    width: 70px;
  }

  .challenge-label {
    font-size: 11px;
  }

  .challenge-counter {
    font-size: 11px;
  }

  .login-button {
    width: 90px;
    height: 45px;
  }

  #sidebar-brand {
    display: none;
  }

  .profile img {
    width: 45px;
    height: 45px;
  }

  .login-button {
    padding: 6px 10px;
    font-size: 16px;
  }

  .overlay .profile-info {
    padding: 8px;
  }

  .overlay .profile-info img {
    width: 45px;
    height: 45px;
  }

  .overlay .menu li {
    padding: 8px 10px;
  }
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none; /* hidden by default */
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.modal-overlay.active {
  display: flex; /* shown when active class is added */
}

.model {
  background: #ffffff;
  border-radius: 16px;
  width: 841px;
  height: auto;
  max-height: 90vh;
  max-width: 95%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
}

/* Modal Header */
.modal-header {
  background: #ffffff;
  border-radius: 16px 16px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 12px 24px;
}

.modal-title {
  font-size: 32px;
  font-weight: 600;
  line-height: 48px;
  color: #2d2d2d;
}

.modal-close {
  width: 48px;
  height: 48px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}

/* Modal Body */
.modal-body {
  padding: 0 32px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Summary Card */
.summary-card-wrapper {
  position: relative;
  margin-top: 18px;
}

.timer-badge {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  height: 36px;
  background: #fbfbfb;
  border: 1px solid #e9e9e9;
  border-radius: 8px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #676767;
  white-space: nowrap;
  z-index: 5;
}

.timer-badge strong {
  color: #2d2d2d;
  font-weight: 600;
}

.summary-card {
  background: #fbfbfb;
  border: 1px solid #ffffff;
  border-radius: 16px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 0 26px;
  overflow: hidden;
}

.summary-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  padding-right: 32px;
}

.completed-label {
  font-size: 16px;
  font-weight: 600;
  color: #2d2d2d;
}

.summary-progress-bar {
  width: 100%;
  height: 16px;
  background: #ecf0e7;
  border-radius: 6px;
  overflow: hidden;
}

.summary-progress-fill {
  height: 100%;
  background: #63a14c;
  border-radius: 6px;
  transition: width 0.3s ease;
}

.summary-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 180px;
  flex-shrink: 0;
  height: 100%;
  margin-right: 0px;
}

.ticket-visual {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -15px;
}

.ticket-visual img,
.ticket-visual svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.reward-title {
  font-size: 13px;
  font-weight: 600;
  color: #141414;
  text-align: center;
  line-height: 1.1;
  margin-top: -8px;
}

.reward-subtitle {
  font-size: 11px;
  color: #676767;
  text-align: center;
  margin-top: 0px;
}

/* Challenge Items */
.challenges-section {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.challenge-divider {
  width: 100%;
  height: 1px;
  background: #d4d4d4;
  border: none;
  margin: 0;
}

.challenge-item {
  width: 100%;
  background: #ffffff;
  border: none;
  border-radius: 0;
  padding: 18px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.challenge-item-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.challenge-item-icon {
  width: 55px;
  height: 55px;
  flex-shrink: 0;
  background: #f5f5f5;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.challenge-item-icon img {
  width: 24px;
  height: 24px;
}

.challenge-item-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 518px;
  flex-shrink: 0;
  min-width: 0;
}

.challenge-item-top-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.challenge-item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.challenge-item-name {
  font-size: 14px;
  font-weight: 600;
  color: #141414;
  line-height: 20px;
}

.challenge-item-sub {
  font-size: 12px;
  color: #676767;
  font-weight: 400;
  line-height: 18px;
}

.challenge-item-count {
  font-size: 14px;
  font-weight: 500;
  color: #2d2d2d;
  line-height: 18px;
  white-space: nowrap;
  flex-shrink: 0;
}

.challenge-item-bar {
  width: 518px;
  height: 9px;
  background: #e9e9e9;
  border-radius: 6px;
  overflow: hidden;
}

.challenge-item-fill {
  height: 100%;
  background: #676767;
  border-radius: 6px;
  transition: width 0.3s ease;
}

/* Challenge Item Right */
.challenge-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 6px;
  flex-shrink: 0;
  width: 118px;
}

/* Points Badge */
.points-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  white-space: nowrap;
}

.points-badge img {
  width: 20px;
  height: 19px;
}

/* Buttons */
.btn-claim {
  width: 85px;
  height: 40px;
  background: #be263b;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 16px;
  transition:
    background 0.15s,
    transform 0.1s;
  white-space: nowrap;
}

.btn-claim:hover {
  background: #a0202f;
}

.btn-claim:active {
  transform: scale(0.97);
}

.btn-invite {
  width: 118px;
  height: 34px;
  background: #fbfbfb;
  color: #374151;
  border: 1px solid #e9e9e9;
  border-radius: 8px;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 16px;
  white-space: nowrap;
  transition: background 0.15s;
}

.btn-invite:hover {
  background: #f3f4f6;
}

/* Check Circle */
.check-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
}
