/* Quest Bot — voidaep.dev design port (gold embers, glass, Nunito) */
:root {
  --gold: #ffb700;
  --gold-d: #e8a300;
  --gold-l: #ffd98a;
  --gold-2: #ffc53d;
  --bg: #241c08;
  --bg-deep: #1a1407;
  --bg2: #3a2f12;
  --card: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .12);
  --text: #fff;
  --muted: rgba(255, 255, 255, .6);
  --green: #4ade80;
  --red: #ef4444;
  --ink: #2a200a; /* dark text on gold */
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: "Nunito", -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
  background:
    radial-gradient(900px 420px at 50% -120px, rgba(255, 183, 0, .16), transparent 70%),
    linear-gradient(180deg, #3a2f12 0%, #241c08 45%, #1a1407 100%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
}
/* particle field sits behind everything */
#embers { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
body > *:not(#embers) { position: relative; z-index: 1; }
a { color: var(--gold); text-decoration: none; }
.container { max-width: 720px; margin: 0 auto; padding: 0 16px; }

/* ---- Shared gold shimmer ---- */
@keyframes shimmer { to { background-position: 200% center; } }

/* ---- Landing ---- */
.hero { text-align: center; padding: 72px 16px 48px; }
.logo {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 900; font-size: 20px; letter-spacing: .5px;
  background: linear-gradient(110deg, #e8a300, #ffd98a, #fff, #ffc53d, #e8a300);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 6s linear infinite;
}
.hero h1 { font-size: 34px; margin: 28px 0 12px; letter-spacing: -.5px; font-weight: 900; }
.hero p { color: var(--muted); font-size: 16px; max-width: 520px; margin: 0 auto 32px; font-weight: 700; }
.btn {
  display: inline-block;
  background: linear-gradient(135deg, #ffd98a, #ffb700 55%, #e8a300);
  color: var(--ink);
  padding: 14px 28px; border-radius: 12px;
  font-size: 16px; font-weight: 900; border: 0; cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 183, 0, .25);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(255, 183, 0, .35); }
.btn.green { background: linear-gradient(135deg, #86efac, #4ade80); box-shadow: 0 6px 20px rgba(74, 222, 128, .2); }
.btn.red { background: linear-gradient(135deg, #f87171, #ef4444); color: #fff; box-shadow: 0 6px 20px rgba(239, 68, 68, .2); }
.btn.small { padding: 8px 14px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; padding: 24px 0 40px; }
.fcard {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 18px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.fcard h3 { font-size: 15px; margin-bottom: 6px; font-weight: 900; }
.fcard p { color: var(--muted); font-size: 13px; line-height: 1.5; }

.warn {
  background: rgba(255, 183, 0, .08); border: 1px solid rgba(255, 183, 0, .35);
  color: var(--gold-l); border-radius: 12px; padding: 12px 16px; font-size: 13px; margin: 24px 0 40px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}

/* ---- Connect ---- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 24px; margin: 32px 0;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.card h2 { font-size: 18px; margin-bottom: 14px; font-weight: 900; }
label { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
input[type="password"], input[type="text"] {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .05); color: var(--text);
  font-size: 14px; margin-bottom: 14px; font-family: ui-monospace, monospace; font-weight: 700;
}
input:focus { outline: 2px solid rgba(255, 183, 0, .5); border-color: transparent; }
.hint { color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 10px; }

/* ---- Dashboard ---- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0;
  background: rgba(26, 20, 7, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.topbar .brand {
  font-weight: 900;
  background: linear-gradient(110deg, #e8a300, #ffd98a, #fff, #ffc53d, #e8a300);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 6s linear infinite;
}
.badge { font-size: 11px; padding: 3px 8px; border-radius: 20px; font-weight: 800; white-space: nowrap; }
.topbar .badge { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.badge.ok { background: rgba(74, 222, 128, .15); color: var(--green); }
.badge.err { background: rgba(239, 68, 68, .15); color: #f87171; }

#status { padding: 10px 16px; font-size: 13px; color: var(--muted); }
#status.err { color: #f87171; }

/* ---- Quest list (glass) ---- */
.chips { display: flex; gap: 8px; margin: 4px 0 14px; }
.chip {
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line); color: var(--muted);
  padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 800; cursor: pointer;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: background .15s, color .15s;
}
.chip:hover { color: var(--text); }
.chip.active { background: linear-gradient(135deg, #ffd98a, #ffb700 55%, #e8a300); border-color: transparent; color: var(--ink); }

.qhead {
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px; margin-bottom: 14px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.qhead-top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 8px; }
.qhead-label { color: var(--muted); }
.qhead-top b { color: var(--gold-l); font-size: 14px; font-weight: 900; }
.qbar { height: 10px; background: rgba(255, 255, 255, .08); border-radius: 999px; overflow: hidden; }
.qfill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-d), var(--gold), var(--gold-l));
  transition: width .7s ease;
}

.quest {
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px; margin-bottom: 12px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: border-color .2s, box-shadow .2s;
}
.quest:hover { border-color: rgba(255, 183, 0, .35); }
.quest.running { border-color: rgba(255, 183, 0, .55); box-shadow: 0 0 0 1px rgba(255, 183, 0, .15), 0 8px 24px rgba(255, 183, 0, .08); }
.quest .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.quest .name { font-weight: 900; font-size: 15px; }
.quest .task {
  font-size: 11px; color: var(--gold-l);
  border: 1px solid rgba(255, 183, 0, .4); padding: 2px 8px; border-radius: 20px; font-weight: 800;
}
.quest .task.video { color: var(--gold-l); border-color: rgba(255, 183, 0, .4); }
.quest .task.game { color: #86efac; border-color: rgba(74, 222, 128, .35); }
.bar { height: 8px; background: rgba(255, 255, 255, .08); border-radius: 999px; overflow: hidden; margin: 8px 0; }
.fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-d), var(--gold));
  transition: width .5s;
}
.fill.running {
  background: linear-gradient(110deg, #e8a300, #ffd98a, #fff, #ffc53d, #e8a300);
  background-size: 200% 100%;
  animation: shimmer 2.5s linear infinite;
}
.fill.done { background: var(--green); }
.meta { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.meta .done-txt { color: var(--green); font-weight: 800; }
.exp { font-size: 12px; }
.empty { text-align: center; color: var(--muted); padding: 48px 0; }
.empty b { color: var(--gold-l); }

.runbar {
  position: sticky; bottom: 0;
  background: rgba(26, 20, 7, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); padding: 10px 16px;
  display: flex; align-items: center; gap: 12px; font-size: 13px;
}
.runbar .spin { width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, .15); border-top-color: var(--gold); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.controls { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.controls label { margin: 0; font-size: 12px; }
input[type="range"] { width: 90px; accent-color: var(--gold); }
#speedv { font-size: 12px; color: var(--muted); width: 30px; text-align: right; }
