/* =============================================
   全体設定
   ============================================= */
body {
  background-color: #f5f7f9; /* 目に優しい、落ち着いた背景色 */
  margin: 0;
}

.excel-dict {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  max-width: 1140px;
  margin: 60px auto;
  padding: 0 20px;
  color: #2c3e50;
}

/* =============================================
   検索セクション（シンプル・高視認性）
   ============================================= */
.excel-dict-search {
  display: flex;
  justify-content: center;
  margin-bottom: 80px; /* リストとの距離を離して主役感を出す */
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.excel-dict-search input,
.excel-dict-search select {
  border: 2px solid #e0e0e0; /* 少し太めの線で清潔感を出す */
  padding: 16px 20px;
  font-size: 16px;
  background: #fff;
  outline: none;
  height: 60px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.excel-dict-search input {
  border-radius: 12px 0 0 12px;
  flex: 2;
}

.excel-dict-search select {
  border-left: none;
  flex: 1;
  cursor: pointer;
  color: #666;
}

.excel-dict-search button {
  border-radius: 0 12px 12px 0;
  background-color: #107C10; /* Excelブランドカラー */
  color: #fff;
  border: none;
  padding: 0 35px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
}

.excel-dict-search button:hover {
  background-color: #0d620d;
}

/* =============================================
   カードレイアウト（グリッド）
   ============================================= */
.excel-dict-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 30px;
}

.excel-card {
  background: #fff;
  border-radius: 16px; /* 角を少し丸めることでモダンな印象に */
  padding: 35px;
  display: flex;
  flex-direction: column;
  border: 1px solid #eef2f6;
  border-left: 8px solid #ccc; /* カテゴリ別のアクセントライン */
  box-shadow: 0 4px 6px rgba(0,0,0,0.02); /* ほぼ見えない程度の軽い影 */
}

/* カテゴリ別アクセント（色の彩度を少し抑えて高級感を出す） */
.excel-card[class*="数学"] { border-left-color: #107C10; --tag-bg: #eaf5ea; --tag-color: #107C10; }
.excel-card[class*="論理"] { border-left-color: #0078d4; --tag-bg: #eef6fc; --tag-color: #0078d4; }
.excel-card[class*="文字列"] { border-left-color: #d83b01; --tag-bg: #fff0eb; --tag-color: #d83b01; }
.excel-card[class*="日付"] { border-left-color: #8764b8; --tag-bg: #f5f0fb; --tag-color: #8764b8; }
.excel-card[class*="検索"] { border-left-color: #ffb900; --tag-bg: #fff9e6; --tag-color: #946c00; }

/* カテゴリタグ（小さく、しかし読みやすく） */
.category-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 15px;
  background-color: var(--tag-bg, #f0f0f0);
  color: var(--tag-color, #666);
  letter-spacing: 0.05em;
}

/* 関数名（視線の終着点） */
.excel-card h3 {
  margin: 0 0 12px 0;
  font-size: 26px; /* 大きくして存在感を出す */
  color: #1a1a1a;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* 説明文（読みやすさ重視） */
.excel-card p {
  font-size: 15px;
  color: #5a6772;
  line-height: 1.8;
  margin-bottom: 30px;
  flex-grow: 1;
}

/* フッター */
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid #f1f4f8;
}

.difficulty {
  color: #a0aec0;
  font-size: 12px;
  font-weight: 600;
}

/* リンク（「次へ」を促すデザイン） */
.excel-card a {
  text-decoration: none;
  color: #107C10;
  font-weight: 700;
  font-size: 14px;
  padding: 5px 0;
  border-bottom: 2px solid rgba(16, 124, 16, 0.3);
  transition: border-color 0.2s;
}

.excel-card a:hover {
  border-bottom-color: rgba(16, 124, 16, 1);
}

/* モバイル最適化 */
@media screen and (max-width: 600px) {
  .excel-dict-search {
    flex-direction: column;
    gap: 10px;
  }
  .excel-dict-search input,
  .excel-dict-search select,
  .excel-dict-search button {
    border-radius: 10px;
    border-left: 2px solid #e0e0e0;
    width: 100%;
  }
}