/* 全体レイアウト */
body {
  background: #1e1e1e; /* ダークだけど優しいグレー */
  color: #ddd;
  font-family: 'Courier New', monospace;
  font-size: 18px;
  line-height: 1.8;
  max-width: 800px;
  margin: 3em auto;
  padding: 1.5em;
  border: 2px solid #444;
  box-shadow: 0 0 12px #111;
}

/* リンク */
a {
  color: #00e0e0;
  text-decoration: underline;
}
a:hover {
  color: #ffa0ff;
}

/* 見出し */
h1, h2, h3 {
  color: #ffdd55;
  border-bottom: 1px dashed #555;
  padding-bottom: 0.2em;
}

h1 {
  font-family: 'Comic Sans MS', cursive, sans-serif;
  font-size: 32px;
  background: linear-gradient(to right, #66ffff, #ff66ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.15em;

  border: 3px double #ff66ff;
  border-radius: 6px;
  padding: 0.5em;

  background-size: 200% auto;

  animation:
    shine 4s linear infinite,
    shake 0.15s infinite alternate;
}

@keyframes shine {
  to { background-position: 200% center; }
}

@keyframes shake {
  from { transform: rotate(-0.5deg); }
  to   { transform: rotate(0.5deg); }
}

h2 {
  font-size: 24px;
  margin-top: 2.5em;  /* ← ここで上に余白を追加 */
  margin-bottom: 0.6em;
  border-bottom: 1px dashed #555;
  color: #ffdd55;
}

h3 { font-size: 20px; border: none; }

/* 段落とリスト */
p, ul, ol {
  margin: 1em 0;
}

/* コード */
code {
  background: #2a2a2a;
  color: #a0ffa0;
  padding: 0.2em 0.4em;
  border-radius: 4px;
}
pre code {
  display: block;
  background: #151515;
  color: #a0ffa0;
  padding: 1em;
  overflow-x: auto;
  border: 1px solid #444;
}

/* 引用 */
blockquote {
  background: #262626;
  border-left: 4px solid #555;
  padding: 0.5em 1em;
  color: #bbb;
  font-style: italic;
}

/* テーブル */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
}
th, td {
  border: 1px solid #444;
  padding: 0.5em;
}
th {
  background: #2a2a2a;
  color: #fff;
}

/* 画像 */
img {
  max-width: 100%;
  border: 2px solid #444;
  margin: 1em 0;
  border-radius: 4px;
}

/* ヘッダー＆フッター */
header, footer {
  text-align: center;
  margin: 2em 0;
}
footer p {
  font-size: 0.85em;
  color: #888;
}

/* Obsidian記法：ハイライトと注釈 */
mark {
  background-color: #444400;
  color: #ffffaa;
  padding: 0 0.2em;
  border-radius: 2px;
}

.annotation {
  font-size: 0.85em;
  color: #88ccff;
  background: #2a2a2a;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  margin-left: 0.5em;
}

/* レトロな点滅装飾 */
.blink {
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink {
  to {
    visibility: hidden;
  }
}

strong, b {
  color: #ff6666;
  font-weight: bold;
  text-shadow:
    0 0 2px #000,
    0 0 4px #ff4444,
    1px 1px 1px #000;
}

hr {
  border: none;
  border-top: 1px solid #414141;  /* ← 暗めに */
  margin: 2em 0;
}

.wave span {
  display: inline-block;
  animation: waveUpDown 2s ease-in-out infinite;
}

.wave span:nth-child(1) { animation-delay: 0s; }
.wave span:nth-child(2) { animation-delay: 0.1s; }
.wave span:nth-child(3) { animation-delay: 0.2s; }
.wave span:nth-child(4) { animation-delay: 0.3s; }
.wave span:nth-child(5) { animation-delay: 0.4s; }
.wave span:nth-child(6) { animation-delay: 0.5s; }
.wave span:nth-child(7) { animation-delay: 0.6s; }
.wave span:nth-child(8) { animation-delay: 0.7s; }
.wave span:nth-child(9) { animation-delay: 0.8s; }
.wave span:nth-child(10) { animation-delay: 0.9s; }
.wave span:nth-child(11) { animation-delay: 1.0s; }
.wave span:nth-child(12) { animation-delay: 1.1s; }
.wave span:nth-child(13) { animation-delay: 1.2s; }
.wave span:nth-child(14) { animation-delay: 1.3s; }
.wave span:nth-child(15) { animation-delay: 1.4s; }
.wave span:nth-child(16) { animation-delay: 1.5s; }
.wave span:nth-child(17) { animation-delay: 1.6s; }
.wave span:nth-child(18) { animation-delay: 1.7s; }
.wave span:nth-child(19) { animation-delay: 1.8s; }
.wave span:nth-child(20) { animation-delay: 1.9s; }
.wave span:nth-child(21) { animation-delay: 2.0s; }
.wave span:nth-child(22) { animation-delay: 2.1s; }
.wave span:nth-child(23) { animation-delay: 2.2s; }
.wave span:nth-child(24) { animation-delay: 2.3s; }
.wave span:nth-child(25) { animation-delay: 2.4s; }
.wave span:nth-child(26) { animation-delay: 2.5s; }
.wave span:nth-child(27) { animation-delay: 2.6s; }
.wave span:nth-child(28) { animation-delay: 2.7s; }
.wave span:nth-child(29) { animation-delay: 2.8s; }
.wave span:nth-child(30) { animation-delay: 2.9s; }

@keyframes waveUpDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

h3.blink-color {
  animation: colorShift 1s steps(5, end) infinite;
}

@keyframes colorShift {
  0%   { color: #ff66ff; }
  25%  { color: #66ccff; }
  50%  { color: #a0ffa0; }
  75%  { color: #ffff66; }
  100% { color: #ff66ff; }
}

.mermaid .node rect {
  rx: 8px !important;
  ry: 8px !important;
}
