/* 記事説明ボックスの色分け（アクティブ時のみカラー） */
.tab-content {
  background-color: #f5f5f5;
}
.tab-content#news.active {
  background-color: #e3f0ff;
}
.tab-content#popular.active {
  background-color: #fde3ef;
}
.tab-content#category.active {
  background-color: #e6f7ea;
}
.tab-button[data-id="news"] {
  color: #fff;
  background-color: #afafaf;
}

.tab-button[data-id="popular"] {
  color: #fff;
  background-color: #afafaf;
}

.tab-button[data-id="category"] {
  color: #fff;
  background-color: #afafaf;
}

/* アクティブ時は色を少し濃く */
.tab-button.active[data-id="news"] {
  background-color: #0056b3;
}
.tab-button.active[data-id="popular"] {
  background-color: #c2185b;
}
.tab-button.active[data-id="category"] {
  background-color: #1e7e34;
}


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

body {
  padding: 1rem;
}

h1 {
  text-align: center;
  margin-bottom: 1rem;
}

.tab-container {
  max-width: 600px;
  margin: auto;
}

.tab-buttons {
  list-style: none;
  padding: 0;
  display: flex;
  border-bottom: 2px solid #ddd;
}

.tab-button {
  padding: 0.5rem 1rem;
  margin-right: 0.25rem;
  cursor: pointer;
  border-top-right-radius: 0.5rem;
  border-top-left-radius: 0.5rem;
  background-color: #f0f0f0;
  position: relative;
  z-index: 2;
  border: 2px solid transparent;
  border-bottom: none;
}

.tab-button.active {
  background-color: #fff;
  border: 2px solid #ddd;
  border-bottom: none;
  margin-bottom: -2px;
}

.tab-content {
  display: none;
  padding: 1rem;
  border: 2px solid #ddd;
  border-top: none;
  min-height: 200px;
  border-bottom-right-radius: 0.5rem;
  border-bottom-left-radius: 0.5rem;
  position: relative;
  z-index: 1;
}

.tab-content.active {
  display: block;
}

footer {
  text-align: center;
  margin-top: 2rem;
  padding: 1rem 0;
}
