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;
}

.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;
}

.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;
  color: #FFD700;
}

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

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

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

.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  justify-content: flex-start;
  padding-left: 10px;
  padding-right: 10px;
}

.weapon-card {
  width: 120px;
  flex-shrink: 0;
  margin: 10px;
  text-align: center;
  text-decoration: none;
  color: white;
  border-radius: 8px;
  overflow: hidden;
}

.weapon-img-wrapper {
  position: relative;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

.weapon-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  padding-top: 20px;   /* ここで下げる量を調整 */
}

.weapon-path-icon {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 30px;
  height: 30px;
}

.weapon-name {
  text-align: center;
  padding: 8px 4px;
  font-size: 14px;
  background: white;
  color: black;
}

.weapon-card[data-rarity="5"] { background: #9E642E; }
.weapon-card[data-rarity="4"] { background: #8068A3; }
.weapon-card[data-rarity="3"] { background: #4A8EA5; }

.weapon-img-wrapper {
  position: relative;
}

.weapon-path-icon {
  position: absolute;
  top: 6px;
  left: 6px;   /* 右上じゃなく左上 */
  width: 30px;
  height: 30px;
}

