/* 全体のスタイル */
:root {
  --primary-color: #4a2882;
  --secondary-color: #f5a623;
  --background-color: #f9f7ff;
  --text-color: #333;
  --heading-color: #2c1654;
  --link-color: #6b3fa0;
  --border-color: #d0c0e7;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --font-main: 'Noto Sans JP', sans-serif;
  --font-heading: 'Noto Serif JP', serif;
}

body {
  font-family: var(--font-main);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  margin: 0;
  padding: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ヘッダー */
header {
  background-color: var(--primary-color);
  color: white;
  padding: 20px 0;
  box-shadow: var(--box-shadow);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin: 0;
}

.site-description {
  font-size: 1rem;
  margin: 5px 0 0;
  opacity: 0.9;
}

/* ナビゲーション */
nav {
  background-color: #fff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--box-shadow);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-links {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.nav-links li {
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: block;
  padding: 15px 20px;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--primary-color);
  background-color: rgba(74, 40, 130, 0.05);
}

/* メインコンテンツ */
main {
  padding: 40px 0;
}

.content {
  background-color: white;
  border-radius: 8px;
  box-shadow: var(--box-shadow);
  padding: 30px;
  margin-bottom: 30px;
}

/* 見出し */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--heading-color);
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.3;
}

h1 {
  font-size: 2.5rem;
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 10px;
  margin-top: 0;
}

h2 {
  font-size: 2rem;
  border-left: 5px solid var(--secondary-color);
  padding-left: 15px;
}

h3 {
  font-size: 1.5rem;
  position: relative;
  padding-left: 20px;
}

h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background-color: var(--secondary-color);
  border-radius: 50%;
}

h4 {
  font-size: 1.25rem;
  color: var(--primary-color);
}

/* リンク */
a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  text-decoration: underline;
}

/* リスト */
ul, ol {
  padding-left: 1.5em;
  margin-bottom: 1.5em;
}

li {
  margin-bottom: 0.5em;
}

/* 強調 */
strong {
  color: var(--primary-color);
  font-weight: 700;
}

/* 目次 */
.toc {
  background-color: rgba(74, 40, 130, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  margin: 30px 0;
}

.toc-title {
  font-size: 1.2rem;
  margin-top: 0;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.toc ul {
  margin-bottom: 0;
}

/* フッター */
footer {
  background-color: var(--primary-color);
  color: white;
  padding: 30px 0;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-links {
  list-style: none;
  display: flex;
  margin: 20px 0;
  padding: 0;
}

.footer-links li {
  margin: 0 15px;
}

.footer-links a {
  color: white;
  text-decoration: none;
}

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

.copyright {
  margin-top: 20px;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    text-align: center;
  }
  
  .nav-container {
    flex-direction: column;
  }
  
  .nav-links {
    flex-direction: column;
    width: 100%;
  }
  
  .nav-links a {
    text-align: center;
    padding: 10px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.5rem;
  }
}

/* 九星気学特有のスタイル */
.star-box {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  background-color: white;
  box-shadow: var(--box-shadow);
}

.star-title {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 5px;
}

.star-content {
  margin: 0;
}

/* 九星別の色 */
.star-1 { border-left: 5px solid #0066cc; } /* 一白水星 - 青 */
.star-2 { border-left: 5px solid #000000; } /* 二黒土星 - 黒 */
.star-3 { border-left: 5px solid #006600; } /* 三碧木星 - 緑 */
.star-4 { border-left: 5px solid #009900; } /* 四緑木星 - 緑 */
.star-5 { border-left: 5px solid #ffcc00; } /* 五黄土星 - 黄 */
.star-6 { border-left: 5px solid #cccccc; } /* 六白金星 - 白/銀 */
.star-7 { border-left: 5px solid #ff0000; } /* 七赤金星 - 赤 */
.star-8 { border-left: 5px solid #ffffff; border: 1px solid #cccccc; } /* 八白土星 - 白 */
.star-9 { border-left: 5px solid #ff6600; } /* 九紫火星 - オレンジ/赤 */

/* ボタン */
.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 10px 20px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #3a1f68;
  text-decoration: none;
}

.btn-secondary {
  background-color: var(--secondary-color);
}

.btn-secondary:hover {
  background-color: #e09612;
}

/* カード */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.card {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: 20px;
}

.card-title {
  font-size: 1.2rem;
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--heading-color);
}

.card-text {
  margin-bottom: 15px;
}

/* テーブル */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

th, td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background-color: rgba(74, 40, 130, 0.05);
  font-weight: 600;
  color: var(--primary-color);
}

tr:hover {
  background-color: rgba(74, 40, 130, 0.02);
}

/* 引用 */
blockquote {
  border-left: 3px solid var(--secondary-color);
  padding: 10px 20px;
  margin: 20px 0;
  background-color: rgba(245, 166, 35, 0.05);
  font-style: italic;
}

/* コード */
code {
  font-family: monospace;
  background-color: #f5f5f5;
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 0.9em;
}

pre {
  background-color: #f5f5f5;
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  margin: 20px 0;
}

pre code {
  background-color: transparent;
  padding: 0;
}

/* ユーティリティクラス */
.text-center {
  text-align: center;
}

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 10px; }
.mb-1 { margin-bottom: 10px; }
.mt-2 { margin-top: 20px; }
.mb-2 { margin-bottom: 20px; }
.mt-3 { margin-top: 30px; }
.mb-3 { margin-bottom: 30px; }
.mt-4 { margin-top: 40px; }
.mb-4 { margin-bottom: 40px; }
.mt-5 { margin-top: 50px; }
.mb-5 { margin-bottom: 50px; }

.pt-0 { padding-top: 0; }
.pb-0 { padding-bottom: 0; }
.pt-1 { padding-top: 10px; }
.pb-1 { padding-bottom: 10px; }
.pt-2 { padding-top: 20px; }
.pb-2 { padding-bottom: 20px; }
.pt-3 { padding-top: 30px; }
.pb-3 { padding-bottom: 30px; }
.pt-4 { padding-top: 40px; }
.pb-4 { padding-bottom: 40px; }
.pt-5 { padding-top: 50px; }
.pb-5 { padding-bottom: 50px; }
