@charset "UTF-8";

/* --- 共通設定 & 変数 --- */
:root {
  --bg-dark: #050505;
  --accent: #c5a059;       /* 落ち着いた金 */
  --accent-light: #fadd9e; /* 輝く金 */
  --accent-glow: rgba(197, 160, 89, 0.4);
  --danger: #b71c1c;       /* 深紅 */
  --danger-light: #ff5252;
  --text-main: #e0e0e0;
  
  --font-main: "Shippori Mincho", "Yu Mincho", serif;
  --font-title: "Zen Antique", serif;

  --card-width: 150px;
  --card-height: 220px;
}

* { box-sizing: border-box; user-select: none; touch-action: manipulation; }

body {
  margin: 0; width: 100vw; height: 100vh;
  background-color: var(--bg-dark);
  background-image: radial-gradient(circle at 50% 50%, #2a2a2a 0%, #000 100%);
  color: var(--text-main); font-family: var(--font-main);
  overflow: hidden; font-weight: 500;
}

/* 背景エフェクト */
#particles {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: url('https://raw.githubusercontent.com/gist/rsms/7c8eb443425a66698943/raw/noise.png');
  opacity: 0.05;
}

/* メインコンテナ */
#app {
  width: 100%; height: 100%; position: relative; 
  display: flex; flex-direction: column;
  background: radial-gradient(circle, rgba(50,50,50,0.1) 0%, rgba(0,0,0,0.8) 100%);
  box-shadow: inset 0 0 100px rgba(0,0,0,1);
}
#app::before {
  content: ""; pointer-events: none; position: absolute; inset: 15px;
  border: 1px solid rgba(197, 160, 89, 0.3); z-index: 100;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.8);
}

/* --- 画面共通 --- */
.screen {
  position: absolute; inset: 0; z-index: 10;
  display: none; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity 0.5s ease; opacity: 0;
  background: rgba(0,0,0,0.8); backdrop-filter: blur(5px);
}
.screen.active { display: flex; opacity: 1; z-index: 20; }

/* ボタン共通 */
.btn-common, .lvl-btn, .modal-btn {
  font-family: var(--font-title); cursor: pointer; position: relative; overflow: hidden;
  transition: all 0.3s; border: 1px solid var(--accent);
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  color: var(--accent); text-shadow: 0 2px 5px rgba(0,0,0,0.8);
  box-shadow: 0 4px 15px rgba(0,0,0,0.6);
}
.btn-common:hover, .lvl-btn:hover, .modal-btn:hover {
  background: var(--accent); color: #000; box-shadow: 0 0 25px var(--accent-glow);
  transform: translateY(-2px); text-shadow: none;
}
.btn-common:disabled { filter: grayscale(1); opacity: 0.5; cursor: not-allowed; transform: none; }

/* --- タイトル --- */
#title-screen {
  background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.8)), url('images/title_bg.jpg');
  background-size: cover; background-position: center;
}
.game-title {
  font-family: var(--font-title); font-size: 7rem; color: #fff;
  text-align: center; line-height: 0.9;
  text-shadow: 0 0 30px var(--accent-glow);
  background: linear-gradient(to bottom, #fff 20%, var(--accent) 80%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
}
.sub-title { 
  font-size: 1.4rem; color: #aaa; margin-bottom: 60px; 
  letter-spacing: 0.5em; text-transform: uppercase;
  border-bottom: 1px solid var(--accent); padding-bottom: 10px;
}
.level-select { 
  display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; 
  max-width: 1100px; z-index: 2;
}
.lvl-btn {
  width: 280px; padding: 25px; text-align: left;
  display: flex; flex-direction: column;
  background: rgba(30, 30, 35, 0.9); border-left: 4px solid var(--accent);
}
.lvl-main { font-size: 1.6rem; font-weight: bold; margin-bottom: 5px; }
.lvl-desc { font-size: 0.9rem; opacity: 0.7; font-family: var(--font-main); }

/* --- 図鑑レイアウト --- */
#combo-screen, #boss-book-screen {
  background: rgba(10, 10, 12, 0.95);
  display: flex; flex-direction: column;
}
.combo-header {
  width: 100%; padding: 15px 40px; background: rgba(0,0,0,0.8);
  border-bottom: 1px solid #333; display: flex; justify-content: space-between; align-items: center;
  box-shadow: 0 5px 20px rgba(0,0,0,0.5); z-index: 10; flex-shrink: 0;
}
.combo-header h2 { margin: 0; color: var(--accent); font-family: var(--font-title); font-size: 1.8rem; }

.combo-list-container {
  flex: 1; overflow-y: auto; padding: 30px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); 
  gap: 15px; align-content: start;
}

