@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+JP:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

@font-face {
  font-family: 'Minecraft';
  src: url('fonts/Minecraft.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'MinecraftJP';
  src: url('fonts/unifont_jp-17.0.05.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0a0e17;
  --ink-2: #10151f;
  --ink-3: #171d2c;
  --line: #232c42;
  --paper: #e5e9f2;
  --paper-dim: #8b93a8;
  --blue: #4d8cff;
  --blue-dim: #23407a;
  --cyan: #5fb8c9;
  --red: #e0574f;
  --red-dim: #4a2222;
  --yellow: #e0b34d;
  --purple: #9b6fd9;
  --orange: #e0894d;
  --green: #5fc27a;
  --green-dim: #1f3a26;
  --radius: 3px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Minecraft', 'IBM Plex Sans JP', 'IBM Plex Sans', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

#aurora-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

.site-header, main, .site-footer, .redoc-shell { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

a { color: inherit; }
h1, h2, h3 { font-family: 'Minecraft', 'IBM Plex Sans JP', sans-serif; font-weight: 800; letter-spacing: 0.01em; margin: 0; }
.mono { font-family: 'Minecraft', 'IBM Plex Mono', monospace; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 28px; }

/* ---- header ---- */
.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
  background: rgba(18, 21, 26, 0.92);
  backdrop-filter: blur(6px);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: 'Minecraft', sans-serif; font-size: 22px; font-weight: 800; text-decoration: none; letter-spacing: 0.02em; }
.brand .brand-icon { width: 22px; height: 22px; flex-shrink: 0; transition: transform .25s ease; }
.brand:hover .brand-icon { transform: rotate(-8deg) scale(1.08); }
.nav { display: flex; gap: 26px; font-size: 14px; }
.nav a { text-decoration: none; color: var(--paper-dim); padding: 4px 0; border-bottom: 1px solid transparent; transition: color .15s, border-color .15s; }
.nav a:hover, .nav a.active { color: var(--paper); border-color: var(--blue); }
.nav-cta { font-size: 13px; padding: 8px 14px; border: 1px solid var(--blue); color: var(--blue); text-decoration: none; font-family: 'Minecraft', 'IBM Plex Mono', monospace; transition: background .15s, color .15s, transform .15s; }
.nav-cta:hover { background: var(--blue); color: var(--ink); transform: translateY(-1px); }

/* ---- nav "Other" dropdown ---- */
.nav-dropdown { position: relative; padding-bottom: 10px; margin-bottom: -10px; }
.nav-dropdown-label { display: inline-block; color: var(--paper-dim); padding: 4px 0; border-bottom: 1px solid transparent; cursor: default; transition: color .15s, border-color .15s; }
.nav-dropdown:hover .nav-dropdown-label,
.nav-dropdown.active .nav-dropdown-label { color: var(--paper); border-color: var(--blue); }
.nav-dropdown-menu { position: absolute; top: calc(100% + 2px); left: 0; min-width: 180px; background: var(--ink-2); border: 1px solid var(--line); margin: 0; padding: 6px; display: none; flex-direction: column; gap: 2px; z-index: 200; }
.nav-dropdown:hover .nav-dropdown-menu { display: flex; }
.nav-dropdown-menu a { display: block; padding: 8px 10px; font-size: 14px; color: var(--paper-dim); text-decoration: none; transition: background .15s, color .15s; }
.nav-dropdown-menu a:hover, .nav-dropdown-menu a.active { background: var(--ink-3); color: var(--paper); }

/* ---- language switch ---- */
.lang-switch { position: relative; font-family: 'Minecraft', 'IBM Plex Mono', monospace; }
.lang-switch-btn { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; padding: 8px 14px; border: 1px solid var(--blue); color: var(--blue); background: transparent; cursor: pointer; font-family: inherit; transition: background .15s, color .15s, transform .15s; }
.lang-switch-btn:hover { background: var(--blue); color: var(--ink); transform: translateY(-1px); }
.lang-switch-btn svg { flex-shrink: 0; }
.lang-switch-btn svg:last-child { transition: transform .15s ease; }
.lang-switch.open .lang-switch-btn svg:last-child { transform: rotate(180deg); }
.lang-switch-menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 140px; background: var(--ink-2); border: 1px solid var(--line); list-style: none; margin: 0; padding: 6px; display: none; flex-direction: column; gap: 2px; z-index: 200; }
.lang-switch.open .lang-switch-menu { display: flex; }
.lang-switch-menu li { padding: 8px 10px; font-size: 13px; color: var(--paper-dim); cursor: pointer; transition: background .15s, color .15s; }
.lang-switch-menu li:hover { background: var(--ink-3); color: var(--paper); }
.lang-switch-menu li.selected { color: var(--blue); }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--line); margin-top: 96px; padding: 36px 0; color: var(--paper-dim); font-size: 13px; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.site-footer a { color: var(--paper-dim); text-decoration: none; }
.site-footer a:hover { color: var(--blue); }
.foot-links { display: flex; gap: 20px; }

/* ---- generic page header ---- */
.page-head { padding: 64px 0 40px; border-bottom: 1px solid var(--line); }
.eyebrow { font-family: 'Minecraft', 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.14em; color: var(--blue); }
.page-head h1 { font-size: 44px; margin-top: 10px; }
.page-head p { color: var(--paper-dim); max-width: 620px; margin-top: 14px; font-size: 15px; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; text-decoration: none; font-family: 'Minecraft', 'IBM Plex Mono', monospace; font-size: 14px; border: 1px solid var(--line); color: var(--paper); transition: border-color .15s, background .15s, transform .15s; cursor: pointer; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { border-color: var(--blue); color: var(--ink); background: var(--blue); }
.btn-primary:hover { background: #6ea3ff; }
.btn-ghost:hover { border-color: var(--paper-dim); }

/* ---- hero ---- */
.hero { padding: 76px 0 40px; position: relative; z-index: 2; }
.hero-grid { display: block; position: relative; z-index: 2; }
.hero-kicker { font-family: 'Minecraft', 'IBM Plex Mono', monospace; font-size: 13px; color: var(--blue); display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.hero-kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-dim); animation: dot-pulse 2s ease-in-out infinite; }
@keyframes dot-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.hero h1 { font-size: 38px; line-height: 1.4; max-width: 15ch; }
.hero-title-brand { display: flex; align-items: center; gap: 14px; }
.hero-title-icon { width: 44px; height: 44px; border-radius: var(--radius); image-rendering: auto; }
.hero-lead { color: var(--paper-dim); font-size: 16px; max-width: 46ch; margin-top: 20px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
@media (max-width: 860px) {
  .hero h1 { max-width: none; font-size: 30px; }
}

/* ---- home screenshot showcase (scattered gallery, full-bleed & large) ---- */
.showcase { padding: 24px 0 20px; position: relative; z-index: 1; }
.showcase-gallery {
  position: relative;
  height: 680px;
  width: 100vw;
  left: 50%;
  margin-left: -50vw;
  overflow: visible;
}
.showcase-img {
  position: absolute;
  border-radius: 0;
  border: 1px solid var(--line);
  box-shadow: 0 22px 46px rgba(0,0,0,.55);
  background: var(--ink-2, #111);
  max-width: none;
  cursor: default;
  opacity: .92;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
/* left cluster: view.png, image2, image4, image6, image8 */
.si-0 { top: 0%;   left: 2%;   width: 280px; transform: rotate(-6deg); z-index: 6; }
.si-1 { top: 38%;  left: 4%;   width: 290px; transform: rotate(8deg);  z-index: 3; }
.si-3 { top: 6%;   left: 20%;  width: 370px; transform: rotate(6deg);  z-index: 5; }
.si-5 { top: 46%;  left: 24%;  width: 350px; transform: rotate(-7deg); z-index: 4; }
.si-7 { top: 22%;  left: 36%;  width: 300px; transform: rotate(-4deg); z-index: 2; }
/* right cluster: image3, image5, image7, image9, imag10 — overlapping the left cluster in the middle */
.si-2 { top: 4%;   left: 50%;  width: 380px; transform: rotate(-5deg); z-index: 2; }
.si-4 { top: 6%;   right: 2%;  width: 360px; transform: rotate(10deg); z-index: 1; }
.si-6 { top: 26%;  right: 8%;  width: 350px; transform: rotate(5deg);  z-index: 3; }
.si-8 { top: 46%;  left: 46%;  width: 350px; transform: rotate(7deg);  z-index: 6; }
.si-9 { top: 48%;  right: 4%;  width: 350px; transform: rotate(-8deg); z-index: 3; }

@media (max-width: 860px) {
  .showcase-gallery { height: auto; width: auto; left: auto; margin-left: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; padding: 12px 0 4px; }
  .showcase-img { position: static; width: 44%; max-width: 220px; opacity: 1; }
  .si-0, .si-1, .si-2, .si-3, .si-4, .si-5, .si-6, .si-7, .si-8, .si-9 { top: auto; left: auto; right: auto; }
}
@media (max-width: 520px) {
  .showcase-img:nth-child(n+7) { display: none; }
}

/* ---- log-style feature list ---- */
.log-list { display: flex; flex-direction: column; gap: 30px; }
.log-row { display: grid; grid-template-columns: 96px 1fr; gap: 22px; }
.log-tag { font-family: 'Minecraft', 'IBM Plex Mono', monospace; font-size: 12px; color: var(--blue); letter-spacing: .04em; padding-top: 2px; }
.log-row h3 { font-size: 17px; margin: 0 0 6px; }
.log-row p { color: var(--paper-dim); font-size: 14px; margin: 0; }
@media (max-width: 640px) {
  .log-row { grid-template-columns: 1fr; gap: 6px; }
}

/* ---- numbered step sequence ---- */
.steps { display: flex; flex-direction: column; gap: 26px; }
.step { display: grid; grid-template-columns: 40px 1fr; gap: 20px; align-items: start; }
.step-num { font-family: 'Minecraft', 'IBM Plex Mono', monospace; font-size: 13px; color: var(--ink); background: var(--blue); width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step-body p { margin: 0; font-size: 14px; color: var(--paper-dim); }


section { padding: 72px 0; }
.section-head { margin-bottom: 30px; }
.section-head h2 { font-size: 28px; }

.grid-invite { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.invite-card { background: var(--ink); padding: 30px; display: flex; align-items: center; gap: 18px; transition: opacity .6s ease, transform .3s ease, background .15s; }
.invite-card:hover { transform: translateY(-4px); background: var(--ink-2); }
.invite-card img { width: 52px; height: 52px; flex-shrink: 0; border-radius: 10px; }
.invite-card-body { flex: 1; min-width: 0; }
.invite-card h3 { font-size: 18px; margin: 0 0 6px; }
.invite-card p { color: var(--paper-dim); font-size: 13px; margin: 0 0 14px; }
.invite-card .btn { padding: 9px 16px; font-size: 13px; }
@media (max-width: 720px) {
  .grid-invite { grid-template-columns: 1fr; }
}

.btn-invite {
  position: relative;
  overflow: hidden;
  border: none;
  color: #fff;
  background: linear-gradient(135deg, #5865F2, #7289ff, #b06bff);
  box-shadow: 0 4px 14px rgba(88,101,242,.35);
  transition: transform .18s ease, box-shadow .18s ease;
}
.btn-invite img { width: 15px; height: 15px; }
.btn-invite::before {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg);
  transition: left .5s ease;
}
.btn-invite:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(88,101,242,.5);
}
.btn-invite:hover::before { left: 130%; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--paper-dim); font-weight: 500; font-size: 12px; letter-spacing: 0.06em; }
code { font-family: 'Minecraft', 'IBM Plex Mono', monospace; background: var(--ink-3); padding: 2px 6px; font-size: 13px; color: var(--cyan); }
pre { background: var(--ink-2); border: 1px solid var(--line); padding: 18px; overflow-x: auto; font-family: 'Minecraft', 'IBM Plex Mono', monospace; font-size: 13px; line-height: 1.7; color: var(--paper); }
pre code { background: none; padding: 0; color: inherit; }

.status-ok { color: var(--green); font-weight: 600; }
.status-warn { color: var(--yellow); font-weight: 600; }
.status-err { color: var(--red); font-weight: 600; }

/* ---- API reference card (Stoplight/Swagger-style endpoint block) ---- */
.api-ref { border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink-2); padding: 24px; }
.api-ref-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.api-ref-head h2 { font-size: 20px; }
.api-copy-link-btn {
  font-family: 'Minecraft', 'IBM Plex Mono', monospace; font-size: 12px; color: var(--paper-dim);
  background: var(--ink-3); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 6px 12px; cursor: pointer; white-space: nowrap;
}
.api-copy-link-btn:hover { color: var(--paper); border-color: var(--blue-dim); }
.api-ref-desc { color: var(--paper-dim); margin: 14px 0 22px; max-width: 640px; }
.api-ref h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--paper-dim); margin: 22px 0 10px; font-weight: 600; }
.api-ref-params table { font-size: 13px; }

.api-status-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.api-status-pill {
  font-family: 'Minecraft', 'IBM Plex Mono', monospace; font-size: 12px;
  background: var(--ink-3); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; cursor: pointer; color: var(--paper-dim);
}
.api-status-pill.status-ok.active { background: var(--green-dim); border-color: var(--green); color: var(--green); }
.api-status-pill.status-warn.active { background: #3a3220; border-color: var(--yellow); color: var(--yellow); }
.api-status-pill.status-err.active { background: var(--red-dim); border-color: var(--red); color: var(--red); }
.api-ref-response-desc { font-size: 12px; color: var(--paper-dim); margin-top: 8px; }

.api-ref-method-path { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.api-ref-method-path code { font-size: 14px; }
.api-ref-code-tabs, .api-ref-test-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.api-ref-code-tabs button, .api-ref-test-tabs button {
  font-family: 'Minecraft', 'IBM Plex Mono', monospace; font-size: 12px;
  background: transparent; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 6px 12px; cursor: pointer; color: var(--paper-dim);
}
.api-ref-code-tabs button.active, .api-ref-test-tabs button.active {
  background: var(--blue-dim); border-color: var(--blue); color: var(--paper);
}
.api-ref-test { margin-top: 22px; }
.api-ref-test-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; font-size: 13px; color: var(--paper-dim); }
.api-ref-test-path { font-family: 'Minecraft', 'IBM Plex Mono', monospace; font-size: 12px; }
.api-ref-test-status-label { font-size: 13px; color: var(--green); margin: 8px 0 0; font-weight: 600; }

@media (max-width: 720px) {
  .nav { display: none; }
  .page-head h1 { font-size: 32px; }
}

/* ---- commands list ---- */
.cmd-group { margin-bottom: 32px; }
.cmd-group:last-child { margin-bottom: 0; }
.cmd-group-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Minecraft', 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--blue);
  margin-bottom: 14px;
}
.cmd-group-label img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.cmd-item {
  border: 1px solid var(--line);
  background: var(--ink-2);
  margin-bottom: 10px;
  transition: border-color .15s, background .15s;
}
.cmd-item:last-child { margin-bottom: 0; }
.cmd-item:hover { border-color: var(--blue-dim); }
.cmd-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 12px 14px;
  margin: 0;
  cursor: pointer;
  font-family: 'Minecraft', 'IBM Plex Mono', monospace;
  font-size: 14px;
  color: var(--cyan);
  transition: color .15s;
}
.cmd-btn:hover { color: var(--blue); }
.cmd-btn:hover .cmd-syntax { border-color: var(--blue-dim); }
.cmd-btn:hover .cmd-copy-icon { opacity: 1; color: var(--blue); }
.cmd-btn.copied { color: var(--green); }
.cmd-btn.copied .cmd-syntax { border-color: var(--green-dim); }
.cmd-btn.copied .cmd-copy-icon { color: var(--green); opacity: 1; }
.cmd-syntax {
  display: block;
  flex: 1 1 auto;
  word-break: break-all;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 12px;
  transition: border-color .15s;
}
.cmd-copy-icon {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  color: var(--paper-dim);
  opacity: .55;
  transition: color .15s, opacity .15s;
}
.cmd-desc { font-size: 13px; color: var(--paper-dim); padding: 0 16px 14px; margin: 0; }
.cmd-note { font-size: 12px; color: var(--yellow); padding: 0 16px 14px; margin: 0; }

/* ---- copy toast ---- */
.copy-toast-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.copy-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ink-2);
  border: 1px solid var(--green);
  color: var(--paper);
  font-family: 'Minecraft', 'IBM Plex Mono', monospace;
  font-size: 13px;
  padding: 12px 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  transform: translateX(120%);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
}
.copy-toast.show { transform: translateX(0); opacity: 1; }
.copy-toast svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--green); }
.copy-toast .copy-toast-cmd { color: var(--cyan); }

/* 日本語表示時は全要素をunifont_jpに切り替える */
html[lang="ja"] * {
  font-family: 'MinecraftJP', 'IBM Plex Sans JP', sans-serif !important;
}
