/* --- 全体 --- */
body {
  font-family: Inter, system-ui, sans-serif;
  background: #f4f5f7;
  color: #0b1220;
  padding: 20px;
  margin: 0;
  box-sizing: border-box;
}

/* --- ヘッダー --- */
header.merge-header {
  background: linear-gradient(90deg, #ffffff, #e0e4e8);
  border-radius: 16px;
  padding: 25px 20px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
}

/* ホームリンク（右上） */
header.merge-header .home-link {
  position: absolute;
  top: 15px;
  left: 20px;
  font-size: 14px;
  color: #60a5fa;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(96, 165, 250, 0.1);
  transition: all 0.2s ease;
}

header.merge-header .home-link:hover {
  background: rgba(96, 165, 250, 0.2);
  text-decoration: underline;
}

/* タイトル */
header.merge-header h1 {
  font-size: 32px;
  margin: 0 0 10px 0;
  background: linear-gradient(90deg, #b91c1c, #0078ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* 説明テキスト */
header.merge-header p {
  font-size: 15px;
  color: #555;
  margin: 0;
}

header.merge-header .intro {
  font-size: 13px;
  color: #777;
  margin-top: 10px;
}

/* --- コンテナ・テキストエリア --- */
.container {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 20px;
}

textarea {
  flex: 1 1 45%;
  min-width: 200px;
  height: 320px;
  padding: 12px;
  font-family: monospace;
  font-size: 15px;
  border-radius: 10px;
  border: 1px solid #ccc;
  background: #ffffff;
  color: #0b1220;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

textarea:focus {
  outline: 2px solid #60a5fa;
}

/* --- ボタン --- */
#buttons {
  display: flex;
  gap: 12px;
  margin-top: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

button {
  flex: 1 1 120px;
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  background: #60a5fa;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

button:hover {
  background: #7dd3fc;
  transform: translateY(-2px);
}

/* --- 差分表示 --- */
#diff {
  width: 98%;
  min-height: 180px;
  white-space: pre-wrap;
  font-family: monospace;
  padding: 12px;
  border-radius: 10px;
  background: #ffffff;
  margin-top: 20px;
  border: 1px solid #ccc;
  overflow: auto;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.added {
  background: #d4f8d4;
  color: #0b1220;
  border-radius: 3px;
  padding: 1px 2px;
}

.removed {
  background: #f8d4d4;
  color: #0b1220;
  border-radius: 3px;
  padding: 1px 2px;
}

/* --- フッター --- */
footer.footer {
  margin-top: 40px;
  padding: 20px;
  text-align: center;
  background: #e0e4e8;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  color: #555;
  font-size: 14px;
}

footer.footer .footer-nav a {
  color: #60a5fa;
  text-decoration: none;
  font-weight: 600;
  margin-left: 10px;
}

footer.footer .footer-nav a:hover {
  text-decoration: underline;
}

/* --- 使い方セクション --- */
.how-to {
  margin-top: 50px;
  padding: 30px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  line-height: 1.8;
}

.how-to h2 {
  font-size: 24px;
  margin-bottom: 15px;
  padding-left: 10px;
  color: #111827;
}

.how-to p {
  font-size: 15px;
  color: #444;
  margin-bottom: 16px;
}

/* --- ステップ部分 --- */
.step-list {
  margin-top: 20px;
}

.step {
  margin-bottom: 20px;
  padding: 15px 20px;
  background: #f9fafb;
  border-left: 4px solid #60a5fa;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.step:hover {
  background: #eef6ff;
}

.step h3 {
  font-size: 17px;
  color: #2563eb;
  margin-bottom: 8px;
}

.step p {
  font-size: 14.5px;
  color: #333;
}

/* 差分色の見本 */
.added-sample {
  background: #d4f8d4;
  padding: 2px 5px;
  border-radius: 3px;
}

.removed-sample {
  background: #f8d4d4;
  padding: 2px 5px;
  border-radius: 3px;
}

/* --- 用途リスト --- */
.use-cases {
  margin-top: 25px;
  padding-left: 20px;
  list-style: "💡 ";
}

.use-cases li {
  margin-bottom: 10px;
  font-size: 14.5px;
  color: #444;
}

.use-cases strong {
  color: #111;
}

/* --- 関連ツール --- */
.related-tools {
  margin-top: 50px;
  padding: 30px;
  background: #f9fafb;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.related-tools h2 {
  font-size: 22px;
  margin-bottom: 10px;
}

.related-tools p {
  font-size: 14.5px;
  color: #444;
}

.tool-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 20px 0;
}

.tool-card {
  display: inline-block;
  background: #ffffff;
  padding: 12px 20px;
  border-radius: 10px;
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #d1d5db;
  transition: all 0.25s ease;
}

.tool-card:hover {
  background: #eff6ff;
  border-color: #60a5fa;
  transform: translateY(-2px);
}

.more-tools a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}
.more-tools a:hover {
  text-decoration: underline;
}

/* --- レスポンシブ --- */
@media (max-width: 720px) {
  .container {
    flex-direction: column;
    gap: 20px;
  }

  textarea {
    width: 100%;
    height: 250px;
  }

  #buttons {
    flex-direction: column;
    gap: 15px;
  }

  header.merge-header {
    padding-top: 20px;
  }

  header.merge-header .home-link {
    position: static;
    display: inline-block;
    margin-bottom: 12px;
    font-size: 14px;
    background: rgba(96, 165, 250, 0.15);
  }

  header.merge-header h1 {
    font-size: 24px;
    margin-top: 0;
  }

  header.merge-header h1::before {
    font-size: 22px;
  }

  header.merge-header p {
    font-size: 13px;
  }
}
