/* LM Radio Generate Log - CSS Styles */

/* ベーススタイル */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  word-break: auto-phrase;
  overflow-wrap: break-word;
}

body {
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", Meiryo, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
  color: #333;
}

/* ヘッダー */
header {
  background-color: #2c3e50;
  color: white;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header h1 {
  margin: 0;
  font-size: 1.8rem;
  text-align: center;
}

/* 目次 */
.table-of-contents {
  max-width: 800px;
  margin: 0 auto;
  padding: 0;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
  overflow: hidden;
}

.table-of-contents ul {
  list-style: none;
  padding: 1.5rem 2rem;
  margin: 0;
}

.table-of-contents a {
  color: #3498db;
  text-decoration: none;
  padding: 0.3rem;
  display: block;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.table-of-contents a:hover {
  background-color: #ecf0f1;
  text-decoration: underline;
}

/* TOPに戻るボタン（JavaScript制御） */
.jumpTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.2s ease-out;
}

.jumpTop a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background-color: #3498db;
  color: white;
  border-radius: 50px;
  font-size: 1.5rem;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
  transition: background-color 0.3s, transform 0.2s;
}

.jumpTop a:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
}

.jumpTop a:active {
  transform: translateY(0);
}

/* メインコンテンツ */
main {
  max-width: 800px;
  margin: 0 auto;
}

/* セクション */
.session {
  background-color: white;
  margin-bottom: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.session h2,
#toc-heading {
  background-color: #34495e;
  color: white;
  margin: 0;
  padding: 1rem;
  font-size: 1.2rem;
}

/* メッセージベース */
.message {
  margin: 1.5rem;
  border-radius: 8px;
  padding: 1rem;
  border-left: 4px solid;
  position: relative;
}

/* 発言者ラベル */
.speaker-label {
  font-weight: bold;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

/* コンテンツ */
.content {
  line-height: 1.7;
}

/* Markdownスタイル */
.content ul,
.content ol {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

.content ul li,
.content ol li {
  margin-bottom: 0.3rem;
}

.content h3 {
  font-size: 1.3rem;
  color: #000;
  font-weight: bold;
  margin: 1.5rem 0 0.6rem 0;
  padding: 0.5rem 1rem;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 6px;
}

.content h4,
.content h5,
.content h6 {
  color: #000;
  margin: 1rem 0;
  position: relative;
}

.content h4 {
  font-size: 1.1rem;
  font-weight: bold;
}

.content h5 {
  font-size: 1rem;
  font-weight: normal;
}

.content h6 {
  font-size: 1rem;
}

.content h4::before {
  content: "★ ";
  color: #000;
  margin-right: 0.3rem;
}

.content h5::before {
  content: "◆ ";
  color: #000;
  margin-right: 0.3rem;
}

.content h6::before {
  content: "▶ ";
  color: #000;
  margin-right: 0.3rem;
}

.content h4::after,
.content h5::after,
.content h6::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
}

.content h4::after {
  bottom: -3px;
  height: 3px;
  background-color: rgba(0, 0, 0, 0.25);
}

.content h5::after {
  bottom: -3px;
  height: 2px;
  background-color: rgba(0, 0, 0, 0.2);
}

.content h6::after {
  bottom: -2px;
  height: 1px;
  background-color: rgba(0, 0, 0, 0.15);
}

code {
  font-weight: normal;
}

.content code,
.notes code {
  background-color: #fff;
  border: 1px solid #e9ecef;
  border-radius: 3px;
  padding: 0.2rem 0.4rem;
  font-family: monospace;
  color: #2c3e50;
}

.content code {
  font-size: 0.9rem;
}

.notes code {
  font-size: 0.8rem;
}

.content pre code,
.notes pre code {
  display: block;
  padding: 0.5rem;
  margin: 1rem 0;
  background-color: #fff;
  color: #2c3e50;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  white-space: pre-wrap;
}

.content strong :not(code) {
  text-decoration: underline;
  text-decoration-color: #666;
  text-underline-offset: 2px;
}

.content .removed {
  color: #95a5a6;
}

/* テーブル */
.content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1rem 0;
  background-color: rgba(255, 255, 255, 0.8);
  border: 1px solid #999;
  border-radius: 6px;
  overflow: hidden;
}

