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

/*レイアウト全体 */
.layout {
  display: flex;
  min-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;
  box-sizing: border-box;
  background-color: #070610;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ==============================
   キャラトップ（画像＋右カラム）
============================== */
.char-top {
  display: flex;
  flex-direction: row;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap; /* 横幅が足りない場合は折り返す */
}

.char-left {
  flex: 0 0 60%; /* 左カラムは最大60% */
  max-width: 800px;
}

.char-left img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: contain;
  display: block;
}

.char-right {
  flex: 1; /* 残りの幅を右カラムに */
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* レベルスライダー */
label[for="level-range"] {
  font-weight: bold;
}

#level-display {
  margin-left: 5px;
  font-weight: bold;
}

#level-range {
  width: 100%;
}

/* ステータスリスト */
#stat-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 20px;
  line-height: 1.4;
  border-bottom: 1px solid #ccc;
  padding: 5px 0;
}

.stat-row span.label {
  font-weight: bold;
}

.stat-row span.value {
  text-align: right;
}

#char-name {
  font-size: 48px;
  font-weight: bold;
  margin: 0;
}

.stat-wrapper {
  background-color: #0D0D0D;                  /* 背景色 */
  border: 2px solid rgba(255, 255, 255, 0.2); /* 枠線 */
  border-radius: 12px;                         /* 角丸 */
  padding: 12px;
  margin-bottom: 20px;
}

/* ==============================
   天賦ゾーン
============================== */
.section-title {
  font-size: 22px;
  margin: 40px 0 20px;
  padding-bottom: 40px;
}

.skill-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.skill-card {
  flex: 1;
  background-color: #0D0D0D;
  border-radius: 10px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.2);
}

.skill-name {
  font-size: 22px;
  margin: 0;
  line-height: 1.2;
}


/* EPのアイコン */
.skill-point-icon {
  width: 35px;   /* 好きなサイズに */
  height: 35px;  /* 正方形にするなら揃える */
}

.skill-header {
  display: flex;
  align-items: flex-start;   /* 上揃え */
  gap: 12px;
}

.skill-header > img {
  width: 70px;
  height: 70px;
}

.skill-meta {
  font-size: 18px;
  color: #F29E37;
  margin-top: 6px;
    display: flex;          /* ← 追加 */
  align-items: center;    /* ← 追加 */
  gap: 6px;               
}

.skill-description {
  margin-top: 14px;
  line-height: 1.6;
}

.skill-level {
  margin-top: 16px;
}

.skill-level input {
  width: 100%;
}

/*２つ以上なら間を空ける*/
.skill-block {
  margin-bottom: 40px;  /* ← 好きな数字でOK */
}

/*追加説明欄のデザイン*/
.extra-wrapper {
  margin-top: 16px;        /* 1行分あける */
  padding-left: 2em;       /* 2文字分インデント */
  position: relative;
}

.extra-wrapper::before {
  content: "";
  position: absolute;
  left: 0.9em;           /* ← 余白の中央あたりに置く */
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: #6366F1;
  border-radius: 2px;
}

.skill-extra {
  margin-top: 8px;
  padding-left: 10px;
  border-left: 2px solid #555;
  font-size: 13px;
}

.extra-name {
  font-weight: bold;
  margin-bottom: 4px;
}

.extra-desc {
  margin-bottom: 8px;
}

/*追加ステ*/
.sub-attr-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

@media screen and (max-width: 1024px) {
  .sub-attr-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media screen and (max-width: 768px) {
  .sub-attr-grid {
    grid-template-columns: 1fr;
  }
}

/*星魂*/
.eidolon-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}


/* ==============================
   レスポンシブ
============================== */
@media screen and (max-width: 1024px) {
  .char-left {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .char-right {
    flex: 0 0 100%;
  }

  #elemental-burst {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@media screen and (max-width: 768px) {
  .sidebar {
    width: 60px;
    padding: 8px;
  }

  #char-name {
    font-size: 36px;
  }
}

/* =========================
   Materials Section
========================= */

.materials-wrapper {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin: 40px 0;
}

.material-column {
  width: 48%;
}

.material-title {
  font-weight: bold;
  margin-bottom: 10px;
  text-align: left;
}

.material-row {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

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

.material-item img {
  width: 50px;   /* ← サイズここで調整 */
  height: 50px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.612);
  background: #2a2a2a;
  padding: 5px;
}

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

.material-column {
  width: 48%;
  background: #0D0D0D;              /* 背景 */
  border: 1px solid #3D3D3C;          /* 白枠 */
  border-radius: 18px;              /* 角丸 */
  padding: 20px;                    /* 内側余白 */
  box-shadow: 0 6px 18px rgba(0,0,0,0.4); /* ちょい立体 */
}

.talent-book-info {
  align-self: center;
  margin-left: 20px;
  font-weight: 700;  
  font-size: 20px;
  white-space: nowrap;
}

.material-calculator {
  margin-top: 60px;
}

.mc-wrapper {
  display: flex;
  gap: 40px;
  background: #0D0D0D;              /* 背景 */
  border: 1px solid #3D3D3C;          /* 白枠 */
  border-radius: 18px;              /* 角丸 */
  padding: 20px;                    /* 内側余白 */
  box-shadow: 0 6px 18px rgba(0,0,0,0.4); /* ちょい立体 */
}

.mc-left {
  width: 45%;
  min-width: 500px;  /*超重要*/
}

.mc-right {
  width: 65%;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.mc-block {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.mc-block h3 {
  margin-bottom: 8px;
}

#mc-result {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.mc-item {
  width: 80px;
  text-align: center;
}

.mc-item img {
  width: 64px;
  height: 64px;
  border: 2px solid;
  background: #2a2a2a;
  border-radius: 12px;

}

/* レアリティ別に img の枠の色を変える */
.mc-item.rarity-1 img { border-color: #888888; } /* 灰色 */
.mc-item.rarity-2 img { border-color: #0F5329; } /* 緑 */
.mc-item.rarity-3 img { border-color: #1B396C; } /* 青 */
.mc-item.rarity-4 img { border-color: #452465; } /* 紫 */
.mc-item.rarity-5 img { border-color: #612F0C; }   /* 金色 */

/* 数字は枠の外に表示される */
.mc-item span {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  color: #fff;
}

.level-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* 現在／目標バーを左右に並べる */
.level-wrapper {
  display: flex;
  gap: 20px;           /* 左右の間隔 */
  flex-wrap: wrap;     /* 小さい画面では折り返す */
}

/* 左側＝現在、右側＝目標 */
.level-wrapper > span,
.level-wrapper > input {
  vertical-align: middle;
}

/* 現在用のラッパー */
.level-wrapper .current-level,
.level-wrapper .target-level {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* レンジスライダーの幅 */
.level-wrapper input[type="range"] {
  width: 100%;
}

