/* リセット・基本スタイル */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Helvetica Neue', 'Segoe UI', 'メイリオ', Meiryo, 'Hiragino Kaku Gothic ProN', 'ヒラギノ角ゴ ProN W3', sans-serif;
  background-color: #f5f6f8;
  color: #2f3a45;
  line-height: 1.6;
}

/* コンテナ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* ヘッダー */
.header {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header__title {
  margin: 0 0 16px 0;
  font-size: 28px;
  font-weight: 600;
  color: #2f3a45;
  border-bottom: 3px solid #3498db;
  padding-bottom: 12px;
}

.header__description {
  margin: 0 0 20px 0;
  font-size: 15px;
  line-height: 1.8;
  color: #666;
  background-color: #f9f9f9;
  padding: 16px;
  border-left: 4px solid #3498db;
  border-radius: 4px;
}

.header__links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.link {
  display: inline-block;
  padding: 8px 16px;
  background-color: #3498db;
  color: #ffffff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.link:hover {
  background-color: #2980b9;
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

/* メイン */
.main {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 24px;
}

/* デモセクション */
.demo-section {
  padding: 24px;
  margin-bottom: 32px;
  background-color: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}

.demo-section:last-child {
  margin-bottom: 0;
}

.demo-section__title {
  margin: 0 0 12px 0;
  font-size: 20px;
  font-weight: 600;
  color: #2f3a45;
  border-bottom: 2px solid #3498db;
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.doc-link {
  font-size: 14px;
  font-weight: normal;
  color: #3498db;
  text-decoration: none;
  padding: 6px 14px;
  background-color: #e3f2fd;
  border-radius: 4px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.doc-link:hover {
  background-color: #3498db;
  color: #ffffff;
}

.demo-section__description {
  margin: 0 0 16px 0;
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

.demo-section__content {
  padding: 20px;
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  min-height: 60px;
  margin-bottom: 12px;
}

.demo-section__output {
  padding: 12px;
  background-color: #e8f5e9;
  border-radius: 4px;
  font-size: 14px;
  color: #2e7d32;
  min-height: 20px;
  word-break: break-word;
}

/* フッター */
.footer {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}

.footer__text {
  margin: 0;
  font-size: 14px;
  color: #666;
}

.footer__text a {
  color: #3498db;
  text-decoration: none;
  font-weight: 500;
}

.footer__text a:hover {
  text-decoration: underline;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .container {
    padding: 12px;
  }

  .header {
    padding: 20px;
  }

  .header__title {
    font-size: 22px;
  }

  .main {
    padding: 20px;
  }

  .demo-section {
    padding: 16px;
  }

  .demo-section__title {
    font-size: 18px;
    flex-direction: column;
    align-items: flex-start;
  }

  .doc-link {
    align-self: flex-end;
  }

  .demo-section__content {
    padding: 16px;
  }
}

/* スクロールバーのスタイリング（WebKit系ブラウザ） */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}
