/* ZEA — Zenith Exploration Alliance | Gaya utama */
:root {
  --black: #02030a;
  --navy: #070b1f;
  --navy-2: #0d1433;
  --white: #f5f7ff;
  --muted: rgba(226, 232, 255, 0.72);
  --purple: #8b5cf6;
  --blue: #3b82f6;
  --glass: rgba(14, 20, 50, 0.46);
  --glass-strong: rgba(10, 15, 40, 0.78);
  --border: rgba(190, 200, 255, 0.16);
  --border-hot: rgba(167, 139, 250, 0.55);
  --radius-pill: 999px;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --font: "Sora", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--white);
  background: var(--black);
  line-height: 1.55;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }

:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; }

/* Scrollbar kustom */
html { scrollbar-width: thin; scrollbar-color: var(--purple) var(--navy); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--navy); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--purple), var(--blue));
  border-radius: 10px;
  border: 2px solid var(--navy);
}
::selection { background: rgba(139, 92, 246, 0.5); color: #fff; }

/* ---------- Latar ---------- */
.bg {
  position: fixed; inset: 0; z-index: -4;
  background: var(--navy) url("https://ganga--link--ghhzdp9sv8hk.code.run/i/vikatuygzn.jpg") center / cover no-repeat;
  filter: blur(2px);
  transform: scale(1.04);
}
.bg-overlay {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(7, 11, 31, 0.35), rgba(2, 3, 10, 0.88) 78%),
    linear-gradient(180deg, rgba(2, 3, 10, 0.55), rgba(7, 11, 31, 0.78));
}
.nebula {
  position: fixed; inset: -20%; z-index: -3; pointer-events: none;
  background:
    radial-gradient(40% 35% at 20% 25%, rgba(139, 92, 246, 0.28), transparent 70%),
    radial-gradient(45% 40% at 82% 70%, rgba(59, 130, 246, 0.24), transparent 70%),
    radial-gradient(30% 30% at 60% 15%, rgba(99, 102, 241, 0.16), transparent 70%);
  animation: nebula-drift 28s ease-in-out infinite alternate;
}
@keyframes nebula-drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(3%, 2%, 0) scale(1.08); }
}
#starfield { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none; }