/* カード共通 */
.combo-card, .boss-card {
  background: linear-gradient(145deg, #1e1e24, #141418);
  border: 1px solid #333; border-radius: 6px;
  padding: 15px; position: relative;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3); transition: 0.2s;
  border-left: 4px solid var(--accent);
}
.combo-card:hover, .boss-card:hover {
  transform: translateY(-3px); border-color: #666; background: #25252a;
}
.combo-card-pair { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-weight: bold; font-size: 1.1rem; }
.combo-img-mini { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1px solid #666; }
.combo-meta { font-size: 0.85rem; color: #777; margin-top: 10px; text-align: right; border-top: 1px dashed #333; padding-top: 5px; }

/* ボス図鑑 */
.boss-card-head { display: flex; justify-content: space-between; border-bottom: 1px solid #333; padding-bottom: 8px; margin-bottom: 10px; font-size: 0.9rem; color: #777; }
.boss-card-head.unlocked .boss-status { color: var(--accent); font-weight: bold; }
.boss-card-body { display: flex; gap: 15px; align-items: center; }
.boss-img-wrap { width: 80px; height: 80px; border-radius: 50%; border: 2px solid #444; overflow: hidden; flex-shrink: 0; }
.boss-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.boss-name { font-size: 1.3rem; font-family: var(--font-title); color: #fff; margin-bottom: 4px; }
.boss-stage { font-size: 0.9rem; color: #aaa; }


/* --- バトル画面 --- */
#battle-screen {
  background: transparent; display: grid;
  grid-template-columns: 350px 1fr 300px; grid-template-rows: 90px 1fr;
  width: 100%; height: 100%;
}
.header {
  grid-column: 1 / -1; background: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent);
  display: flex; align-items: center; justify-content: space-between; padding: 0 40px; z-index: 10;
}
.stage-info { font-size: 2rem; font-family: var(--font-title); color: #fff; text-shadow: 0 2px 5px #000; }
.score-info { font-size: 1.5rem; font-family: var(--font-title); color: #888; }
.score-val { color: var(--accent-light); font-size: 2.2rem; margin-left: 10px; }

.col-left {
  background: rgba(10, 10, 10, 0.4); backdrop-filter: blur(8px);
  border-right: 1px solid rgba(255,255,255,0.05); padding: 30px; display: flex; flex-direction: column; gap: 20px;
}
.stat-box { margin-bottom: 5px; }
.label { font-size: 1.2rem; display: flex; justify-content: space-between; margin-bottom: 5px; font-family: var(--font-title); }
.bar-frame { height: 16px; background: #222; border-radius: 8px; border: 1px solid #444; position: relative; overflow: hidden; }
.bar-fill { height: 100%; transition: width 0.3s; }
.p-bar { background: linear-gradient(90deg, #1b5e20, #4caf50); }
.e-bar { background: linear-gradient(90deg, #b71c1c, #ff5252); }

/* ★消えていたボタンのスタイルを復元 */
.action-area { margin-top: auto; display: flex; flex-direction: column; gap: 15px; }
.attack-btn {
  height: 70px; font-size: 1.8rem;
  border-color: var(--danger); color: var(--danger-light);
  background: radial-gradient(circle, rgba(60, 10, 10, 0.8), rgba(20,0,0,0.9));
}
.attack-btn:hover:not(:disabled) {
  background: var(--danger); color: #fff; box-shadow: 0 0 30px rgba(255, 82, 82, 0.6);
}
.quit-btn { border-color: #666; color: #aaa; background: transparent; }
.quit-btn:hover { border-color: #fff; color: #fff; background: #333; }


.col-center { position: relative; display: flex; flex-direction: column; align-items: center; }
.col-center::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle, rgba(0,0,0,0) 30%, rgba(0,0,0,0.7) 100%); pointer-events: none; }

.boss-zone { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 1; }
.boss-avatar { 
  width: 260px; height: 260px; border-radius: 50%; border: 4px solid rgba(255,255,255,0.1); 
  box-shadow: 0 0 50px rgba(0,0,0,0.8); overflow: hidden; background: #000; position: relative; 
}
.boss-avatar img { width: 100%; height: 100%; object-fit: cover; }
.boss-avatar.hit { animation: shake 0.3s; filter: sepia(1) hue-rotate(-50deg) brightness(2); }
.boss-plate { margin-top: -20px; z-index: 2; background: #111; border: 1px solid #555; padding: 10px 40px; border-radius: 4px; text-align: center; }
.boss-name-disp { font-size: 1.4rem; color: #fff; font-family: var(--font-title); }
.gauge-wrap { width: 100%; height: 6px; background: #333; margin-top: 8px; }
.gauge-fill { height: 100%; background: #ff9100; width: 0%; box-shadow: 0 0 5px #ff9100; }

/* --- カードデザイン (名前表示強化) --- */
.hand-zone {
  height: 260px; width: 100%; padding-bottom: 20px;
  display: flex; justify-content: center; align-items: flex-end; gap: 15px; z-index: 5;
}
.card {
  width: var(--card-width); height: var(--card-height);
  background: #1a1a1a; border: 1px solid #555; border-radius: 8px;
  position: relative; cursor: pointer; transition: 0.2s;
  box-shadow: 0 5px 15px rgba(0,0,0,0.6); overflow: hidden;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-15px) scale(1.05); z-index: 10; border-color: #aaa; }
.card.selected { transform: translateY(-30px) scale(1.05); border: 2px solid var(--accent); box-shadow: 0 0 20px var(--accent-glow); z-index: 20; }

.card-img-bg {
  position: absolute; top: 0; left: 0; width: 100%; height: 80%;
  object-fit: cover; filter: sepia(0.5) contrast(1.1) brightness(0.9);
  transition: 0.3s; z-index: 1;
}
.card:hover .card-img-bg { filter: sepia(0) contrast(1.1) brightness(1); }

.card-icon {
  font-size: 3.5rem; text-align: center; margin-top: 30px; z-index: 1;
  filter: drop-shadow(0 4px 5px rgba(0,0,0,0.8));
}

.card-text {
  margin-top: auto; 
  min-height: 55px; 
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 10, 10, 0.9); /* 名前が見やすい濃い背景 */
  border-top: 2px solid var(--accent); 
  color: #fff; font-weight: bold; font-size: 1.05rem;
  font-family: var(--font-title);
  z-index: 5; position: relative;
  text-align: center; padding: 5px;
  text-shadow: 0 2px 2px #000;
}

.card[data-type='person'] { border-bottom: 4px solid #b39ddb; }
.card[data-type='person'] .card-text { color: #f3e5f5; }

.card[data-type='event'] { border-bottom: 4px solid #90caf9; }
.card[data-type='event'] .card-text { color: #e3f2fd; }


.col-right {
  background: rgba(15, 15, 20, 0.4); backdrop-filter: blur(8px);
  border-left: 1px solid rgba(255,255,255,0.05); display: flex; flex-direction: column;
}
.log-head { padding: 15px; text-align: center; color: #888; font-family: var(--font-title); border-bottom: 1px solid #333; }
.log-body { flex: 1; overflow-y: auto; padding: 15px; display: flex; flex-direction: column-reverse; }
.log-item { margin-bottom: 10px; padding: 10px; background: rgba(0,0,0,0.5); border-left: 3px solid #555; color: #ccc; font-size: 0.95rem; }
.log-win { border-color: var(--accent); color: #ffecb3; }
.log-dmg { border-color: var(--danger); color: #ffcdd2; }

#modal { background: rgba(0,0,0,0.9); }
.modal-box { width: 600px; padding: 50px; text-align: center; background: #111; border: 1px solid var(--accent); box-shadow: 0 0 50px rgba(0,0,0,0.8); }
.modal-title { font-size: 4rem; font-family: var(--font-title); color: #fff; margin-bottom: 20px; }
.res-score-box { font-size: 2rem; color: var(--accent); margin-bottom: 30px; }

.damage-float { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%); font-size: 5rem; font-family: var(--font-title); color: #fff; text-shadow: 0 0 10px var(--danger); animation: floatUp 1s forwards; pointer-events: none; z-index: 100; }
@keyframes floatUp { to { transform: translate(-50%, -150px); opacity: 0; } }
@keyframes shake { 0%,100%{transform:translateX(0);} 25%{transform:translateX(-10px);} 75%{transform:translateX(10px);} }
.flash-red { animation: flashRed 0.4s; }
@keyframes flashRed { 50% { background: rgba(50,0,0,0.3); box-shadow: inset 0 0 100px rgba(200,0,0,0.3); } }

.cutin-overlay { background: rgba(0,0,0,0.6); z-index: 200; display: none; align-items: center; justify-content: center; pointer-events: none; }
.cutin-overlay.active { display: flex; opacity: 1; }
.cutin-text { font-family: var(--font-title); font-size: 8rem; color: #fff; text-shadow: 0 0 30px var(--accent); font-weight: 900; opacity: 0; transform: scale(0.5); }
.anim-play { animation: cutIn 1.2s forwards; }
@keyframes cutIn { 20% { opacity: 1; transform: scale(1); } 85% { opacity: 1; transform: scale(1.1); } 100% { opacity: 0; transform: scale(1.5); filter: blur(10px); } }

#hint-msg { position: absolute; top: 110px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.8); border: 1px solid var(--accent); color: var(--accent); padding: 8px 20px; border-radius: 20px; z-index: 50; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
/* style.css に追加 */

/* --- タイトル画面のライセンス表記 --- */
.title-footer {
  position: absolute;
  bottom: 20px;
  width: 100%;
  text-align: center;
  color: #aaa; /* 少し落ち着いた色 */
  font-size: 0.8rem;
  font-family: var(--font-main);
  z-index: 5;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9); /* 背景が明るくても読めるように影をつける */
}

.credit-item {
  margin: 0 15px; /* 項目同士の間隔 */
  display: inline-block;
  letter-spacing: 0.05em;
}