/* 基調カラー: #A5D6FF (パステルブルー) */
:root {
  --primary: #A5D6FF;
  --secondary: #FFB7B2; /* アクセントのパステルピンク */
  --bg-color: #F8FBFE;
  --text-main: #4A4A4A;
  --white: #FFFFFF;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'M PLUS Rounded 1c', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  padding-bottom: 150px; /* ナビゲーションの高さ分スペース確保 */
}

/* ヘッダー */
header {
  background-color: var(--primary);
  color: white;
  padding: 20px 15px;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  box-shadow: 0 4px 10px rgba(165, 214, 255, 0.4);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
}

h1 {
  font-size: 1.5rem;
  letter-spacing: 1px;
}

/* インストールボタン */
#install-btn {
  background-color: var(--secondary);
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 20px;
  font-weight: bold;
  font-family: 'M PLUS Rounded 1c', sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(255, 183, 178, 0.5);
  transition: transform 0.2s;
  animation: bounce 2s infinite;
}

#install-btn.hidden {
  display: none;
}

#install-btn:active {
  transform: scale(0.95);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
  40% {transform: translateY(-5px);}
  60% {transform: translateY(-3px);}
}

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

.page-section {
  animation: fadeIn 0.4s ease-out;
}

.page-section.hidden {
  display: none;
}

h2 {
  font-size: 1.6rem;
  color: #3AA1FF; /* 少し濃い青で見やすく */
  margin-bottom: 15px;
  text-align: center;
}

/* カードのデザイン */
.card {
  background-color: var(--white);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 8px 20px rgba(165, 214, 255, 0.2);
  margin-bottom: 25px;
}

.card img {
  width: 100%;
  max-width: 300px;
  height: auto;
  display: block;
  margin: 0 auto 15px;
  border-radius: 15px;
}