/* ---------- Layar pemuatan ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-content: center; justify-items: center; gap: 18px;
  background: radial-gradient(circle at 50% 40%, var(--navy-2), var(--black) 75%);
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader-orbit {
  position: relative; width: 64px; height: 64px; border-radius: 50%;
  border: 1px solid var(--border);
  animation: spin 2.2s linear infinite;
}
.loader-orbit::after {
  content: ""; position: absolute; inset: 50%; width: 14px; height: 14px; margin: -7px;
  border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, var(--purple));
  box-shadow: 0 0 18px var(--purple);
}
.loader-orbit span {
  position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; margin-left: -5px;
  border-radius: 50%; background: var(--blue); box-shadow: 0 0 14px var(--blue);
}
.loader-text { margin: 0; font-size: 0.85rem; letter-spacing: 0.08em; color: var(--muted); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Halaman ---------- */
.page {
  width: 100%; max-width: 460px; margin: 0 auto;
  padding: max(40px, env(safe-area-inset-top)) 20px calc(120px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center;
}

/* Urutan masuk: satu rangkaian saat halaman dibuka */
.page > * { opacity: 0; transform: translateY(14px); }
body.is-ready .page > * { animation: enter 0.8s var(--ease) forwards; }
body.is-ready .page > :nth-child(1) { animation-delay: 0.05s; }
body.is-ready .page > :nth-child(2) { animation-delay: 0.2s; }
body.is-ready .page > :nth-child(3) { animation-delay: 0.35s; }
body.is-ready .page > :nth-child(4) { animation-delay: 0.5s; }
@keyframes enter { to { opacity: 1; transform: none; } }

/* ---------- Profil ---------- */
.profile { text-align: center; width: 100%; }
.avatar-wrap { position: relative; width: 148px; height: 148px; margin: 0 auto 20px; display: grid; place-items: center; }
.avatar {
  position: relative; width: 120px; height: 120px; border-radius: 50%; overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 6px rgba(139, 92, 246, 0.18), 0 0 40px rgba(139, 92, 246, 0.45), 0 14px 40px rgba(0, 0, 0, 0.55);
  background: var(--navy-2);
  animation: float 6s ease-in-out infinite;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1 / 1; }
.avatar-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-weight: 700; font-size: 1.6rem; letter-spacing: 0.06em;
  background: linear-gradient(135deg, var(--purple), var(--blue));
}
.avatar-orbit {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px dashed rgba(190, 200, 255, 0.3);
  animation: spin 18s linear infinite;
}
.avatar-orbit i {
  position: absolute; top: 6px; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 12px 3px var(--blue);
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.brand {
  margin: 0; font-size: 2.6rem; font-weight: 700; line-height: 1; letter-spacing: 0.22em;
  padding-left: 0.22em;
  background: linear-gradient(120deg, #fff 20%, #c4b5fd 60%, #93c5fd);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-full { margin: 10px 0 0; font-size: 0.95rem; font-weight: 300; letter-spacing: 0.32em; text-transform: uppercase; color: var(--muted); }
.brand-desc { margin: 18px auto 0; max-width: 36ch; font-size: 0.92rem; font-weight: 300; color: rgba(236, 240, 255, 0.86); }

/* ---------- Tombol tautan ---------- */
.links { width: 100%; margin-top: 30px; display: flex; flex-direction: column; gap: 14px; }
.extra-links { display: flex; flex-direction: column; gap: 14px; }

.link-btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; gap: 14px; width: 100%;
  min-height: 62px; padding: 10px 18px 10px 14px;
  border-radius: var(--radius-pill);
  background: var(--glass);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  text-align: left; font-weight: 600; letter-spacing: 0.06em; font-size: 0.92rem;
  transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s, background 0.35s;
}
.link-btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: linear-gradient(100deg, rgba(139, 92, 246, 0.4), rgba(59, 130, 246, 0.32));
  transition: opacity 0.35s;
}
.link-icon {
  flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--border);
  transition: background 0.35s, transform 0.35s var(--ease);
}
.link-icon svg { width: 20px; height: 20px; }
.link-label { flex: 1; text-align: center; }
.link-arrow { flex: none; width: 22px; height: 22px; opacity: 0.55; transition: transform 0.35s var(--ease), opacity 0.35s; }
.link-arrow svg { width: 100%; height: 100%; }

@media (hover: hover) {
  .link-btn:hover { transform: translateY(-3px); border-color: var(--border-hot); box-shadow: 0 16px 40px rgba(88, 60, 200, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
  .link-btn:hover::before { opacity: 1; }
  .link-btn:hover .link-icon { background: rgba(255, 255, 255, 0.16); transform: scale(1.06) rotate(-6deg); }
  .link-btn:hover .link-arrow { transform: translateX(3px); opacity: 1; }
}
.link-btn:active { transform: scale(0.975); }

.ripple {
  position: absolute; z-index: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.5), rgba(167, 139, 250, 0.2) 60%, transparent 70%);
  transform: scale(0); animation: ripple 0.65s ease-out forwards;
}
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

