:root {
  --bg: #0b0f15;
  --surface: #121826;
  --surface-2: #1b2336;
  --text: #e6edf3;
  --muted: #9aa7b1;
  --primary: #6aa3ff;
  --primary-600: #4b8eff;
  --accent: #22d3ee;
  --danger: #ff6b6b;
}

* {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica Neue, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.5;
}

body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(106,163,255,0.15), transparent 60%),
    radial-gradient(1000px 500px at 10% -20%, rgba(34,211,238,0.12), transparent 60%),
    var(--bg);
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-attachment: fixed, fixed, fixed;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(6px);
  background: linear-gradient(to bottom, rgba(18,24,38,0.9), rgba(18,24,38,0.6));
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.site-header .inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.brand .logo { width: 28px; height: 28px; border-radius: 6px; }
.brand .title { font-weight: 700; letter-spacing: 0.2px; }
.nav { display: flex; gap: 14px; }
.nav-link { color: var(--muted); text-decoration: none; font-size: 14px; }
.nav-link:hover { color: var(--text); }

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 16px 80px;
}
/* Wider layout for documentation pages */
.container.docs { max-width: none; padding-left: 32px; padding-right: 32px; }

.search { margin-top: 28px; }
.search h1 {
  margin: 0 0 8px;
  font-size: 32px;
}
.search .sub { margin: 0 0 20px; color: var(--muted); }

.search-form { margin-top: 8px; }
.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}
input#barcode-input {
  width: 100%;
  padding: 14px 14px;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  outline: none;
}
input#barcode-input:focus {
  border-color: rgba(106,163,255,0.5);
  box-shadow: 0 0 0 3px rgba(106,163,255,0.18);
}

button#lookup-btn {
  padding: 12px 18px;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, var(--primary), var(--primary-600));
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
}
button#lookup-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.hint { margin: 8px 2px 0; color: var(--muted); font-size: 13px; }

.examples { margin-top: 24px; display: flex; align-items: center; gap: 10px; color: var(--muted); }
.pill { border: 1px solid rgba(255,255,255,0.08); background: var(--surface-2); color: var(--text); padding: 6px 10px; border-radius: 999px; cursor: pointer; font-size: 14px; }
.pill:hover { border-color: rgba(106,163,255,0.5); }

.status {
  margin-top: 18px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--muted);
}

.result { margin-top: 18px; }
.card {
  background: linear-gradient(180deg, rgba(27,35,54,0.8), rgba(18,24,38,0.8));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 16px;
}
.card .row { display: flex; gap: 18px; align-items: flex-start; }
.card .meta { flex: 1; }
.badge { display: inline-block; font-size: 12px; padding: 4px 8px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.12); color: var(--muted); }
.game-title { font-size: 20px; margin: 4px 0 4px; }
.platform { color: var(--muted); }
.ids { margin-top: 8px; font-size: 13px; color: var(--muted); }