.card p {
  line-height: 1.6;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.card ul, .card ol {
  margin-left: 20px;
  margin-bottom: 15px;
  line-height: 1.8;
}

.card li { margin-bottom: 8px; }

/* 吹き出し風デザイン */
.bubble {
  background-color: #FFF2CC; /* パステルイエロー */
  padding: 12px 15px;
  border-radius: 15px;
  font-weight: bold;
  color: #B58B00;
  display: inline-block;
  margin-top: 10px;
}

/* ボトムナビゲーション (PWAアプリっぽさ) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--white);
  background: white;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  display: flex;
  justify-content: flex-start;
  overflow-x: auto;
  padding: 10px 15px;
  z-index: 1000;
  gap: 20px;
}
/* スクロールバー非表示（Chrome, Safari） */
.bottom-nav::-webkit-scrollbar {
  display: none;
}
.bottom-nav {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}
.nav-btn {
  background: none;
  border: none;
  font-family: 'Zen Maru Gothic', 'Nunito', sans-serif;
  color: #888;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.nav-btn .icon {
  font-size: 1.5rem;
  margin-bottom: 5px;
  transition: transform 0.3s;
}

.nav-btn.active {
  color: #3AA1FF;
  font-weight: bold;
}

.nav-btn.active .icon {
  transform: scale(1.2);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* アコーディオンと機能一覧のスタイル */
.category-title {
  color: #3AA1FF;
  font-size: 1.2rem;
  margin: 25px 0 10px;
  padding-left: 10px;
  border-left: 5px solid var(--secondary);
}

.accordion {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

details {
  background-color: var(--white);
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(165, 214, 255, 0.2);
  overflow: hidden;
  transition: all 0.3s ease;
}

details[open] {
  box-shadow: 0 6px 15px rgba(165, 214, 255, 0.4);
}

summary {
  padding: 15px 20px;
  font-weight: bold;
  color: var(--text-main);
  cursor: pointer;
  list-style: none; /* デフォルトの矢印を消す */
  position: relative;
  user-select: none;
  background-color: #fDfeff;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '▼';
  position: absolute;
  right: 20px;
  color: var(--primary);
  font-size: 0.9rem;
  transition: transform 0.3s;
}

details[open] summary::after {
  transform: rotate(180deg);
}

.details-content {
  padding: 0 20px 20px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #555;
  border-top: 1px dashed var(--primary);
  margin-top: 5px;
  padding-top: 15px;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* モード切り替えビュー */
.view-container.hidden {
  display: none !important;
}

/* ホーム画面のカード */
.mode-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.mode-card {
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-align: center;
  border: 3px solid transparent;
  background-color: var(--white);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 4px 10px rgba(165, 214, 255, 0.4);
}
.mode-card img {
  width: 100%;
  max-width: 250px;
  height: auto;
  border-radius: 10px;
  margin-bottom: 15px;
}
.mode-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}
.mode-card.cpanel {
  border-color: var(--primary);
}
.mode-card.whm {
  border-color: #B5EAD7; 
}
.mode-card h3 {
  font-size: 1.4rem;
  margin-bottom: 5px;
}
.mode-card p {
  color: #666;
  font-size: 0.9rem;
}
.mode-card.cpanel h3 {
  color: var(--primary);
}
.mode-card.whm h3 {
  color: #2F9E44; 
}

/* ヘッダーの戻るボタン */
.home-btn {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  border: none;
  border-radius: 20px;
  padding: 5px 10px;
  font-family: inherit;
  font-weight: bold;
  color: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  font-size: 0.9rem;
  z-index: 101;
}
.home-btn:hover {
  background: #f0f8ff;
}
.home-btn.hidden {
  display: none !important;
}

/* WHMテーマカラー */
.whm-theme h1, .whm-theme h2 {
  color: #2F9E44; 
}
.whm-theme h3 {
  color: #40C057; 
}
.whm-theme .category-title {
  border-left-color: #40C057;
  color: #40C057;
}
.whm-theme .nav-btn.active {
  color: #40C057;
}
.whm-theme .bottom-nav {
  box-shadow: 0 -4px 10px rgba(181, 234, 215, 0.4);
}
.whm-theme summary::after {
  color: #40C057;
}
.whm-theme .bubble {
  background-color: #e8f5e9;
  border-color: #B5EAD7;
  color: #2F9E44;
}

/* --- 文字サイズ変更機能 --- */
.font-size-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid white;
  border-radius: 8px;
  color: white;
  padding: 6px 12px;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
  font-family: 'M PLUS Rounded 1c', sans-serif;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.font-size-btn:hover {
  background: rgba(255, 255, 255, 0.4);
}
.font-size-btn:active {
  transform: scale(0.95);
}

/* htmlタグに対するベースフォントサイズ */
html.font-small { font-size: 13px; }
html.font-medium { font-size: 16px; }
html.font-large { font-size: 19px; }

/* --- ダークモード --- */
html[data-theme="dark"] {
  --primary: #1F2937;
  --secondary: #E74C3C;
  --bg-color: #121212;
  --text-main: #E0E0E0;
  --white: #1E1E1E;
}

/* ダークモード時の全体調整 */
html[data-theme="dark"] .bottom-nav {
  box-shadow: 0 -2px 10px rgba(0,0,0,0.5);
}
html[data-theme="dark"] .card {
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
html[data-theme="dark"] details {
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
html[data-theme="dark"] summary {
  background-color: #2A2A2A;
}
html[data-theme="dark"] .details-content {
  color: #B0B0B0;
  border-top-color: #4A4A4A;
}
html[data-theme="dark"] .mode-card:hover {
  box-shadow: 0 8px 15px rgba(0,0,0,0.5);
}
html[data-theme="dark"] .home-btn {
  background-color: #2A2A2A;
  color: #E0E0E0;
}
html[data-theme="dark"] .home-btn:hover {
  background-color: #3A3A3A;
}

/* cPanelテーマ ダーク時 */
html[data-theme="dark"] h2 {
  color: #64B5F6;
}
html[data-theme="dark"] .category-title {
  color: #64B5F6;
  border-left-color: #64B5F6;
}
html[data-theme="dark"] .bubble {
  background-color: #332B13;
  color: #FFDE7A;
}
html[data-theme="dark"] .nav-btn.active {
  color: #64B5F6;
}

/* WHMテーマ ダーク時 */
html[data-theme="dark"] .whm-theme h1, 
html[data-theme="dark"] .whm-theme h2, 
html[data-theme="dark"] .whm-theme h3 {
  color: #81C784;
}
html[data-theme="dark"] .whm-theme .category-title {
  border-left-color: #81C784;
  color: #81C784;
}
html[data-theme="dark"] .whm-theme .nav-btn.active {
  color: #81C784;
}
html[data-theme="dark"] .whm-theme summary::after {
  color: #81C784;
}
html[data-theme="dark"] .whm-theme .bubble {
  background-color: #1A3320;
  border-color: #81C784;
  color: #A5D6A7;
}



/* --- 専門家向け（エキスパートモード） --- */
.expert-toggle-btn {
  background-color: transparent;
  color: #888;
  border: 1px solid #ccc;
  padding: 8px 15px;
  border-radius: 5px;
  font-size: 0.85rem;
  font-weight: bold;
  cursor: pointer;
  margin-top: 50px;
  margin-bottom: 20px;
  display: block;
  width: 100%;
  text-align: center;
  transition: all 0.2s;
  font-family: "M PLUS Rounded 1c", sans-serif;
}
.expert-toggle-btn:hover {
  background-color: #f0f0f0;
  color: #333;
}
html[data-theme="dark"] .expert-toggle-btn {
  border-color: #555;
  color: #bbb;
}
html[data-theme="dark"] .expert-toggle-btn:hover {
  background-color: #333;
  color: #fff;
}

.expert-panel {
  margin-top: 15px;
  margin-bottom: 40px;
  background-color: #0c0c0c;
  color: #00ff00;
  border-radius: 8px;
  overflow: hidden;
  font-family: Consolas, "Courier New", monospace;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  animation: slideDown 0.3s ease-out;
  border: 1px solid #333;
}
.expert-panel.hidden {
  display: none;
}
.expert-header {
  background-color: #222;
  color: #fff;
  padding: 8px 15px;
  font-size: 0.85rem;
  border-bottom: 1px solid #444;
  display: flex;
  align-items: center;
  gap: 10px;
}
.expert-header::before {
  content: "▶";
  color: #00ff00;
  font-size: 0.7rem;
}
.expert-content {
  padding: 15px;
  font-size: 0.9rem;
  line-height: 1.7;
}
.expert-content code {
  background-color: #222;
  color: #ff9d00;
  padding: 2px 5px;
  border-radius: 4px;
}