/* ---------- Alat bagikan ---------- */
.tools { width: 100%; margin-top: 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tool-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px;
  border-radius: 20px; font-size: 0.74rem; color: var(--muted);
  background: rgba(10, 15, 40, 0.4); border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform 0.3s var(--ease), color 0.3s, border-color 0.3s, background 0.3s;
}
.tool-btn svg { width: 20px; height: 20px; }
@media (hover: hover) { .tool-btn:hover { color: #fff; border-color: var(--border-hot); transform: translateY(-2px); } }
.tool-btn:active { transform: scale(0.95); }

/* ---------- Footer ---------- */
.footer { margin-top: 34px; text-align: center; font-size: 0.78rem; color: var(--muted); }
.footer p { margin: 0; }
.visitors { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: var(--radius-pill); background: rgba(10, 15, 40, 0.4); border: 1px solid var(--border); }
.visitors svg { width: 16px; height: 16px; }
.visitors strong { color: #fff; font-weight: 600; }
.footer .copyright { margin-top: 14px; font-weight: 300; }

/* ---------- Pemutar musik ---------- */
.music {
  position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 40; width: min(440px, calc(100% - 24px));
  display: flex; flex-direction: column; align-items: stretch; gap: 8px;
}
.music-bar {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px;
  border-radius: var(--radius-pill);
  background: var(--glass-strong); border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
}
.music-toggle {
  flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.55);
  transition: transform 0.25s var(--ease);
}
.music-toggle:active { transform: scale(0.9); }
.music-toggle svg { width: 18px; height: 18px; }
.music-toggle .ic-pause { display: none; }
.music.is-playing .music-toggle .ic-play { display: none; }
.music.is-playing .music-toggle .ic-pause { display: block; }

.eq { display: flex; align-items: flex-end; gap: 3px; height: 18px; flex: none; }
.eq i { width: 3px; height: 4px; border-radius: 2px; background: linear-gradient(180deg, #c4b5fd, var(--blue)); }
.music.is-playing .eq i { animation: eq 0.9s ease-in-out infinite; }
.music.is-playing .eq i:nth-child(2) { animation-delay: -0.3s; }
.music.is-playing .eq i:nth-child(3) { animation-delay: -0.6s; }
.music.is-playing .eq i:nth-child(4) { animation-delay: -0.15s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 18px; } }

.music-status { font-size: 0.72rem; color: var(--muted); white-space: nowrap; min-width: 4.5em; }
.music-mute { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.music-mute svg { width: 20px; height: 20px; }
.music-mute .ic-muted { display: none; }
.music.is-muted .music-mute .ic-muted { display: block; }
.music.is-muted .music-mute .ic-vol { display: none; }

.music-volume {
  flex: 1; min-width: 0; height: 22px; -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer;
  --pct: 40%;
}
.music-volume::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--purple) var(--pct), rgba(255, 255, 255, 0.18) var(--pct)); }
.music-volume::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.18); }
.music-volume::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--purple); }
.music-volume::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px rgba(139, 92, 246, 0.8); }
.music-volume::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 10px rgba(139, 92, 246, 0.8); }
.music-percent { font-size: 0.72rem; width: 2.8em; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

.music-prompt {
  align-self: center; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: var(--radius-pill); font-size: 0.8rem; font-weight: 600;
  background: linear-gradient(135deg, var(--purple), var(--blue)); color: #fff;
  box-shadow: 0 8px 26px rgba(99, 102, 241, 0.55);
  animation: pulse 2s ease-in-out infinite;
}
.music-prompt svg { width: 14px; height: 14px; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 18px; }
.modal-backdrop {
  position: absolute; inset: 0; background: rgba(2, 3, 10, 0.72);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity 0.35s var(--ease);
}
.modal-card {
  position: relative; width: 100%; max-width: 440px; max-height: calc(100dvh - 36px); overflow-y: auto;
  border-radius: 28px; padding: 0 22px 22px;
  background: linear-gradient(180deg, rgba(20, 27, 66, 0.92), rgba(7, 11, 31, 0.96));
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65), 0 0 60px rgba(139, 92, 246, 0.18);
  opacity: 0; transform: translateY(26px) scale(0.94);
  transition: opacity 0.35s var(--ease), transform 0.45s var(--ease);
}
.modal-small { max-width: 360px; padding-top: 24px; text-align: center; }
.modal.is-open .modal-backdrop { opacity: 1; }
.modal.is-open .modal-card { opacity: 1; transform: none; }