.content table th,
.content table td {
  padding: 0.75rem;
  text-align: center;
  border-bottom: 1px solid #dee2e6;
  border-right: 1px solid #dee2e6;
}

.content table th:last-child,
.content table td:last-child {
  border-right: none;
}

.content table th {
  background-color: rgba(248, 249, 250, 0.8);
  font-weight: bold;
  color: #495057;
}

.content table tbody tr:hover {
  background-color: #f5f5f5;
}

.content table tbody tr:last-child td {
  border-bottom: none;
}

/* 注記 */
.notes {
  margin-top: 0.8rem;
  padding: 0.5rem;
  background-color: rgb(248, 249, 250, 0.8);
  border: 1px solid #dee2e6;
  color: #6c757d;
  border-radius: 4px;
  position: relative;
}

.notes::before {
  content: "NOTE: ";
  font-weight: bold;
  color: #6c757d;
}

.notes p {
  display: inline;
}

/* 注記内のMarkdownスタイル */
.notes ul,
.notes ol {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

.notes ul li,
.notes ol li {
  margin-bottom: 0.3rem;
}


.notes .emphasis {
  text-decoration: underline;
  text-decoration-color: #d68910;
}

.notes .path-removed {
  color: #a6a6a6;
  font-size: 0.75rem;
  font-style: italic;
}

/* 思考インジケーター */
.thinking-indicator {
  font-size: 0.8rem;
  color: #c0392b;
  font-weight: normal;
}

/* ツール実行インジケーター */
.tool-use-indicator {
  font-size: 0.8rem;
  color: #d35400;
  font-weight: normal;
}

/* 発言者別スタイル - User */
.message.user {
  background-color: #e8f5e8;
  border-left: none;
  border-right: 4px solid #27ae60;
  margin-left: 100px;
}

.message.user .speaker-label {
  color: #27ae60;
}

/* 発言者別スタイル - Claude */
.message.claude {
  background-color: #fef9e7;
  border-left-color: #f39c12;
  margin-right: 100px;
}

.message.claude .speaker-label {
  color: #f39c12;
}

/* メッセージタイプ別スタイル - Thinking */
.message.thinking {
  background-color: #fff3e0;
  border-color: #ccc;
  border-style: dashed;
}

.message.thinking .speaker-label {
  color: #c0392b;
}

.message.thinking .content,
.message.tool_use .content {
  color: #333;
}

/* 複合スタイル - Claude Thinking */
.message.claude.thinking {
  background-color: #f7f3f0;
  border-left-color: #c0392b;
}

/* メッセージタイプ別スタイル - Tool Use */
.message.tool_use {
  background-color: #f4f8fb;
  border-color: #ccc;
  border-style: solid;
}

.message.tool_use .speaker-label {
  color: #d35400;
}

/* 複合スタイル - Claude Tool Use */
.message.claude.tool_use {
  background-color: #faf6f2;
  border-left-color: #d35400;
}

/* スラッシュコマンドインジケーター */
.slash-command-indicator {
  font-size: 0.8rem;
  color: #229954;
  font-weight: normal;
}

/* メッセージタイプ別スタイル - Slash Command */
.message.slash_command {
  background-color: #eafaf1;
  border-color: #ccc;
  border-style: solid;
}

.message.slash_command .speaker-label {
  color: #229954;
}

.message.slash_command .content,
.message.slash_command .content p {
  color: #2c3e50;
  font-family: monospace;
  font-weight: bold;
}

/* 複合スタイル - User Slash Command */
.message.user.slash_command {
  background-color: #e1ffed;
  border-right-color: #27ae60;
}

.message.slash_command p {
  display: inline;
}

.message.slash_command .content .command-args {
  padding-left: 0.5rem;
  font-weight: normal;
}

/* 連続メッセージの視覚改善 */
/* margin/paddingのみで自然な結合感を演出 */

/* 連続メッセージ共通スタイル */
.message.claude+.message.claude,
.message.user+.message.user {
  margin-top: -1rem;
}

/* 発言者非表示、インジケーターは表示 */
.message.claude+.message.claude .speaker-label,
.message.user+.message.user .speaker-label {
  color: transparent;
  font-size: 0;
}

/* ページナビゲーション */
.page-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 800px;
  margin: 2rem auto;
  padding: 1.5rem 2rem;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-navigation.top {
  margin: 2rem auto;
}

.nav-link {
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s;
}

.nav-link:not(.disabled) {
  color: #3498db;
  border: 1px solid #3498db;
}

.nav-link:not(.disabled):hover {
  background-color: #3498db;
  color: white;
}

.nav-link.disabled {
  color: #bdc3c7;
  border: 1px solid #ecf0f1;
  cursor: not-allowed;
}

.nav-link.index {
  background-color: #2c3e50;
  color: white;
  border: 1px solid #2c3e50;
}

.nav-link.index:hover {
  background-color: #34495e;
}


/* レスポンシブデザイン */
@media (max-width: 800px) {

  .message {
    margin: 1.5rem;
    padding: 0.8rem;
  }

  /* モバイルでは余白を削除 */
  .message.user,
  .message.claude {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }

  /* モバイルでの連続メッセージ調整 */
  .message.claude+.message.claude,
  .message.user+.message.user {
    margin-top: -1rem;
  }

  header h1 {
    font-size: 1.4rem;
  }

  .table-of-contents {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .jumpTop {
    bottom: 1rem;
    right: 1rem;
  }

  .jumpTop a {
    width: 45px;
    height: 45px;
    font-size: 0.8rem;
  }

  .page-navigation {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    margin: 2rem auto;
  }

  .nav-link {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    text-align: center;
    width: 100%;
  }
}

/* インデックスページ用追加スタイル */
.subtitle {
  color: #7f8c8d;
  font-size: 1rem;
  margin: 0.5rem 0 0 0;
  font-weight: normal;
}

.overview {
  max-width: 800px;
  background-color: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin: 2rem auto;
  border: 2px solid #3498db;
}

.overview h2 {
  color: #2c3e50;
  margin-top: 0;
}

.overview ul {
  margin: 0;
  padding-left: 1.5rem;
  list-style-type: disc;
}

.overview ul li {
  margin-bottom: 0.4rem;
  line-height: 1.5;
  padding: 0.2rem 0;
}

.overview a {
  color: #3498db;
}

hr {
  max-width: 800px;
  width: 90%;
  margin: 3rem auto;
  border-top: 1px dashed rgba(0, 0, 0, 0.5);
}

.day-list {
  max-width: 800px;
  margin: 0 auto;
}

.day-item {
  background-color: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-left: 4px solid #3498db;
}

.day-item h3 {
  margin: 0 0 1rem 0;
  color: #2c3e50;
  font-size: 1.2rem;
}

.day-item h3 a {
  color: #2c3e50;
  text-decoration: none;
  transition: color 0.3s;
}

.day-item h3 a:hover {
  color: #3498db;
  text-decoration: underline;
}

.session-list {
  margin: 0;
  padding-left: 1.5rem;
  list-style-type: disc;
}

.day-item .session-list li {
  margin-bottom: 0.4rem;
  line-height: 1.5;
}

.day-item .session-list li a {
  color: #5d6d7e;
  text-decoration: none;
  transition: color 0.3s;
  display: block;
  padding: 0.2rem 0;
}

.day-item .session-list li a:hover {
  color: #3498db;
  text-decoration: underline;
}

/* フッター */
footer {
  background-color: #2c3e50;
  color: white;
  padding: 1rem;
  margin-top: 40px;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
  text-align: center;
}

footer p {
  margin: 0.5rem 0;
  font-size: 1rem;
}

footer a {
  color: #fdcb6e;
}

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