:root {
  --bg: #0b0d13;
  --bg-soft: #12141c;
  --card: rgba(24, 27, 37, 0.72);
  --card-solid: #171a24;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e8eaf0;
  --muted: #9aa3b2;
  --blurple: #5865f2;
  --blurple-hover: #4752c4;
  --green: #57f287;
  --yellow: #fee75c;
  --red: #ed4245;
  --radius: 16px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- background orbs ---------- */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.bg-orb--1 {
  width: 520px;
  height: 520px;
  top: -180px;
  left: -140px;
  background: radial-gradient(circle, #5865f2, transparent 70%);
}

.bg-orb--2 {
  width: 460px;
  height: 460px;
  bottom: -200px;
  right: -120px;
  background: radial-gradient(circle, #eb459e, transparent 70%);
}

/* ---------- topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 44px);
  background: rgba(11, 13, 19, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.brand__mark {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--blurple), #eb459e);
  box-shadow: 0 0 18px rgba(88, 101, 242, 0.7);
}

.auth {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.userchip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.userchip img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: block;
}

.userchip__name {
  font-size: 14px;
  font-weight: 600;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- layout ---------- */
.page {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 40px) clamp(16px, 4vw, 28px) 64px;
  flex: 1;
}

.view {
  animation: fade 0.35s ease both;
}

.hidden {
  display: none !important;
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.grid {
  display: grid;
  gap: 18px;
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-bottom: 18px;
}

/* ---------- tab admin ---------- */
.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 20px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 13px;
}

.tab {
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.tab--active,
.tab--active:hover {
  background: var(--blurple);
  color: #fff;
}

.tabpanel {
  animation: fade 0.3s ease both;
}

.tabpanel > .card + .card {
  margin-top: 18px;
}

/* ---------- landing: event ---------- */
.event {
  text-align: center;
  padding: clamp(18px, 4vw, 44px) 0 40px;
}

.event__eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 11.5px;
  font-weight: 800;
  color: #c3c9ff;
  background: rgba(88, 101, 242, 0.16);
  border: 1px solid rgba(88, 101, 242, 0.45);
  border-radius: 999px;
  padding: 5px 14px;
  margin: 0 0 18px;
}

.event__title {
  font-size: clamp(32px, 6.5vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.5px;
  margin: 0 0 16px;
  background: linear-gradient(120deg, #fff 25%, #ffd7f0 62%, #b3baff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.event__lead {
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 26px;
}

.event__lead b {
  color: var(--text);
}

.event__rewards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 34px 0 0;
  text-align: left;
}

.reward-tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.reward-tile--robux {
  border-color: rgba(254, 231, 92, 0.38);
  background: linear-gradient(150deg, rgba(254, 231, 92, 0.1), transparent 62%), var(--card);
}

.reward-tile--item {
  border-color: rgba(88, 101, 242, 0.45);
  background: linear-gradient(150deg, rgba(88, 101, 242, 0.18), transparent 62%), var(--card);
}

.reward-tile__streak {
  margin: 0 0 12px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.reward-tile__prize {
  display: flex;
  align-items: center;
  gap: 14px;
}

.reward-tile__icon,
.reward-tile__art {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
}

.reward-tile__art {
  object-fit: cover;
}

.reward-tile__value {
  margin: 0 0 2px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.event__steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  padding: 0;
  margin: 28px 0 0;
  text-align: left;
}

.event__steps li {
  counter-increment: step;
  position: relative;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px 14px 54px;
  color: var(--muted);
  font-size: 14px;
}

.event__steps li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--blurple);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.event__steps b {
  color: var(--text);
}

/* ---------- kartu map event ---------- */
.event__map {
  margin: 30px 0 0;
}

.mapcard {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.mapcard:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.mapcard__art {
  width: 200px;
  max-width: 42%;
  object-fit: cover;
  flex: 0 0 auto;
  background: var(--bg);
}

.mapcard__info {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.mapcard__label {
  margin: 0;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
}

.mapcard__name {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.mapcard .chip {
  align-self: flex-start;
  margin-top: 6px;
}

@media (max-width: 560px) {
  .mapcard {
    flex-direction: column;
  }

  .mapcard__art {
    width: 100%;
    max-width: none;
    height: 160px;
  }
}

/* ---------- cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.card__title {
  margin: 0 0 14px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--muted);
}

.card__head .card__title {
  margin: 0;
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---------- identity blocks ---------- */
.identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.identity__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  object-fit: cover;
  background: var(--bg-soft);
}

.identity__name {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.identity__sub {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.identity a {
  color: #a8b1ff;
  text-decoration: none;
}

.identity a:hover {
  text-decoration: underline;
}

/* ---------- stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}

.stat {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}

.stat__label {
  font-size: 13px;
  color: var(--muted);
}

.stat__value {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-top: 4px;
}

.stat__value small {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 6px;
}

.stat--missing .stat__value {
  font-size: 16px;
  color: var(--muted);
  font-weight: 500;
}

/* ---------- rewards ---------- */
.rewards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.reward {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reward--done {
  border-color: rgba(87, 242, 135, 0.4);
  background: rgba(87, 242, 135, 0.07);
}

.reward__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.reward__name {
  font-weight: 700;
  font-size: 16px;
}

.reward__meta {
  color: var(--muted);
  font-size: 13px;
}

.reward__code {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0c0e14;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 15px;
  word-break: break-all;
}

.reward__code code {
  flex: 1;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-soft);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.08s ease, border-color 0.15s ease;
  text-decoration: none;
}

.btn:hover {
  background: #1e2230;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--blurple);
  color: #fff;
}

.btn--primary:hover {
  background: var(--blurple-hover);
}

.btn--discord {
  background: var(--blurple);
  color: #fff;
}

.btn--discord:hover {
  background: var(--blurple-hover);
}

.btn--ghost {
  background: transparent;
  border-color: var(--border-strong);
}

.btn--success {
  background: rgba(87, 242, 135, 0.16);
  border-color: rgba(87, 242, 135, 0.45);
  color: #b7f7cc;
}

.btn--success:hover {
  background: rgba(87, 242, 135, 0.24);
}

.btn--lg {
  padding: 14px 26px;
  font-size: 16px;
  border-radius: 12px;
}

.btn--sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn--block {
  width: 100%;
}

/* ---------- forms ---------- */
.field {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.input,
.textarea {
  flex: 1;
  min-width: 0;
  background: #0e1119;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.textarea {
  width: 100%;
  resize: vertical;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
}

.input:focus,
.textarea:focus {
  border-color: var(--blurple);
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.25);
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.statline {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.statline b {
  color: var(--text);
}

/* ---------- misc ---------- */
.muted {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

/* ---------- item reward ---------- */
.itemcard {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.16), rgba(235, 69, 158, 0.12));
  border: 1px solid rgba(88, 101, 242, 0.35);
  border-radius: 14px;
  padding: 12px 14px;
}

.itemcard__art {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
}

.itemcard__info {
  flex: 1 1 180px;
  min-width: 0;
}

.itemcard__name {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 2px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(88, 101, 242, 0.18);
  border: 1px solid rgba(88, 101, 242, 0.4);
  color: #b9c0ff;
}

.chip--ok {
  background: rgba(87, 242, 135, 0.16);
  border-color: rgba(87, 242, 135, 0.45);
  color: #b7f7cc;
}

.chip--warn {
  background: rgba(254, 231, 92, 0.14);
  border-color: rgba(254, 231, 92, 0.45);
  color: #ffeaa0;
}

/* ---------- riwayat klaim ---------- */
.subtitle {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
  margin: 4px 0 0;
  font-weight: 700;
}

.hist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hist__item {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}

.hist__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hist__badge {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
}

.hist__badge--code {
  background: rgba(88, 101, 242, 0.18);
  border-color: rgba(88, 101, 242, 0.45);
  color: #b9c0ff;
}

.hist__badge--robux {
  background: rgba(254, 231, 92, 0.14);
  border-color: rgba(254, 231, 92, 0.45);
  color: #ffeaa0;
}

.hist__date {
  font-size: 12px;
  color: var(--muted);
}

.hist__sub {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.hist__sub code {
  background: #0c0e14;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  padding: 2px 8px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  color: var(--text);
}

.hist__sub .btn {
  margin-left: 8px;
  vertical-align: middle;
}

/* ---------- daftar user (admin) ---------- */
.users {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.userrow {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}

.userrow--simple {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.avatar-sm {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg);
  border: 2px solid var(--border-strong);
  flex: 0 0 auto;
}

.userrow__who {
  flex: 1 1 150px;
  min-width: 0;
}

.userrow__who .identity__name {
  font-size: 15px;
}

.userrow__arrow {
  color: var(--muted);
  font-size: 18px;
}

.userrow a {
  color: #a8b1ff;
  text-decoration: none;
}

.userrow a:hover {
  text-decoration: underline;
}

.pill {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(88, 101, 242, 0.18);
  border: 1px solid rgba(88, 101, 242, 0.4);
  color: #b9c0ff;
}

.note {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13.5px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}

.note--warn {
  border-color: rgba(254, 231, 92, 0.4);
  background: rgba(254, 231, 92, 0.09);
}

.note--error {
  border-color: rgba(237, 66, 69, 0.45);
  background: rgba(237, 66, 69, 0.1);
}

.note--success {
  border-color: rgba(87, 242, 135, 0.4);
  background: rgba(87, 242, 135, 0.08);
}

.note b {
  color: #fff;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 0;
  color: var(--muted);
}

.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--blurple);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- toast ---------- */
.toast-wrap {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(360px, calc(100vw - 36px));
}

.toast {
  background: var(--card-solid);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--blurple);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  font-size: 14px;
  animation: toastin 0.25s ease both;
}

.toast--error {
  border-left-color: var(--red);
}

.toast--success {
  border-left-color: var(--green);
}

.toast--warn {
  border-left-color: var(--yellow);
}

@keyframes toastin {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- footer ---------- */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 22px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
}

.footer .dot {
  margin: 0 8px;
}

@media (max-width: 520px) {
  .card__head {
    flex-wrap: wrap;
  }
}
