/* ===== 共通 ===== */
body {
  margin: 0;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Hiragino Kaku Gothic ProN",
    Meiryo,
    sans-serif;
  background: radial-gradient(circle at top, #0a3a6a, #020b18);
  color: #e6f6ff;
}

a {
  color: #9fdcff;
}

.notice {
  text-align: center;
  font-size: 12px;
  opacity: 0.7;
}

/* ===== ヘッダー ===== */
header {
  background: rgba(0, 60, 120, 0.85);
  padding: 15px;
}

header h1 {
  margin: 0;
  font-size: 20px;
}

header nav a {
  margin-right: 15px;
  text-decoration: none;
}

/* ===== レイアウト ===== */
.container {
  display: grid;
  grid-template-columns: 220px 1fr 260px;
  gap: 20px;
  padding: 20px;
}

/* ===== 目次 ===== */
.toc-fixed {
  position: sticky;
  top: 90px;
  background: rgba(0, 40, 80, 0.6);
  backdrop-filter: blur(6px);
  padding: 15px;
  border-radius: 12px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.toc-fixed ul {
  list-style: none;
  padding: 0;
}

.toc-fixed li {
  margin-bottom: 8px;
}

/* ===== メイン ===== */
main h2 {
  border-left: 4px solid #6ecbff;
  padding-left: 10px;
}

main h3 {
  position: relative;
  margin: 12px 0 10px;
  padding-left: 12px;
  font-size: 20px;
  font-weight: 600;
  color: #cfeeff;
}

/* 控えめな左ライン */
main h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 60%;
  transform: translateY(-50%);
  background: linear-gradient(
    to bottom,
    #6ecbff,
    rgba(110,203,255,0.2)
  );
}

/* ===== サイドバー ===== */
aside {
  background: rgba(0, 30, 60, 0.4);
  padding: 15px;
  border-radius: 12px;
}

/* ===== 広告 ===== */
.ad {
  min-height: 250px;
  margin: 25px 0;
  background: rgba(255,255,255,0.05);
  text-align: center;
  line-height: 250px;
  font-size: 14px;
  opacity: 0.8;
}

.ad::before {
  content: "広告";
  display: block;
  font-size: 12px;
  opacity: 0.6;
}

/* ===== ガチャ ===== */
.gacha-control {
  text-align: center;
  margin: 20px 0;
}

button {
  padding: 10px 16px;
  font-size: 16px;
  cursor: pointer;
}

/* 結果 */
.gacha-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 12px;
  padding: 16px;
}

.gacha-item {
  background: #132f5c;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

/* 画像（なければ自動で消える） */
.gacha-item img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 6px;
  display: block;
}

/* レアリティ */
.rarity-3 {
  border: 1px solid #6aa9ff;
}

.rarity-4 {
  border: 1px solid #ff0000;
  box-shadow: 0 0 6px rgba(200,0,0,0.6);
}

.rarity-5 {
  border: 2px solid gold;
  box-shadow: 0 0 12px gold;
  animation: rainbowGlow 1.5s infinite alternate;
}

/* ★5専用 */
.rare-hit {
  animation: rarePop 0.6s ease;
}

/* 再実行 */
.retry-area {
  text-align: center;
  margin-bottom: 30px;
}

#retryButton {
  padding: 10px 20px;
  font-size: 16px;
  background: #1e4fa3;
  color: #fff;
  border: none;
  border-radius: 6px;
}

#retryButton:hover {
  background: #2d6cdf;
}

/* アニメ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes rainbowGlow {
  from { box-shadow: 0 0 8px gold; }
  to { box-shadow: 0 0 18px cyan; }
}

@keyframes rarePop {
  0% { transform: scale(0.6); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

/* ===== テーブル ===== */
/* 表全体 */
table {
  width: 100%;
  border-collapse: collapse;
  background-color: #ffffff; /* 白 */
  color: #000000;           /* 黒文字 */
  text-align: center;
}

/* 見出し行 */
th {
  background-color: #fff7cc; /* 薄い黄色 */
  color: #000000;
  padding: 10px;
  border: 1px solid #cccccc;
  text-align: center;
}
/* 背景色交互 */
tbody > tr:nth-of-type(odd) {
  background: #eeeeee;
}

#introduction {
  white-space: pre-line;
}

/* ===== フッター ===== */
footer {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  opacity: 0.7;
}

/* お問い合わせページ全体 */
.contact-page {
  max-width: 900px;
  margin: 30px auto;
  padding: 20px 18px;
  background: rgba(10, 20, 35, 0.75);
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 150, 255, 0.15);
}

/* 見出し */
.contact-page h2 {
  color: #eaf7ff;
}

/* 説明文 */
.contact-page .notice {
  color: #e0f2ff;
}

/* 通常テキスト */
.contact-page p {
  color: #e6f6ff;
}


/* ===== スマホ対応 ===== */
@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
  }

  .toc-fixed,
  .toc-fixed.collapsed {
    position: static;
    width: auto;
    writing-mode: horizontal-tb;
  }

  .ad-sidebar {
    display: none;
  }
}

/* ===== ダメージ計算 ===== */
#score-calculator {
  font-family: sans-serif;
  text-align: center;
  margin-top: 40px;
}

#score-calculator .score-row {
  margin: 12px 0;
}

#score-calculator input {
  width: 110px;
  padding: 6px;
  margin: 0 5px;
}

#score-button {
  margin-top: 20px;
  padding: 8px 20px;
  cursor: pointer;
}

#score-result {
  margin-top: 25px;
  font-size: 22px;
  font-weight: bold;
}

