@charset "utf-8";

/* ===========================================================================
   neo.css — ネオンブルー / SF テーマ（トップページ・管理系ページ用）

   games/ 以下などの旧ページは site.css のまま残すため、このファイルは
   <body class="neo"> を持つページにだけ効くように書いている。
   =========================================================================== */

/* ------------------------------------------------------------ 1. Tokens */

:root {
  --bg: #04060d;
  --bg-2: #070b17;
  --panel: rgba(10, 20, 40, 0.62);
  --panel-solid: #0a1428;
  --line: rgba(0, 200, 255, 0.22);
  --line-strong: rgba(0, 220, 255, 0.55);

  --neon: #00d9ff;
  --neon-2: #3d7bff;
  --neon-soft: #7fe9ff;
  --magenta: #ff3dcb;
  --ok: #3dffb0;
  --muted-accent: #6b86b3;

  --text: #d9e7ff;
  --text-dim: #8a9cc0;
  --text-faint: #56668a;

  --glow: 0 0 6px rgba(0, 217, 255, 0.8), 0 0 18px rgba(0, 217, 255, 0.45);
  --glow-box: 0 0 0 1px var(--line), 0 0 24px rgba(0, 150, 255, 0.12);

  --font-display: "Orbitron", "Zen Kaku Gothic New", sans-serif;
  --font-mono: "Share Tech Mono", ui-monospace, "Cascadia Mono", monospace;
  --font-body: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;

  --radius: 4px;
  --max: 1080px;
  --gutter: clamp(16px, 4vw, 40px);
}

/* ------------------------------------------------------------ 2. Base */

body.neo {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 140, 255, 0.28), transparent 70%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(255, 61, 203, 0.08), transparent 70%),
    linear-gradient(var(--bg), var(--bg-2));
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0.02em;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}

.neo *,
.neo *::before,
.neo *::after {
  box-sizing: border-box;
}

/* 背景のグリッド（遠近感のある床）とスキャンライン */
.neo .bg-grid {
  position: fixed;
  inset: auto 0 0 0;
  height: 45vh;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(0, 200, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 200, 255, 0.18) 1px, transparent 1px);
  background-size: 48px 48px;
  transform: perspective(420px) rotateX(62deg);
  transform-origin: bottom center;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent 85%);
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent 85%);
  animation: grid-scroll 6s linear infinite;
}

.neo .bg-scan {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.025) 0 1px,
    transparent 1px 3px
  );
  mix-blend-mode: overlay;
}

@keyframes grid-scroll {
  to { background-position: 0 48px, 0 0; }
}

.neo a {
  color: var(--neon-soft);
  text-decoration: none;
  transition: color 0.2s, text-shadow 0.2s;
}

.neo a:hover,
.neo a:focus-visible {
  color: #fff;
  text-shadow: var(--glow);
}

.neo a:focus-visible {
  outline: 1px solid var(--neon);
  outline-offset: 3px;
}

.neo ::selection {
  background: rgba(0, 217, 255, 0.35);
  color: #fff;
}

.neo .wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.neo .mono {
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
}

/* ------------------------------------------------------------ 3. Header */

.neo .site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(4, 6, 13, 0.7);
  border-bottom: 1px solid var(--line);
}

.neo .site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
}

.neo .logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.18em;
  color: #fff;
  text-shadow: var(--glow);
}

.neo .logo span {
  color: var(--neon);
}

.neo .nav {
  display: flex;
  gap: clamp(12px, 3vw, 28px);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.neo .nav a {
  color: var(--text-dim);
}

.neo .nav a:hover {
  color: var(--neon-soft);
}

/* ------------------------------------------------------------ 4. Hero */

.neo .hero {
  padding: clamp(64px, 14vh, 140px) 0 clamp(48px, 10vh, 96px);
}

.neo .hero-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--text-dim);
  background: rgba(0, 30, 60, 0.35);
}

