/* 全体・基本設定 */
body {
  margin: 0;
  background: #05040A;
  color: white;
  font-family: sans-serif;
}

.layout {
  display: flex;
  height: 100vh;
}

/* サイドバー */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 100vh;
  background: #0D0A21;
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

/* メニュー全体 */
.menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}

/* 各ボタン */
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 10px 14px;
  border-radius: 12px;

  text-decoration: none;
  color: white;

  transition: 0.2s ease;
}

/* 画像サイズ */
.menu-item img {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 6px;
}

/* ホバー時 */
.menu-item:hover {
  background-color: #5752EC;
}

/* サイドバーロゴ全体 */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  /* 下線消す */
}

/* ロゴ画像サイズ */
.logo img {
  width: 45px;
  /* ←ここで大きさ調整 */
  height: 45px;
}

/* LUNABASE文字 */
.logo span {
  font-size: 20px;
  font-weight: bold;

  /* シルバーグラデーション */
  background: linear-gradient(135deg,
      #f5f5f5 0%,
      #d6d6d6 30%,
      #a8b0b8 50%,
      #eaeaea 70%,
      #c2c8cf 100%);

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  background-clip: text;
  color: transparent;
}

.menu-btn {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: #ccc;
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.menu-btn.active {
  color: white;
  background: #222;
}

/* メインエリア */
.main {
  flex: 1;
  margin-left: 240px;
  padding: 20px;
  overflow-y: auto;
  background-color: #05040A;
}

/* フィルター */
#filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  align-items: center;
  padding-left: 20px;
}

.filter-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  border: none;
  background-color: #111;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.15s ease-in-out;
}

.filter-btn img {
  width: 40px;
  height: 40px;
  display: block;
}

.filter-btn.active {
  background-color: #333;
}

.filter-btn.active img {
  outline: 2px solid #fff;
  border-radius: 5px;
  transform: scale(1.15);
}

/* 武器カードグリッド */
.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0px;
  /* 横間隔 */
  justify-content: flex-start;
  padding-left: 10px;
  padding-right: 10px;
  align-items: stretch;
}

/* 武器カード */
.character-card {
  width: 120px;
  display: flex;
  flex-direction: column;
  /* 上下に積む */
  flex-shrink: 0;
  margin: 10px;
  /* カード間の余白 */
  text-decoration: none;
  color: white;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.15s ease-in-out;
  background-color: #0D0D0D;
  /* デフォルト背景 */

  text-align: center;
  position: relative;
  text-decoration: none;
  color: white;
  display: flex;
  flex-direction: column;
}

/* レアリティ別背景 */
.character-card[data-rarity="5"] {
  background-color: #9E642E;
}

.character-card[data-rarity="4"] {
  background-color: #8068A3;
}

.character-card[data-rarity="3"] {
  background-color: #4A8EA5;
}

.character-card[data-rarity="2"] {
  background-color: #598661;
}

/* 画像部分 */
.character-img-wrapper {
  /* 高さは JS で揃える */
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

/* 画像 */
.character-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

/* 名前部分 */
.character-name {
  text-align: center;
  background: white;
  color: black;
  width: 100%;
  box-sizing: border-box;
  padding: 6px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  /* 長い名前の折り返し対応 */
  height: auto;
  /* JS で上書きしない */
}

.filter-btn.rarity {
  color: #FFD700;
  font-size: 16px;
  padding: 6px 10px;
}