:root {
  --bg: #070512;
  --panel: rgba(16, 12, 34, 0.82);
  --gold: #ffcc66;
  --pink: #ff6fb5;
  --violet: #a78bfa;
  --text: #f4efff;
  --muted: #a79bc4;
  --line: rgba(255, 204, 102, 0.18);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 20%, rgba(167, 139, 250, 0.18), transparent 28%),
    radial-gradient(circle at 82% 8%, rgba(255, 111, 181, 0.12), transparent 26%),
    radial-gradient(circle at 50% 100%, rgba(255, 204, 102, 0.08), transparent 34%),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(167, 139, 250, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(167, 139, 250, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 30%, #000, transparent 78%);
  z-index: 0;
}

.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}
.glow-a { width: 420px; height: 420px; left: -120px; top: 20%; background: rgba(167, 139, 250, 0.16); }
.glow-b { width: 380px; height: 380px; right: -100px; top: 10%; background: rgba(255, 111, 181, 0.12); }

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.75'/%3E%3C/svg%3E");
}

.topbar, main, footer { position: relative; z-index: 2; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(18px, 4vw, 54px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: #fff4d6;
  text-shadow: 0 0 18px rgba(255, 204, 102, 0.35);
}
.brand i { color: var(--pink); font-style: normal; }
.orb {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 204, 102, 0.45);
  border-radius: 50%;
  background: rgba(255, 204, 102, 0.08);
  box-shadow: 0 0 22px rgba(255, 204, 102, 0.18);
  font-size: 15px;
}

.tag {
  padding: 7px 12px;
  border: 1px solid rgba(255, 204, 102, 0.22);
  border-radius: 999px;
  color: #d8c9a6;
  font-family: Consolas, "Courier New", monospace;
  font-size: 9px;
  letter-spacing: 0.16em;
  white-space: nowrap;
}

main {
  width: min(1180px, calc(100% - 36px));
  margin: 6px auto 0;
}

.hero {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 54px);
  align-items: center;
  padding: 12px 0 34px;
}

.portrait-card { position: relative; }

.portrait-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 204, 102, 0.42);
  border-radius: 22px;
  background: #0b0818;
  box-shadow:
    0 0 0 1px rgba(255, 111, 181, 0.12) inset,
    0 24px 60px rgba(0, 0, 0, 0.5),
    0 0 45px rgba(167, 139, 250, 0.12);
}
.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(7, 5, 18, 0.8));
  pointer-events: none;
}
.portrait-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 0.72;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.04);
}
.portrait-caption {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 12px;
  padding-left: 4px;
}
.portrait-caption b {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  letter-spacing: 0.16em;
  color: #ffe8b8;
}
.portrait-caption span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.kicker {
  margin: 0 0 10px;
  color: var(--gold);
  font-family: Consolas, "Courier New", monospace;
  font-size: 10px;
  letter-spacing: 0.28em;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 5.4vw, 64px);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #fff7e8;
  text-shadow: 0 0 36px rgba(255, 204, 102, 0.14);
}

.lead {
  max-width: 680px;
  margin: 16px 0 28px;
  color: #cfc5e2;
  font-size: 14px;
  line-height: 1.7;
}

form {
  padding: 20px;
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(21, 15, 43, 0.82), rgba(11, 8, 24, 0.7));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
}

.person {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(167, 139, 250, 0.13);
}
.person:first-of-type { padding-top: 0; }
.person-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffe6b0;
  font-family: Consolas, "Courier New", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
}
.person-title span { color: var(--pink); }

label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 11px;
  background: rgba(7, 5, 18, 0.72);
  color: #fff7e8;
  font-size: 13px;
  outline: none;
  transition: 0.2s ease;
}
input::placeholder { color: #6d6386; }
input:focus {
  border-color: rgba(255, 204, 102, 0.6);
  box-shadow: 0 0 0 3px rgba(255, 204, 102, 0.09);
}
input[type="date"] { color-scheme: dark; }

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 13px 18px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: 0.2s ease;
}
.btn.primary {
  flex: 1;
  background: linear-gradient(120deg, #ffcc66, #ff8fc4);
  color: #241232;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(255, 143, 196, 0.20);
}
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 16px 34px rgba(255, 143, 196, 0.3); }
.btn.ghost {
  border: 1px solid rgba(255, 204, 102, 0.24);
  background: rgba(255, 204, 102, 0.04);
  color: #e8dcc2;
}
.btn.ghost:hover { background: rgba(255, 204, 102, 0.1); }

