/* ==========================================================================
   Self-Management Master - Dark Modern UI & Step Wizard Styles
   Author: オガワレイ式 自己理解ピラミッド ＆ 10倍速人生改革ナビゲーター
   ========================================================================== */

html {
  scroll-behavior: smooth;
  font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
}

/* スクロールバー */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #0f172a;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* ステップ進捗インジケーター */
.step-node {
  transition: all 0.25s ease;
  position: relative;
}
.step-node .step-icon {
  transition: all 0.25s ease;
}
.step-node.active .step-icon {
  background-color: #0d9488 !important; /* teal-600 */
  border-color: #2dd4bf !important; /* teal-400 */
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(45, 212, 191, 0.45);
  transform: scale(1.1);
}
.step-node.active .step-title {
  color: #2dd4bf !important;
  font-weight: 700 !important;
}
.step-node.completed .step-icon {
  background-color: #064e3b !important; /* emerald-900 */
  border-color: #10b981 !important; /* emerald-500 */
  color: #34d399 !important;
}

/* 自己理解ピラミッド ビジュアライザー (Dark UI) */
.pyramid-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 0;
  width: 100%;
}

.pyramid-layer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pyramid-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.8rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pyramid-block:hover {
  transform: translateY(-2px) scale(1.015);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* 層ごとの幅 */
.layer-9 { width: 54%; }
.layer-8 { width: 60%; }
.layer-7 { width: 66%; }
.layer-6 { width: 72%; }
.layer-5 { width: 78%; }
.layer-4 { width: 84%; }
.layer-3 { width: 90%; }
.layer-2 { width: 95%; }
.layer-1 { width: 100%; }

.layer-bg-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  transition: width 0.4s ease;
  pointer-events: none;
}

.group-separator {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 3px 0;
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.group-separator::before,
.group-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: #1e293b;
}

/* スライダー用スタイル */
input[type=range] {
  -webkit-appearance: none;
  height: 6px;
  border-radius: 3px;
  background: #334155;
  outline: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #14b8a6;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(20, 184, 166, 0.5);
  transition: transform 0.15s ease, background-color 0.2s;
}
input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: #2dd4bf;
}

/* プラン選択カード */
.plan-card.active {
  border-color: #14b8a6 !important;
  background-color: rgba(20, 184, 166, 0.12) !important;
  box-shadow: 0 0 15px rgba(20, 184, 166, 0.25);
}

/* 書籍図解アコーディオン */
.book-illustration-card summary {
  list-style: none;
}
.book-illustration-card summary::-webkit-details-marker {
  display: none;
}

/* チャット吹き出し */
.chat-bubble-ai {
  background-color: #1e293b;
  border: 1px solid #334155;
  border-radius: 1rem 1rem 1rem 0.25rem;
}
.chat-bubble-user {
  background: linear-gradient(135deg, #0f766e, #0d9488);
  border-radius: 1rem 1rem 0.25rem 1rem;
}

/* 印刷用スタイル */
@media print {
  body {
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 10pt;
  }
  .no-print,
  header,
  footer,
  #knowledgeModal,
  #apiKeyModal,
  #manualModal,
  .chat-panel,
  .step-navigation-footer,
  button {
    display: none !important;
  }
  .print-only {
    display: block !important;
  }
  .step-section {
    display: block !important;
    page-break-inside: avoid;
    margin-bottom: 20px;
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #0f172a !important;
    padding: 12px !important;
  }
  .pyramid-block {
    color: #000000 !important;
    border: 1px solid #94a3b8;
    background: #f1f5f9 !important;
  }
}
.print-only {
  display: none;
}

/* ボトルネック推奨プランバッジ */
.badge-recommend {
  background: linear-gradient(135deg, #0f766e, #0d9488);
  border: 1px solid #2dd4bf;
  box-shadow: 0 0 10px rgba(45, 212, 191, 0.4);
  animation: pulse-glow 2.5s infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 8px rgba(45, 212, 191, 0.35);
  }
  50% {
    box-shadow: 0 0 18px rgba(45, 212, 191, 0.7);
  }
}

/* トグルスイッチスタイル */
.toggle-checkbox:checked {
  right: 0;
  border-color: #14b8a6;
}
.toggle-checkbox:checked + .toggle-label {
  background-color: #0d9488;
}

/* スピナーアニメーション */
.animate-spin-fast {
  animation: spin 0.75s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   マニュアルモーダル Markdown スタイル強化 (Table, Blockquote, Pre, Headers)
   ========================================================================== */
#manualModalBody table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.75rem;
}
#manualModalBody th, #manualModalBody td {
  border: 1px solid #334155;
  padding: 0.5rem 0.75rem;
  text-align: left;
}
#manualModalBody th {
  background-color: #1e293b;
  color: #2dd4bf;
  font-weight: 700;
}
#manualModalBody tr:nth-child(even) {
  background-color: rgba(15, 23, 42, 0.5);
}
#manualModalBody blockquote {
  border-left: 4px solid #0d9488;
  padding: 0.5rem 1rem;
  margin: 1rem 0;
  background: rgba(13, 148, 136, 0.1);
  border-radius: 0 0.5rem 0.5rem 0;
  color: #ccfbf1;
}
#manualModalBody pre {
  background: #090d16;
  border: 1px solid #1e293b;
  border-radius: 0.5rem;
  padding: 0.75rem;
  overflow-x: auto;
  font-family: monospace;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #e2e8f0;
  margin: 0.75rem 0;
}
#manualModalBody code {
  background: #1e293b;
  color: #2dd4bf;
  padding: 0.15rem 0.35rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-family: monospace;
}
#manualModalBody pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}
#manualModalBody h1 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  margin-top: 1rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #334155;
}
#manualModalBody h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2dd4bf;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid #1e293b;
}
#manualModalBody h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #5eead4;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}
#manualModalBody h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: #99f6e4;
  margin-top: 1rem;
  margin-bottom: 0.35rem;
}
#manualModalBody ul {
  list-style-type: disc;
  padding-left: 1.25rem;
  margin: 0.5rem 0;
}
#manualModalBody ol {
  list-style-type: decimal;
  padding-left: 1.25rem;
  margin: 0.5rem 0;
}
#manualModalBody li {
  margin-bottom: 0.25rem;
}
#manualModalBody a {
  color: #2dd4bf;
  text-decoration: underline;
}
#manualModalBody hr {
  border: 0;
  border-top: 1px solid #334155;
  margin: 1.5rem 0;
}

#manualModalBody blockquote.alert-box {
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
}
#manualModalBody blockquote.alert-note {
  border-left: 4px solid #06b6d4;
  background: rgba(6, 182, 212, 0.12);
  color: #cffafe;
}
#manualModalBody blockquote.alert-note .alert-title {
  color: #38bdf8;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
#manualModalBody blockquote.alert-important {
  border-left: 4px solid #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  color: #fef3c7;
}
#manualModalBody blockquote.alert-important .alert-title {
  color: #fbbf24;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
#manualModalBody blockquote.alert-tip {
  border-left: 4px solid #10b981;
  background: rgba(16, 185, 129, 0.12);
  color: #d1fae5;
}
#manualModalBody blockquote.alert-tip .alert-title {
  color: #34d399;
  font-weight: 700;
  margin-bottom: 0.35rem;
}


