* {
  box-sizing: border-box;
}

/* ===== 上部レイアウト ===== */

.weapon-top {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  flex-wrap: wrap; 
}

.weapon-image {
  flex: 0 0 900px;     /* 基本は900px確保 */
  max-width: 100%;     /* 画面が狭ければ縮む */
  display: flex;
  justify-content: center;
}

.weapon-info {
  flex: 0 0 680px;
}

.weapon-image img {
  max-height: 500px;   /* ← 縦サイズ（あとで変更可） */
  max-width: 800px;    /* ← 横の上限 */
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
}

.weapon-name {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 20px;
}

/* ===== スライダー ===== */

.range-group {
  margin-bottom: 15px;
}

.range-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
}

.range-group input[type="range"] {
  width: 100%;
}

/* ===== ステータス ===== */

.weapon-stats {
  margin-top: 20px;
  width: 100%;

  background: #0D0D0D;
  border: 1px solid #ffffff84;
  border-radius: 12px;
  padding: 15px 20px;
}


.stat-row {
  display: flex;
  justify-content: space-between;  /* ← 左右に分離 */
  align-items: center;
  padding: 6px 0;
  font-size: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.stat-name {
  text-align: left;
}

.stat-value {
  text-align: right;
  font-weight: bold;
}

.weapon-stats p {
  margin: 6px 0;
}

/* ===== 武器効果 ===== */

.section-title {
  margin-top: 50px;
  font-size: 22px;
  font-weight: bold;
}

.passive-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

.passive-name {
  font-size: 18px;
  font-weight: bold;
  color: #FFD780;
}

.passive-description {
  margin-top: 15px;
  line-height: 1.6;
  white-space: normal;
}

/* ===== 武器効果枠 ===== */

.passive-box {
  background: #0D0D0D;
  border: 1px solid #ffffff84;
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
}

/* 武器詳細の素材パネル */
.weapon-materials {
  width: 100%;                    /* <- 48%だと狭いので武器ページは100% */
  background: #0D0D0D;
  border: 1px solid #3D3D3C;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
  box-sizing: border-box;
}

.weapon-materials .material-title {
  font-weight: 700;
  margin-bottom: 12px;
  text-align: left;
}

.weapon-materials .material-row {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.weapon-materials .material-item {
  text-align: center;
}

.weapon-materials .material-item img {
  width: 60px;
  height: 60px;
  border-radius: 12px;            /* <- 角丸 */
  border: 2px solid transparent;  /* <- rank色を効かせる */
  background: #2a2a2a;
  padding: 5px;
}

.weapon-materials .material-count {
  margin-top: 4px;
  font-size: 14px;
}

.weapon-materials .material-cost {
  margin-top: 8px;
  font-size: 14px;
  color: #bbb;
}

/* rank(レア度)枠色 */
.weapon-materials .material-item.rarity-1 img { border-color: #888888; }
.weapon-materials .material-item.rarity-2 img { border-color: #0F5329; }
.weapon-materials .material-item.rarity-3 img { border-color: #1B396C; }
.weapon-materials .material-item.rarity-4 img { border-color: #452465; }
.weapon-materials .material-item.rarity-5 img { border-color: #612F0C; }

.lv-highlight {
  color: #99ffffff;
}
