/* XRZ v33 — tema modern (dimuat setelah style.css, menimpa token & komponen) */
:root {
  --primary: #3B82F6; --secondary: #2563EB;
  --bg: #070B14; --card: rgba(17,24,39,.72); --border: rgba(148,163,184,.16);
  --text: #F1F5F9; --text-2: #94A3B8;
  --radius: 22px; --radius-sm: 14px; --border-w: 1px;
  --shadow-block: 0 18px 50px -18px rgba(0,0,0,.65);
  --shadow-block-hover: 0 24px 60px -18px rgba(37,99,235,.35);
  --glow: 0 0 0 1px rgba(59,130,246,.3), 0 0 36px rgba(59,130,246,.28);
}
html[data-theme="light"] {
  --bg: #EEF2FA; --card: rgba(255,255,255,.82); --border: rgba(15,23,42,.1);
  --text: #0B1220; --text-2: #5B6779;
  --shadow-block: 0 18px 50px -20px rgba(30,64,175,.25);
  --shadow-block-hover: 0 24px 60px -18px rgba(37,99,235,.3);
}
body {
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(59,130,246,.22), transparent 60%),
    radial-gradient(700px 480px at 100% 10%, rgba(139,92,246,.16), transparent 60%),
    var(--bg) fixed;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.topbar { background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.hero-card, .panel-card, .chat-shell, .meta-card, .modal-card, .admin-stat, .feature {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-block); backdrop-filter: blur(16px);
}
.hero-card { padding: 48px 36px; text-align: center; }
.hero-card h1 { font-size: clamp(34px, 7vw, 52px); letter-spacing: -.03em;
  background: linear-gradient(120deg, var(--text), #93C5FD 55%, #C4B5FD); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { display: inline-block; padding: 6px 14px; border-radius: 999px; background: rgba(59,130,246,.14); color: #93C5FD; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.btn { border-radius: 14px; border-width: 1px; font-weight: 700; transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s; }
.btn-primary { background: linear-gradient(135deg, #3B82F6, #6366F1); border-color: transparent; color: #fff; box-shadow: 0 10px 28px -10px rgba(79,70,229,.7); }
.btn-primary:hover { background: linear-gradient(135deg, #2563EB, #4F46E5); transform: translateY(-2px); box-shadow: 0 16px 34px -10px rgba(79,70,229,.8); }
.btn-primary:disabled { filter: grayscale(.6); opacity: .45; box-shadow: none; }
.btn-ghost, .btn-secondary { background: rgba(148,163,184,.08); border-color: var(--border); }
.btn-danger-outline { border-color: rgba(239,68,68,.55); }
.btn-danger { background: linear-gradient(135deg, #EF4444, #DC2626); border-color: transparent; color: #fff; }
.meta-card { padding: 18px; } .hero-meta { gap: 14px; }

.feature-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 18px 0; }
.feature { padding: 20px; text-align: left; } .feature span { font-size: 22px; }
.feature strong { display: block; margin: 8px 0 4px; } .feature p { margin: 0; color: var(--text-2); font-size: 13px; line-height: 1.5; }

.blocked-banner { text-align: left; margin: 22px auto 6px; padding: 16px 18px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(239,68,68,.16), rgba(239,68,68,.06)); border: 1px solid rgba(239,68,68,.45); }
.blocked-banner p { margin: 6px 0; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.blocked-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.blocked-meta .reason-chip { background: rgba(239,68,68,.14); border-color: rgba(239,68,68,.4); color: #FCA5A5; font-size: 12px; }
.blocked-hint { font-size: 12px !important; opacity: .8; }

.msg-bubble { border: 0; border-radius: 18px; padding: 10px 14px; box-shadow: 0 6px 18px -10px rgba(0,0,0,.5); }
.msg-me { background: linear-gradient(135deg, #3B82F6, #6366F1); border-bottom-right-radius: 6px; }
.msg-them { background: rgba(148,163,184,.14); border-bottom-left-radius: 6px; }
html[data-theme="light"] .msg-them { background: #E4EAF5; }
.chat-input-row input { border-radius: 14px; background: rgba(148,163,184,.08); border: 1px solid var(--border); }
.pulse-ring { border-color: rgba(59,130,246,.5); }

/* ---------- ADMIN ---------- */
#app { max-width: 1280px; }
.admin-grid { gap: 14px; }
.admin-stat { padding: 20px; position: relative; overflow: hidden; }
.admin-stat::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(var(--primary), #8B5CF6); }
.admin-stat strong { font-size: 30px; letter-spacing: -.02em; }
.section-title { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 17px; }
.section-title::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 12px var(--primary); }
table { display: block; overflow-x: auto; white-space: nowrap; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); border-collapse: separate; border-spacing: 0; box-shadow: var(--shadow-block); }
thead th { position: sticky; top: 0; background: color-mix(in srgb, var(--card) 92%, #000); }
tbody tr:hover td { background: rgba(59,130,246,.07); }
th, td { border-bottom: 1px solid var(--border); padding: 11px 14px; }
tbody:empty::after { content: "Belum ada data"; display: block; padding: 14px; color: var(--text-2); }
.gate { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow-block); }
.gate input, input, select, textarea { border-radius: 12px !important; border: 1px solid var(--border) !important; }
@media (max-width: 640px) { .hero-card { padding: 34px 20px; } .panel-card { padding: 28px 20px; } }

/* =================== v34: ikon, layout rapi, animasi =================== */
.xi { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.2em; }
.inline-i { display: inline-block; width: 1.1em; height: 1.1em; vertical-align: -.18em; color: #FBBF24; }
.theme-toggle { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 12px; color: var(--text-2); }
.theme-toggle:hover { color: var(--text); transform: rotate(-12deg); }
.theme-toggle .xi { width: 18px; height: 18px; }

/* hero: rata tengah yang benar */
.hero-card { position: relative; overflow: hidden; }
.hero-card .lead { max-width: 44ch; margin: 14px auto 28px; text-align: center; color: var(--text-2); font-size: 17px; line-height: 1.6; }
.hero-actions { display: flex; justify-content: center; }
.hero-links { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 22px; }
.link-btn { color: var(--text-2); text-decoration: none; font-size: 13px; }
.link-btn:hover { color: var(--text); text-decoration: underline; }
.btn-lg { padding: 16px 38px; font-size: 16px; }

/* kartu fitur dengan ikon tile */
.feature { transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; }
.feature:hover { transform: translateY(-4px); border-color: rgba(96,165,250,.45); box-shadow: 0 22px 50px -22px rgba(59,130,246,.55); }
.ficon { display: grid !important; place-items: center; width: 42px; height: 42px; border-radius: 13px; margin-bottom: 4px;
  color: #BFDBFE; background: linear-gradient(135deg, rgba(59,130,246,.28), rgba(139,92,246,.22)); border: 1px solid rgba(147,197,253,.25); }
.ficon .xi { width: 22px; height: 22px; transition: transform .35s var(--ease); }
.feature:hover .ficon .xi { transform: scale(1.18) rotate(-8deg); }
.bb-title { display: flex; align-items: center; gap: 8px; color: #FCA5A5; font-size: 16px; }

/* ---------- animasi ---------- */
@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spin-ang { to { --ang: 360deg; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes drift-a { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(8vw,6vh) scale(1.2); } }
@keyframes drift-b { 0%,100% { transform: translate(0,0) scale(1.1); } 50% { transform: translate(-10vw,-5vh) scale(.9); } }
@keyframes sheen { 0% { transform: translateX(-130%) skewX(-18deg); } 55%,100% { transform: translateX(260%) skewX(-18deg); } }
@keyframes float-y { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes ripple { 0% { transform: scale(.7); opacity: .65; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes dot-ping { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); } 100% { box-shadow: 0 0 0 9px rgba(34,197,94,0); } }
@keyframes shake { 20%,60% { transform: translateX(-5px); } 40%,80% { transform: translateX(5px); } }

body::before, body::after { content: ""; position: fixed; z-index: -1; border-radius: 50%; filter: blur(90px); pointer-events: none; }
body::before { width: 46vw; height: 46vw; left: -12vw; top: -14vw; background: rgba(59,130,246,.22); animation: drift-a 22s ease-in-out infinite; }
body::after { width: 40vw; height: 40vw; right: -10vw; top: 18vh; background: rgba(139,92,246,.18); animation: drift-b 26s ease-in-out infinite; }

.hero-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--ang), transparent 0 55%, #60A5FA 72%, #A78BFA 86%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin-ang 7s linear infinite; }
.hero-card > * { animation: fade-up .7s var(--ease) both; }
.hero-card > :nth-child(2) { animation-delay: .08s; } .hero-card > :nth-child(3) { animation-delay: .16s; }
.hero-card > :nth-child(4) { animation-delay: .24s; } .hero-card > :nth-child(5) { animation-delay: .32s; } .hero-card > :nth-child(6) { animation-delay: .4s; }
.feature, .meta-card { animation: fade-up .7s var(--ease) both; }
.feature:nth-child(1) { animation-delay: .35s; } .feature:nth-child(2) { animation-delay: .45s; } .feature:nth-child(3) { animation-delay: .55s; }
.meta-card:nth-child(1) { animation-delay: .6s; } .meta-card:nth-child(2) { animation-delay: .7s; } .meta-card:nth-child(3) { animation-delay: .8s; }
.meta-card strong { font-size: 26px; letter-spacing: -.02em; }
.logo svg { animation: float-y 4s ease-in-out infinite; filter: drop-shadow(0 6px 14px rgba(37,99,235,.5)); }
.dot-on { animation: dot-ping 1.8s ease-out infinite; }
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after { content: ""; position: absolute; top: 0; bottom: 0; width: 38%; left: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: sheen 3.6s ease-in-out infinite; }
.btn:active { transform: scale(.97); }
.panel-card, .modal-card { animation: fade-up .5s var(--ease) both; }
.pulse-ring { position: relative; }
.pulse-ring::before, .pulse-ring::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(96,165,250,.6); animation: ripple 2.4s ease-out infinite; }
.pulse-ring::after { animation-delay: 1.2s; }
.msg-bubble { animation: pop-in .28s var(--ease) both; }
.blocked-banner:not([hidden]) { animation: fade-up .45s var(--ease) both, shake .5s .45s; }
.toast { animation: fade-up .3s var(--ease) both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* =================== v35: animasi "Mencari partner" (radar) =================== */
@keyframes radar-rot { to { transform: rotate(360deg); } }
@keyframes blip { 0%,100% { opacity: 0; transform: scale(.3); } 35% { opacity: 1; transform: scale(1); } 70% { opacity: 0; transform: scale(2.4); } }
@keyframes core-breathe { 0%,100% { box-shadow: 0 0 0 0 rgba(99,102,241,.55), 0 10px 30px -8px rgba(79,70,229,.8); } 50% { box-shadow: 0 0 0 14px rgba(99,102,241,0), 0 10px 30px -8px rgba(79,70,229,.8); } }
@keyframes dot-seq { 0%,80%,100% { opacity: .2; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes phase-cycle { 0% { opacity: 0; transform: translateY(8px); } 6%,30% { opacity: 1; transform: none; } 36%,100% { opacity: 0; transform: translateY(-8px); } }

.radar { position: relative; width: 210px; height: 210px; margin: 4px auto 28px; border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,.14), rgba(59,130,246,.02) 62%, transparent 70%); }
.radar::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1px dashed rgba(148,163,184,.18); animation: radar-rot 40s linear infinite reverse; }
.rr { position: absolute; border-radius: 50%; border: 1px solid rgba(96,165,250,.28); inset: 0; }
.rr2 { inset: 17%; } .rr3 { inset: 34%; border-color: rgba(96,165,250,.4); }
.sweep { position: absolute; inset: 0; border-radius: 50%; animation: radar-rot 2.8s linear infinite;
  background: conic-gradient(from 0deg, transparent 0deg 250deg, rgba(96,165,250,.05) 290deg, rgba(129,140,248,.5) 360deg);
  -webkit-mask: radial-gradient(circle, transparent 20%, #000 21%); mask: radial-gradient(circle, transparent 20%, #000 21%); }
.sweep::before { content: ""; position: absolute; top: 0; left: 50%; width: 2px; height: 50%; margin-left: -1px;
  background: linear-gradient(#A5B4FC, transparent); border-radius: 2px; }
.orbit { position: absolute; border-radius: 50%; animation: radar-rot 7s linear infinite; inset: 0; }
.orbit i { position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: #93C5FD; box-shadow: 0 0 14px 2px rgba(96,165,250,.9); }
.o2 { inset: 17%; animation-duration: 5s; animation-direction: reverse; } .o2 i { background: #C4B5FD; box-shadow: 0 0 14px 2px rgba(167,139,250,.9); }
.o3 { inset: 34%; animation-duration: 3.4s; } .o3 i { width: 6px; height: 6px; margin-left: -3px; top: -3px; }
.blip { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #34D399; box-shadow: 0 0 12px #34D399; opacity: 0; animation: blip 3.6s ease-out infinite; }
.b1 { top: 18%; left: 70%; } .b2 { top: 66%; left: 22%; animation-delay: 1.1s; } .b3 { top: 30%; left: 26%; animation-delay: 2.2s; } .b4 { top: 74%; left: 68%; animation-delay: .5s; }
.core { position: absolute; inset: 0; margin: auto; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px;
  background: linear-gradient(135deg, #3B82F6, #6366F1); border: 1px solid rgba(255,255,255,.25); animation: core-breathe 2.4s ease-out infinite; }
h2.searching { margin: 0 0 6px; font-size: 24px; letter-spacing: -.02em; }
.dots { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: middle; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: dot-seq 1.2s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
.phase { position: relative; height: 22px; margin: 4px 0 14px; color: #93C5FD; font-size: 14px; font-weight: 600; }
.phase span { position: absolute; inset: 0; opacity: 0; animation: phase-cycle 9s ease-in-out infinite; }
.phase span:nth-child(2) { animation-delay: 3s; } .phase span:nth-child(3) { animation-delay: 6s; }
#queueSession { display: inline-block; padding: 4px 12px; border-radius: 999px; background: rgba(148,163,184,.1); border: 1px solid var(--border); font-size: 12px; letter-spacing: .04em; }
@media (max-width: 420px) { .radar { width: 180px; height: 180px; } }

/* =================== v36: FX, ruang obrolan AI, transisi =================== */
#fxCanvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; opacity: .75; }
@keyframes screen-in { from { opacity: 0; transform: translateY(16px) scale(.985); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes text-sheen { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes bubble-r { from { opacity: 0; transform: translateX(16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes bubble-l { from { opacity: 0; transform: translateX(-16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes ai-drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes match-flash { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.75); } 100% { box-shadow: 0 0 0 30px rgba(52,211,153,0); } }
@keyframes spark { 0%,100% { transform: scale(1) rotate(0); filter: drop-shadow(0 0 0 transparent); } 50% { transform: scale(1.2) rotate(8deg); filter: drop-shadow(0 0 6px #A78BFA); } }

.screen.active { animation: screen-in .55s var(--ease) both; }
.hero-card h1 { background: linear-gradient(110deg, var(--text) 0%, #93C5FD 38%, #C4B5FD 62%, var(--text) 100%); background-size: 240% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: fade-up .7s var(--ease) .08s both, text-sheen 8s ease-in-out .9s infinite; }
.feature, .meta-card { position: relative; animation-fill-mode: backwards; transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .2s ease-out, border-color .25s, box-shadow .25s; }
.feature:hover, .meta-card:hover { transform: perspective(700px) translateY(-4px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.feature::after, .meta-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(200px circle at var(--mx, 50%) var(--my, 50%), rgba(96,165,250,.2), transparent 70%); }
.feature:hover::after, .meta-card:hover::after { opacity: 1; }
.msg-me { animation: bubble-r .3s var(--ease) both; } .msg-them { animation: bubble-l .3s var(--ease) both; }

.ai-hint { margin: 2px auto 12px; max-width: 34ch; font-size: 13px; line-height: 1.5; color: #C4B5FD; opacity: .9; }
.ai-wait { margin: 0 16px 8px; padding: 10px 14px; border-radius: 14px; background: linear-gradient(135deg, rgba(139,92,246,.16), rgba(59,130,246,.1)); border: 1px solid rgba(167,139,250,.35); animation: fade-up .4s var(--ease) both; }
.ai-wait[hidden] { display: none; }
.ai-wait-top { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.ai-wait-top span:nth-child(2) { flex: 1; } .ai-wait-top b { color: var(--text); font-size: 16px; font-variant-numeric: tabular-nums; } .ai-wait-top small { color: var(--text-2); }
.ai-spark { display: grid; color: #C4B5FD; animation: spark 2s ease-in-out infinite; } .ai-spark .xi { width: 16px; height: 16px; }
.ai-track { height: 4px; margin-top: 8px; border-radius: 4px; overflow: hidden; background: rgba(148,163,184,.18); }
.ai-track i { display: block; height: 100%; width: 100%; transform-origin: left; border-radius: 4px; background: linear-gradient(90deg, #60A5FA, #A78BFA, #F0ABFC); box-shadow: 0 0 12px rgba(167,139,250,.8); }
.ai-badge { margin-left: 6px; padding: 2px 7px; border-radius: 7px; font-size: 10px; font-weight: 800; letter-spacing: .06em; color: #fff; background: linear-gradient(135deg, #8B5CF6, #3B82F6); vertical-align: 1px; }
.ai-mode #btnNext, .ai-mode #btnReport { display: none; }
.ai-mode .chat-partner .dot-on { background: #A78BFA; box-shadow: 0 0 10px #A78BFA; }
.match-flash { animation: match-flash 1.1s ease-out; }

.end-pop { position: fixed; left: 0; right: 0; bottom: 28px; margin: 0 auto; width: min(92vw, 380px); padding: 22px; text-align: center; z-index: 80;
  border-radius: 22px; background: var(--card); border: 1px solid var(--border); backdrop-filter: blur(18px); box-shadow: 0 30px 70px -20px rgba(0,0,0,.7); animation: fade-up .5s var(--ease) both; transition: opacity .3s, translate .3s; }
.end-pop.out { opacity: 0; translate: 0 14px; }
.end-pop strong { display: block; margin: 10px 0 4px; font-size: 16px; } .end-pop p { margin: 0 0 14px; color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.end-ic { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto; border-radius: 14px; color: #FCD34D; background: rgba(251,191,36,.14); border: 1px solid rgba(251,191,36,.3); }
.end-ic .xi { width: 22px; height: 22px; }
