:root {
  --navy: #0e1730; --navy2: #15214a; --panel: #19264f; --line: #2a3a6d; --fg: #eef2ff; --soft: #a8b3d6;
  --gold: #ffc94a; --gold2: #ffab2e; --teal: #2fd1b3; --red: #ff6b6b; --radius: 18px;
}
* { box-sizing: border-box; }
html { background: var(--navy); }
body { margin: 0; color: var(--fg); font: 16px/1.55 "Nunito Sans", system-ui, sans-serif; min-height: 100vh;
  background: radial-gradient(1200px 500px at 50% -120px, #23347a 0%, transparent 70%), var(--navy); }
a { color: var(--teal); }
h1, h2, .brand span, .cta, .pack .n, .badge { font-family: "Lilita One", "Nunito Sans", sans-serif; font-weight: 400; letter-spacing: .3px; }
h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.08; margin: 0 0 12px; }
h2 { font-size: 22px; margin: 34px 0 14px; }

/* top bar */
.top { display: flex; align-items: center; gap: 22px; padding: 14px max(16px, 4vw); position: sticky; top: 0; z-index: 5;
  background: rgba(14, 23, 48, .85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--fg); font-size: 22px; }
.links { display: flex; gap: 4px; }
.links a { color: var(--soft); text-decoration: none; font-weight: 700; padding: 6px 12px; border-radius: 999px; }
.links a.on { color: var(--navy); background: var(--gold); }
.me { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--navy2); border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 12px; font-weight: 800; color: var(--gold); text-decoration: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--panel); border: 2px solid var(--line); display: grid; place-items: center;
  font-weight: 800; color: var(--soft); text-decoration: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

main { max-width: 980px; margin: 0 auto; padding: 40px 16px 30px; }
.page { display: none; } .page.on { display: block; }
.intro { text-align: center; max-width: 640px; margin: 0 auto 28px; }
.intro p { color: var(--soft); margin: 0; }