.owner-cover {
  height: 92px; margin: 0 -22px;
  background:
    radial-gradient(60% 120% at 20% 0%, rgba(139, 92, 246, 0.7), transparent 70%),
    radial-gradient(60% 120% at 90% 20%, rgba(59, 130, 246, 0.6), transparent 70%),
    var(--navy-2);
  border-radius: 28px 28px 0 0;
}
.owner-head { text-align: center; }
.owner-head h2 { margin: 0; font-size: 1.2rem; font-weight: 700; }
.owner-avatar {
  width: 84px; height: 84px; margin: -42px auto 12px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 1.4rem; letter-spacing: 0.06em;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  border: 3px solid var(--navy); box-shadow: 0 0 30px rgba(139, 92, 246, 0.55);
}
.owner-role { margin: 4px 0 0; font-size: 0.85rem; color: #c4b5fd; }
.owner-body { margin-top: 18px; display: grid; gap: 12px; }
.info-row {
  display: flex; justify-content: space-between; gap: 16px; padding: 11px 14px; font-size: 0.86rem;
  border-radius: 16px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border);
}
.info-row span:first-child { color: var(--muted); }
.info-row span:last-child { text-align: right; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 12px; font-size: 0.78rem; border-radius: var(--radius-pill); background: rgba(139, 92, 246, 0.18); border: 1px solid rgba(167, 139, 250, 0.4); }
.owner-section-title { margin: 6px 0 -4px; font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.owner-desc { margin: 0; font-size: 0.88rem; font-weight: 300; color: rgba(236, 240, 255, 0.9); }
.modal-actions { margin-top: 20px; display: flex; justify-content: center; }
.btn-back {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: var(--radius-pill);
  font-weight: 600; font-size: 0.88rem; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--border);
  transition: background 0.3s, transform 0.3s var(--ease);
}
.btn-back svg { width: 16px; height: 16px; }
@media (hover: hover) { .btn-back:hover { background: rgba(139, 92, 246, 0.35); } }
.btn-back:active { transform: scale(0.96); }

.qr-box { width: 236px; height: 236px; margin: 18px auto 0; padding: 8px; border-radius: 20px; background: #fff; display: grid; place-items: center; }
.qr-box img, .qr-box canvas { width: 220px !important; height: 220px !important; }
.qr-box .qr-msg { color: #1b1f3b; font-size: 0.8rem; padding: 12px; }
.qr-url { margin: 14px 0 0; font-size: 0.75rem; color: var(--muted); word-break: break-all; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; top: max(18px, env(safe-area-inset-top)); z-index: 90;
  transform: translate(-50%, -20px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px); padding: 10px 18px; border-radius: var(--radius-pill);
  font-size: 0.82rem; text-align: center;
  background: var(--glass-strong); border: 1px solid var(--border-hot);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease);
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

.noscript { position: fixed; inset: auto 12px 12px; z-index: 120; margin: 0; padding: 12px; border-radius: 14px; background: #1b1f3b; font-size: 0.85rem; text-align: center; }

/* ---------- Responsif ---------- */
@media (max-width: 380px) {
  .page { padding-left: 14px; padding-right: 14px; }
  .brand { font-size: 2.2rem; }
  .brand-full { letter-spacing: 0.2em; font-size: 0.82rem; }
  .link-btn { font-size: 0.84rem; letter-spacing: 0.04em; }
  .music-status { display: none; }
}
@media (min-width: 768px) {
  .page { max-width: 500px; padding-top: 64px; }
  .avatar-wrap { width: 168px; height: 168px; }
  .avatar { width: 136px; height: 136px; }
  .brand { font-size: 3rem; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .page { padding-top: 24px; }
}

/* ---------- Kurangi gerakan ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .page > * { opacity: 1; transform: none; }
}