.error {
  min-height: 16px;
  margin: 10px 0 0;
  color: #ff9aae;
  font-size: 12px;
}

.result {
  margin: 12px 0 48px;
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid rgba(255, 204, 102, 0.22);
  border-radius: 26px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 204, 102, 0.08), transparent 34%),
    linear-gradient(140deg, rgba(24, 17, 49, 0.94), rgba(9, 7, 20, 0.9));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
  transition: 0.35s ease;
}
.result.hidden { display: none; }

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.score-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
}
.score-ring {
  --p: 0;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--gold) calc(var(--p) * 1%), rgba(255, 204, 102, 0.12) 0);
  box-shadow: 0 0 38px rgba(255, 204, 102, 0.18);
  position: relative;
}
.score-ring::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #0c081a;
}
.score-inner { position: relative; z-index: 1; text-align: center; }
.score-inner b {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  line-height: 1;
  color: #fff2cf;
}
.score-inner span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-family: Consolas, "Courier New", monospace;
  font-size: 8px;
  letter-spacing: 0.2em;
}
.result-kicker {
  margin: 0 0 6px;
  color: var(--gold);
  font-family: Consolas, "Courier New", monospace;
  font-size: 9px;
  letter-spacing: 0.24em;
}
.result h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 500;
  color: #fff5dd;
}
.muted { margin: 6px 0 0; color: var(--muted); font-size: 12px; }

.weton-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 24px 0;
}
.weton-card {
  padding: 18px;
  border: 1px solid rgba(167, 139, 250, 0.18);
  border-radius: 18px;
  background: rgba(10, 7, 22, 0.62);
}
.weton-card h3 {
  margin: 0 0 3px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 500;
  color: #ffe9b8;
}
.weton-card .weton-name {
  color: var(--pink);
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
}
.weton-card .weton-meta {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.weton-card .weton-meta div {
  padding: 8px 9px;
  border-radius: 9px;
  background: rgba(167, 139, 250, 0.06);
}
.weton-card .weton-meta span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.weton-card .weton-meta b { color: #f5eaff; font-size: 13px; }
.weton-card p { margin: 12px 0 0; color: #c8bddc; font-size: 12px; line-height: 1.55; }

.narasi {
  display: grid;
  gap: 12px;
  padding: 6px 2px 18px;
  border-bottom: 1px solid rgba(167, 139, 250, 0.12);
}
.narasi p {
  margin: 0;
  color: #d8cfe8;
  font-size: 14px;
  line-height: 1.75;
}
.narasi p:first-child::first-letter {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  color: var(--gold);
  float: left;
  line-height: 0.8;
  margin: 5px 6px 0 0;
}

.cocoklogi-box {
  margin-top: 18px;
  padding: 16px 18px;
  border-left: 2px solid rgba(255, 204, 102, 0.55);
  background: rgba(255, 204, 102, 0.035);
  border-radius: 0 14px 14px 0;
}
.cocoklogi-title {
  color: var(--gold);
  font-family: Consolas, "Courier New", monospace;
  font-size: 9px;
  letter-spacing: 0.22em;
}
.cocoklogi-box p { margin: 7px 0 0; color: #d8cfe8; font-size: 12px; line-height: 1.6; }

.disclaimer {
  margin: 20px 0 0;
  color: #7f7398;
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(167, 139, 250, 0.1);
  color: #6f6488;
  font-family: Consolas, "Courier New", monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 26px; }
  .portrait-card { max-width: 300px; margin: 0 auto; }
  h1 { font-size: clamp(36px, 10vw, 54px); }
  .weton-grid { grid-template-columns: 1fr; }
  .tag { display: none; }
}

@media (max-width: 560px) {
  .person { grid-template-columns: 1fr; }
  .actions { flex-direction: column; align-items: stretch; }
  .btn.ghost { text-align: center; }
  .score-ring { width: 100px; height: 100px; }
  .score-inner b { font-size: 34px; }
  .result-head { align-items: flex-start; }
}
