/* 🌈 基本設定 */
body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(to bottom, #fff 0%, #f0f8ff 100%);
  color: #222;
  padding: 2em;
  max-width: 960px;
  margin: auto;
  line-height: 1.8;
}

/* 🌈 ヘッダー */
header, footer {
  text-align: center;
  margin-bottom: 2em;
}

h1, h2 {
  font-size: 2em;
  font-weight: bold;
  background: linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* 🌈 ナビゲーション */
nav ul {
  display: flex;
  justify-content: center;
  gap: 1em;
  list-style: none;
  padding: 0.5em;
  border-radius: 8px;
  background: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet);
}

nav a {
  text-decoration: none;
  color: white;
  font-weight: bold;
  padding: 0.4em 0.8em;
  transition: background 0.3s ease;
  border-radius: 4px;
}

nav a:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* 🌈 セクション */
section {
  margin-top: 2.5em;
  margin-bottom: 2.5em;
  padding-bottom: 1em;
  border-bottom: 1px dashed #ccc;
}

/* 🌈 コード表示 */
code {
  background: #eee;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-family: Menlo, Consolas, monospace;
}

pre {
  background: #eef;
  padding: 1em;
  overflow-x: auto;
  border-radius: 6px;
  border-left: 4px solid #99ccff;
}

pre code {
  background: transparent;
  padding: 0;
  font-size: 0.9em;
}

/* 🌈 カード */
.card {
  border: 1px solid #ccc;
  padding: 1em;
  border-radius: 10px;
  background: #fff;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.1);
  transition: background 0.3s, transform 0.3s;
}

.card.highlight {
  background: linear-gradient(135deg, #fff4c2, #ffe07d);
  border: 2px solid #ffcc00;
  box-shadow: 0 0 20px rgba(255, 204, 0, 0.6);
  transform: scale(1.02);
  position: relative;
}

.card.highlight::before {
  content: "💡 HIGHLIGHT";
  position: absolute;
  top: -10px;
  left: -10px;
  background: #ffcc00;
  color: #222;
  font-size: 0.75em;
  font-weight: bold;
  padding: 0.3em 0.6em;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* 🌈 ボタン */
button {
  padding: 0.6em 1.2em;
  background: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet);
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 1em;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

button:hover {
  transform: scale(1.05);
}

/* 🌈 表示切替 */
.hidden {
  display: none;
}


/* 🌈 おしゃれな details 全体 */
details {
  border: 2px solid #a6c1ee;
  border-radius: 12px;
  background: linear-gradient(135deg, #e0f7fa, #fce4ec);
  padding: 1em;
  margin-bottom: 1.5em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  overflow: hidden;
}

/* 🌈 summary の見た目 */
details summary {
  font-weight: bold;
  font-size: 1.1em;
  cursor: pointer;
  position: relative;
  padding-left: 1.5em;
  list-style: none;
  color: #3366cc;
}

details summary::before {
  content: "➕";
  position: absolute;
  left: 0;
  font-size: 1.2em;
  transition: transform 0.3s ease;
}

/* 🌈 開いたときはアイコン回転 */
details[open] summary::before {
  content: "➖";
  transform: rotate(180deg);
}

/* 🌈 中のテキスト */
details p {
  margin-top: 0.8em;
  color: #444;
  line-height: 1.6;
  animation: fadeIn 0.4s ease-in;
}

/* 🌈 フェードインアニメーション */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


#sampleArea {
  margin-top: 1.2em;
  border: 2px dashed #ccc;
  padding: 1em;
  border-radius: 8px;
  background: linear-gradient(135deg, #fdfdfd, #eaf6ff);
  transition: all 0.3s ease;
}

/* 🌈 フッター */
footer {
  margin-top: 4em;
  background: linear-gradient(135deg, #f0f0ff, #e0f7ff);
  border-top: 2px solid #ccc;
  padding: 2em 1em;
  border-radius: 12px 12px 0 0;
  box-shadow: inset 0 8px 20px rgba(0, 0, 0, 0.05);
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}

.footer-title {
  font-size: 1.1em;
  color: #333;
  margin-bottom: 1em;
}

.footer-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2em;
  margin: 0;
}

.footer-links li a {
  text-decoration: none;
  font-weight: bold;
  color: #3366cc;
  padding: 0.4em 0.8em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.footer-links li a:hover {
  background: linear-gradient(90deg, #ff8a65, #fbc02d, #81c784, #64b5f6);
  color: white;
  transform: scale(1.05);
}

.footer-links li a:active {
  transform: scale(0.95);
}