button { font: inherit; cursor: pointer; border: 0; color: inherit; background: none; }
button:disabled { opacity: .45; cursor: default; }
.cta { background: linear-gradient(180deg, var(--gold), var(--gold2)); color: #3a2400; font-size: 21px; padding: 12px 38px; border-radius: 14px;
  box-shadow: 0 4px 0 #b9741a; transition: transform .08s; }
.cta:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #b9741a; }
.cta:disabled { background: #2c3a68; color: #7f8bb3; box-shadow: 0 4px 0 #1d2850; opacity: 1; }
.ghost { color: var(--soft); font-weight: 700; padding: 10px 16px; border-radius: 12px; }
.ghost:hover { background: var(--navy2); }

/* search box */
.searchbox { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.toggle { display: inline-flex; background: var(--navy); border-radius: 999px; padding: 4px; margin-bottom: 14px; }
.toggle button { padding: 8px 18px; border-radius: 999px; font-weight: 800; color: var(--soft); }
.toggle button.on { background: var(--teal); color: #06302a; }
.drop { display: grid; place-items: center; min-height: 240px; border: 2px dashed var(--line); border-radius: 14px; cursor: pointer;
  background: repeating-linear-gradient(135deg, transparent 0 22px, rgba(255,255,255,.015) 22px 44px); padding: 14px; transition: border-color .15s; }
.drop:hover, .drop.over { border-color: var(--teal); }
.drop img { max-width: 100%; max-height: 380px; border-radius: 10px; }
.drop-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--soft); text-align: center; }
.drop-empty svg { color: var(--teal); margin-bottom: 4px; } .drop-empty b { color: var(--fg); font-size: 18px; }
.search-row { display: flex; align-items: center; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
.hint { color: var(--soft); font-size: 14px; }

/* results */
#results { margin-top: 26px; display: flex; flex-direction: column; gap: 12px; }
.summary { color: var(--soft); font-weight: 700; }
.thanks { text-align: center; color: var(--soft); font-size: 14px; padding: 6px 0 0; }
.row { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: 16px; align-items: center; background: var(--panel);
  border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.row img { width: 220px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: #0a1022; display: block; }
.info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.info .top-line { display: flex; align-items: center; gap: 10px; }
.badge { min-width: 62px; height: 34px; border-radius: 999px; display: grid; place-items: center; font-size: 18px; padding: 0 10px; }
.badge.strong { background: var(--gold); color: #3a2400; } .badge.likely { background: var(--teal); color: #06302a; } .badge.possible { background: #3a4a80; color: var(--fg); }
.info .label { color: var(--soft); font-size: 14px; font-weight: 700; }
.info .title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.info .meta { color: var(--soft); font-size: 14px; }
.acts { display: flex; flex-direction: column; gap: 8px; padding-right: 6px; }
.acts a, .acts button { text-align: center; text-decoration: none; font-weight: 800; padding: 9px 18px; border-radius: 12px; white-space: nowrap; }
.acts .primary { background: var(--gold); color: #3a2400; } .acts .secondary { background: var(--navy2); color: var(--fg); border: 1px solid var(--line); }

/* steps */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.steps li { counter-increment: s; background: rgba(25, 38, 79, .55); border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 16px 58px; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 16px; top: 15px; width: 30px; height: 30px; border-radius: 50%; background: var(--teal);
  color: #06302a; display: grid; place-items: center; font-family: "Lilita One"; font-size: 17px; }
.steps b { display: block; } .steps span { color: var(--soft); font-size: 14px; }

/* tokens */
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: end; }
.pack { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 18px; text-align: center; position: relative; }
.pack.best { border: 2px solid var(--gold); padding-top: 34px; }
.pack .ribbon { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--gold); color: #3a2400; font-weight: 800;
  font-size: 13px; padding: 3px 12px; border-radius: 999px; white-space: nowrap; }
.pack .n { font-size: 46px; color: var(--gold); line-height: 1; }
.pack .unit { color: var(--soft); font-weight: 700; }
.pack .price { font-size: 22px; font-weight: 800; margin: 14px 0 4px; }
.pack .each { color: var(--soft); font-size: 13px; margin-bottom: 16px; }
.pack .cta { font-size: 18px; padding: 10px 26px; }
.fine { color: var(--soft); font-size: 13px; text-align: center; margin-top: 18px; }

/* account */
.profile { display: flex; align-items: center; gap: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; flex-wrap: wrap; }
.profile .avatar { width: 56px; height: 56px; font-size: 22px; }
.profile .who b { font-size: 20px; display: block; } .profile .who span { color: var(--soft); font-size: 14px; }
.profile .bal { margin-left: auto; text-align: right; }
.profile .bal .n { font-family: "Lilita One"; font-size: 34px; color: var(--gold); line-height: 1; }
.history { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.history div { display: grid; grid-template-columns: 1.4fr 1fr 1fr .6fr; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 14px; }
.history div:first-child { border-top: 0; color: var(--soft); font-weight: 800; }
.danger { margin-top: 30px; text-align: center; }
.danger button { color: var(--red); font-weight: 700; padding: 8px 14px; border-radius: 10px; }
.danger button.confirm { background: var(--red); color: #fff; }

/* dialog, toast, footer */
dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--fg); padding: 0; max-width: 360px; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(5, 9, 20, .7); }
.dlg { padding: 26px; text-align: center; } .dlg h2 { margin: 0 0 6px; } .dlg p { color: var(--soft); margin: 0 0 18px; }
.providers { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.providers a { display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; font-weight: 800; padding: 12px; border-radius: 12px; }
.providers .discord { background: #5865f2; color: #fff; } .providers .google { background: #fff; color: #1f1f1f; } .providers .dev { background: var(--navy2); color: var(--soft); border: 1px solid var(--line); }
#toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--fg); color: var(--navy); font-weight: 800; padding: 10px 18px;
  border-radius: 12px; display: none; z-index: 20; max-width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(0,0,0,.4); }
footer { text-align: center; color: var(--soft); font-size: 13px; padding: 30px 16px 40px; }

@media (max-width: 720px) {
  .top { gap: 10px; padding: 10px 16px; }
  .brand span { display: none; }
  .links a { padding: 6px 10px; }
  main { padding-top: 26px; }
  .row { grid-template-columns: 1fr; }
  .row img { width: 100%; }
  .acts { flex-direction: row; padding: 0; } .acts a, .acts button { flex: 1; }
  .steps, .packs { grid-template-columns: 1fr; }
  .pack.best { order: -1; }
  .history div { grid-template-columns: 1.3fr 1fr .9fr .5fr; padding: 9px 12px; font-size: 13px; }
}
