/* 全体設定 */
body {
  font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
  background: linear-gradient(to right, #1a0000, #330000);
  color: #fbeaea;
  line-height: 1.8;
  margin: 0;
  padding: 2em;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  overflow-x: hidden;
}

/* 粒子風アニメ背景 */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image: radial-gradient(#ff0055 0.5px, transparent 0.5px);
  background-size: 10px 10px;
  opacity: 0.04;
  z-index: -1;
  animation: moveBackground 60s linear infinite;
}

@keyframes moveBackground {
  0% { background-position: 0 0; }
  100% { background-position: 1000px 1000px; }
}

/* ヘッダー */
header h1 {
  font-size: 2.8em;
  color: #ff3366;
  text-shadow: 2px 2px 4px #000;
  animation: pulseRed 2.5s ease-in-out infinite;
}

@keyframes pulseRed {
  0%, 100% { transform: scale(1); color: #ff3366; }
  50% { transform: scale(1.05); color: #ff6688; }
}

header p {
  font-size: 1.2em;
  margin-top: 0.5em;
  color: #ffccdd;
}

/* ナビゲーション */
nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1em;
  padding: 1em 0;
  list-style: none;
  background: rgba(255, 0, 60, 0.1);
  border-radius: 10px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 0, 60, 0.2);
}

nav li a {
  text-decoration: none;
  color: #ff6688;
  font-weight: bold;
  padding: 0.5em 1em;
  border: 2px solid #ff6688;
  border-radius: 8px;
  transition: all 0.3s ease;
}

nav li a:hover {
  background: #ff6688;
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 0 10px #ff6688aa;
}

/* セクション */
section {
  margin: 2.5em 0;
  padding: 1.5em;
  border-left: 5px solid #ff3366;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(255, 51, 102, 0.1);
  animation: fadeIn 1.2s ease forwards;
  opacity: 0;
}

section:nth-child(even) {
  animation-delay: 0.3s;
}

section:nth-child(odd) {
  animation-delay: 0.6s;
}

@keyframes fadeIn {
  to { opacity: 1; transform: translateY(0); }
  from { opacity: 0; transform: translateY(20px); }
}

/* 見出し */
h2 {
  color: #ff6688;
  border-bottom: 2px dashed #ff99aa;
  padding-bottom: 0.3em;
  margin-bottom: 0.8em;
  position: relative;
}

h2::after {
  content: "💎";
  position: absolute;
  right: -1.2em;
  top: 0.1em;
  font-size: 1.2em;
  animation: sparkle 1.8s infinite linear;
}

@keyframes sparkle {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* コードブロック */
pre {
  background: #2a0a0a;
  color: #ffdddd;
  padding: 1em;
  border-radius: 10px;
  overflow-x: auto;
  box-shadow: inset 0 0 8px #ff336677;
  font-size: 0.95em;
}

code {
      background: #7e0606ff;
      color: #ffc1beff;
  padding: 0.2em 0.5em;
  border-radius: 4px;
  font-family: Menlo, Consolas, monospace;
}

/* リスト */
ul {
  padding-left: 1.2em;
}

li {
  margin-bottom: 0.5em;
}

a {
  color: #ff6688;
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover {
      background: #7e0606ff;
      color: #ffc1beff;
  text-decoration: underline;
}
/* フッター */
footer {
  text-align: center;
  margin-top: 4em;
  font-size: 0.9em;
  color: #ffbbbb;
  border-top: 1px solid #ff6688;
  padding-top: 1em;
  opacity: 0.7;
  animation: glowFooter 4s ease-in-out infinite;
}

@keyframes glowFooter {
  0%, 100% { text-shadow: 0 0 2px #ff6688; }
  50% { text-shadow: 0 0 10px #ff668855; }
}

/* レスポンシブ */
@media screen and (max-width: 768px) {
  nav ul {
    flex-direction: column;
    align-items: center;
  }

  header h1 {
    font-size: 2em;
  }
}