.neo .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
  animation: blink 2.4s ease-in-out infinite;
}

@keyframes blink {
  50% { opacity: 0.35; }
}

.neo .hero h1 {
  margin: 24px 0 8px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(44px, 10vw, 104px);
  line-height: 1;
  letter-spacing: 0.08em;
  color: #fff;
  text-shadow:
    0 0 4px #fff,
    0 0 14px var(--neon),
    0 0 36px var(--neon),
    0 0 72px var(--neon-2);
}

.neo .hero .hero-ja {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-size: clamp(15px, 2.4vw, 20px);
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--neon);
}

.neo .hero .lead {
  max-width: 38em;
  margin: 0;
  color: var(--text-dim);
  font-size: clamp(15px, 1.8vw, 17px);
  word-break: auto-phrase; /* 日本語を文節で折り返す */
}

.neo .hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.neo .stat .k {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
  text-transform: uppercase;
}

.neo .stat .v {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--neon-soft);
  text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

/* タイピング風カーソル */
.neo .cursor::after {
  content: "_";
  margin-left: 2px;
  color: var(--neon);
  animation: blink 1s steps(1) infinite;
}

/* ------------------------------------------------------------ 5. Sections */

.neo main section {
  padding: clamp(40px, 8vh, 72px) 0;
  scroll-margin-top: 60px;
}

.neo .sec-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 28px;
}

.neo .sec-head .idx {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--neon);
  letter-spacing: 0.1em;
}

.neo .sec-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(20px, 3.2vw, 28px);
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #fff;
  text-transform: uppercase;
}

.neo .sec-head .ja {
  font-size: 13px;
  color: var(--text-faint);
  letter-spacing: 0.1em;
}

.neo .sec-head::after {
  content: "";
  flex: 1;
  align-self: center;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

/* ------------------------------------------------------------ 6. Panels */

/* HUD 風の四隅ブラケット付きパネル */
.neo .panel {
  position: relative;
  padding: 22px 22px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 0 24px rgba(0, 120, 255, 0.06) inset;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.neo .panel::before,
.neo .panel::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--neon);
  opacity: 0.7;
  transition: opacity 0.25s, width 0.25s, height 0.25s;
}

.neo .panel::before {
  top: -1px;
  left: -1px;
  border-right: 0;
  border-bottom: 0;
}

.neo .panel::after {
  right: -1px;
  bottom: -1px;
  border-left: 0;
  border-top: 0;
}

.neo a.panel {
  display: block;
  color: inherit;
}

.neo a.panel:hover,
.neo a.panel:focus-visible {
  text-shadow: none;
  border-color: var(--line-strong);
  box-shadow: 0 0 32px rgba(0, 170, 255, 0.18), 0 0 24px rgba(0, 120, 255, 0.1) inset;
  transform: translateY(-2px);
}

.neo a.panel:hover::before,
.neo a.panel:hover::after {
  opacity: 1;
  width: 22px;
  height: 22px;
}

.neo .grid {
  display: grid;
  gap: 18px;
}

.neo .grid-2 {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr));
}

.neo .grid-3 {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}

/* ------------------------------------------------------ 7. Archive cards */

.neo .card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--text-faint);
}

.neo .badge {
  padding: 1px 8px;
  border: 1px solid currentColor;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
}

.neo .badge.active {
  color: var(--ok);
  text-shadow: 0 0 6px rgba(61, 255, 176, 0.6);
}

.neo .badge.archived {
  color: var(--muted-accent);
}

.neo .card-title {
  margin: 0 0 4px;
  font-size: 21px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
}

.neo a.panel:hover .card-title {
  color: var(--neon-soft);
  text-shadow: 0 0 10px rgba(0, 217, 255, 0.6);
}

.neo .card-period {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--neon);
}

.neo .card-desc {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
}

.neo .card-go {
  display: block;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--neon);
}

.neo .card-go::after {
  content: " >>";
  transition: margin-left 0.25s;
}