.error { color: #ffd0d0; }

.site-footer { border-top: 1px solid rgba(255,255,255,0.06); margin-top: 60px; }
.site-footer .inner { max-width: 980px; margin: 0 auto; padding: 18px 16px; color: var(--muted); }
.site-footer .footer-links { margin-top: 8px; display: flex; gap: 14px; flex-wrap: wrap; }
.site-footer .footer-links a { color: var(--muted); text-decoration: none; }
.site-footer .footer-links a:hover { color: var(--text); text-decoration: underline; }

/* Docs layout refinements */
.docs .doc-section { margin-bottom: 20px; }
.docs .doc-section > .card { padding: 20px; }
.docs table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.docs th, .docs td { border: 1px solid rgba(255,255,255,0.12); padding: 8px 10px; text-align: left; }
.docs th { background: rgba(255,255,255,0.06); }
.docs pre { background: #0e1420; border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; padding: 12px; overflow: auto; }
.docs code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.docs .hero { margin: 0 0 16px; }
.docs .muted { color: var(--muted); }
.docs .xxl-title { font-size: clamp(28px, 6vw, 44px); font-weight: 800; margin: 6px 0 10px; }
.docs .title { font-size: 28px; font-weight: 700; margin: 18px 0 10px; }
.docs .inset { color: var(--muted); }
.docs .textElement .paddedContainer { background: linear-gradient(180deg, rgba(27,35,54,0.6), rgba(18,24,38,0.6)); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 16px; }
.docs .endpoint { display: inline-block; padding: 6px 10px; border-radius: 10px; background: var(--surface); border: 1px solid rgba(255,255,255,0.12); color: var(--muted); }
.docs .http-method { display: inline-block; font-size: 12px; font-weight: 700; color: #fff; background: #4b8eff; padding: 3px 6px; border-radius: 6px; margin-right: 8px; }
.docs .required { color: #ffb3b3; font-weight: 600; font-size: 12px; margin-left: 6px; }
.docs pre.code { background: #0e1420; }

@media (max-width: 640px) {
  .input-row { grid-template-columns: 1fr; }
  button#lookup-btn { width: 100%; }
}
.docs-layout { display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
.docs-sidebar { position: sticky; top: 64px; height: fit-content; }
.docs-nav { display: flex; flex-direction: column; gap: 8px; }
.docs-link { color: var(--muted); text-decoration: none; padding: 8px 10px; border-radius: 8px; }
.docs-link:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.docs-link.active { color: #fff; background: rgba(106,163,255,0.18); border: 1px solid rgba(106,163,255,0.35); }
.docs-content h1, .docs-content h2 { margin: 0 0 10px; }
.docs .doc-section { margin-bottom: 28px; padding-top: 12px; }
.docs .card .card { background: transparent; border: none; padding: 0; }
.docs .container:not(.docs) { max-width: none; margin: 0; padding-left: 0; padding-right: 0; }
.docs .docs-content { width: 100%; }
.docs .doc-section > * + * { margin-top: 16px; }
.docs .card + .card { margin-top: 16px; }
.docs .doc-section > .card { padding: 20px; }
.docs table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.docs th, .docs td { border: 1px solid rgba(255,255,255,0.12); padding: 8px 10px; text-align: left; }
.docs th { background: rgba(255,255,255,0.06); }
.docs pre { background: #0e1420; border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; padding: 12px; overflow: auto; }
.docs code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.docs .hero { margin: 0 0 16px; }

/* Legacy docs content polish */
.docs button { padding: 10px 16px; border-radius: 9999px; border: 1px solid rgba(255,255,255,0.08); background: linear-gradient(180deg, var(--primary), var(--primary-600)); color: #fff; font-weight: 600; letter-spacing: 0.2px; cursor: pointer; }
.docs button:hover { filter: brightness(1.05); }
.docs hr { border: none; border-top: 1px solid rgba(255,255,255,0.08); margin: 16px 0; }
.docs .grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin: 16px 0 24px; }
.docs .fact-card { background: linear-gradient(180deg, rgba(27,35,54,0.8), rgba(18,24,38,0.8)); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 16px; text-align: center; }
.docs .fact-title { font-size: 28px; font-weight: 700; margin: 0; }
.docs .fact-detail { color: var(--muted); margin: 2px 0 0; }
.docs .pink-gradient { color: #ffb3d1; }
.docs .yellow-gradient { color: #ffe38a; }
.docs .indigo-gradient { color: #a7b8ff; }
.docs .gray-gradient { color: #c8d0d8; }

.docs .pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.docs .price-card { background: linear-gradient(180deg, rgba(27,35,54,0.8), rgba(18,24,38,0.8)); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 16px; }
.docs .price-card-title { font-size: 18px; font-weight: 700; margin: 0 0 8px; }
.docs .price-card-price { font-size: 24px; font-weight: 800; margin: 0 0 8px; }
.docs .price-card-detail { color: var(--muted); }

.docs .gameryIcon, .docs .icon, .docs .icon2 { width: 48px; height: 48px; border-radius: 8px; background: url('../images/scandex_icon.png') center/cover no-repeat; }

/* Account pages */
.form-card {
  max-width: 520px;
  margin: 16px auto;
  padding: 20px;
  background: linear-gradient(180deg, rgba(27,35,54,0.8), rgba(18,24,38,0.8));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
}
.form-card h2 { margin: 0 0 12px; font-size: 24px; }
.form-card label { display: block; margin: 8px 2px 4px; color: var(--muted); }
.form-card input[type="text"],
.form-card input[type="email"],
.form-card input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  outline: none;
}
.form-card input[type="text"],
.form-card input[type="email"],
.form-card input[type="password"] { margin: 0 0 10px; }
.form-card br { display: none; }
.form-card input[type="text"]:focus,
.form-card input[type="email"]:focus,
.form-card input[type="password"]:focus {
  border-color: rgba(106,163,255,0.5);
  box-shadow: 0 0 0 3px rgba(106,163,255,0.18);
}
.form-card .button,
.form-card button {
  margin-top: 14px;
  padding: 12px 18px;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, var(--primary), var(--primary-600));
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
}
.form-card .button:hover,
.form-card button:hover { filter: brightness(1.05); }
.error-message { color: #ffd0d0; margin-top: 8px; }
.form-title { font-weight: 600; margin: 10px 0 4px; }
.form-detail { color: var(--muted); margin: 0 0 8px; word-break: break-all; }

@media (max-width: 980px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { position: relative; top: 0; margin-bottom: 10px; }
  .docs .grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .docs .pricing-grid { grid-template-columns: 1fr; }
}