.neo a.panel:hover .card-go::after {
  margin-left: 6px;
}

/* ------------------------------------------------------ 8. Record list */

.neo .rec-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.neo .rec-list li {
  border-bottom: 1px solid var(--line);
}

.neo .rec-list a {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: baseline;
  gap: 4px 24px;
  padding: 16px 8px;
  color: inherit;
  transition: background 0.2s;
}

.neo .rec-list a:hover {
  text-shadow: none;
  background: linear-gradient(90deg, rgba(0, 170, 255, 0.12), transparent);
}

.neo .rec-date {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--neon);
  letter-spacing: 0.08em;
}

.neo .rec-title {
  font-weight: 700;
  color: #fff;
}

.neo .rec-desc {
  grid-column: 2;
  font-size: 14px;
  color: var(--text-dim);
}

.neo .rec-arrow {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  font-family: var(--font-mono);
  color: var(--text-faint);
  transition: color 0.2s, transform 0.2s;
}

.neo .rec-list a:hover .rec-arrow {
  color: var(--neon);
  transform: translateX(4px);
}

/* ------------------------------------------------------ 9. Terminal log */

.neo .terminal {
  padding: 0;
  overflow: hidden;
}

.neo .terminal-bar {
  display: flex;
  justify-content: space-between;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 60, 120, 0.2);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--text-faint);
}

.neo .terminal-body {
  padding: 18px 20px 20px;
  font-size: 15px;
}

.neo .log {
  list-style: none;
  margin: 0;
  padding: 0;
}

.neo .log li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  padding: 6px 0;
}

.neo .log li > span { word-break: auto-phrase; }

.neo .log time {
  font-family: var(--font-mono);
  color: var(--neon);
  white-space: nowrap;
}

.neo .log .prompt {
  font-family: var(--font-mono);
  color: var(--ok);
}

/* ------------------------------------------------------ 10. Link tiles */

.neo .link-tile {
  display: flex !important;
  flex-direction: column;
  gap: 2px;
  padding: 16px 18px;
}

.neo .link-tile .lt-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
  text-transform: uppercase;
}

.neo .link-tile .lt-name {
  font-weight: 700;
  font-size: 17px;
  color: #fff;
}

.neo .link-tile .lt-desc {
  font-size: 13px;
  color: var(--text-dim);
}

.neo .ext::after {
  content: " ↗";
  font-size: 0.8em;
  color: var(--neon);
}

/* ------------------------------------------------------------ 11. Footer */

.neo .site-footer {
  position: relative;
  z-index: 1;
  margin-top: 40px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--text-faint);
}

.neo .site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

/* ------------------------------------------------------ 12. Sub pages */

.neo .page-head {
  padding: clamp(48px, 10vh, 96px) 0 24px;
}

.neo .page-head .crumb {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--text-faint);
}

.neo .page-head h1 {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 6vw, 48px);
  letter-spacing: 0.1em;
  color: #fff;
  text-shadow: 0 0 12px var(--neon), 0 0 40px var(--neon-2);
}

/* ------------------------------------------------------ 13. Reveal */

.neo .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.neo .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ------------------------------------------------------ 14. Responsive */

@media (max-width: 640px) {
  .neo .nav {
    gap: 14px;
    font-size: 11px;
  }

  .neo .nav .nav-opt {
    display: none;
  }

  .neo .rec-list a {
    grid-template-columns: 1fr auto;
  }

  .neo .rec-date {
    grid-column: 1;
    font-size: 12px;
  }

  .neo .rec-title,
  .neo .rec-desc {
    grid-column: 1;
  }

  .neo .rec-arrow {
    grid-column: 2;
    grid-row: 1 / span 3;
  }

  .neo .log li {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .neo *,
  .neo *::before,
  .neo *::after {
    animation: none !important;
    transition: none !important;
  }

  .neo .reveal {
    opacity: 1;
    transform: none;
  }
}
