@font-face {
  font-family: 'GameFont';
  src: url('../fonts/PixelMplus12-Bold.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

:root {
  --primary-color: #007bff;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --secondary-color: #6c757d;
  --cyan-color: #00cab9;
  --bg-color: #f0f4f8;
  /* 背景を少し爽やかな明るいグレーに */
  --text-color: #333;
}

body {
  font-family: "Meiryo", "Hiragino Kaku Gothic ProN", sans-serif;
  color: var(--text-color);
  background-color: var(--bg-color);
  /* ゲームっぽいさりげないドット背景 */
  background-image: radial-gradient(#d7e1ec 2px, transparent 2px);
  background-size: 20px 20px;
  margin: 0;
  padding: 0;
}

/* メインコンテナをカード風にしておしゃれに */
.container {
  width: 100%;
  max-width: 750px;
  margin: 20px auto;
  padding: 25px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border-radius: 15px;
  position: relative;
}

/* 右上アイコンを大きめに揃え、アニメーションを追加 */
.header-icon {
  width: 70px;
  height: 70px;
  object-fit: contain;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.header-icon:hover {
  transform: scale(1.1) translateY(-2px);
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.15));
}

/* Flexbox Layouts */
.d-flex {
  display: flex;
}

.flex-column {
  flex-direction: column;
}

.align-items-center {
  align-items: center;
}

.align-items-end {
  align-items: flex-end;
}

.justify-content-between {
  justify-content: space-between;
}

.justify-content-center {
  justify-content: center;
}

.gap-1 {
  gap: 0.25rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 1rem;
}

.gap-4 {
  gap: 1.5rem;
}

/* Typography */
h3,
h4,
h5,
h6 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.h3 {
  font-size: 1.75rem;
}

.h4 {
  font-size: 1.5rem;
}

.h5 {
  font-size: 1.25rem;
}

.h6 {
  font-size: 1rem;
}

.m-0 {
  margin: 0 !important;
}

.text-primary {
  color: var(--primary-color);
  font-weight: bold;
}

.text-danger {
  color: var(--danger-color);
  font-weight: bold;
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: inherit;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border-radius: 8px;
  /* 角丸を強めに */
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  /* ボタンに影を追加 */
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-lg {
  padding: 0.6rem 1.2rem;
  font-size: 1.25rem;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #fff;
}

.btn-warning {
  background-color: var(--warning-color);
  color: #212529;
}

.btn-danger {
  background-color: var(--danger-color);
  color: #fff;
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: #fff;
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
  background-color: #fff;
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  color: white;
}

.btn:disabled,
.mukou {
  pointer-events: none;
  opacity: 0.5;
  box-shadow: none;
}

/* Forms */
.form-control {
  display: block;
  width: 100%;
  padding: 0.5rem;
  font-size: 1.2rem;
  color: #495057;
  background-color: #f8f9fa;
  border: 2px solid #ced4da;
  border-radius: 8px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: #fff;
}

.border-primary {
  border-color: var(--primary-color) !important;
}

/* Utilities */
.mt-3 {
  margin-top: 1rem;
}

.mt-5 {
  margin-top: 3rem;
}

.mb-3 {
  margin-bottom: 1rem;
}

.my-1 {
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

.py-3 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.mr-2 {
  margin-right: 0.5rem;
}

hr {
  margin: 1.5rem 0;
  border: 0;
  border-top: 2px dashed #ddd;
}

/* 区切り線をポップな点線に */

/* Game Specific */
.progressBox {
  width: 120px;
  /* プログレスバーを少し見やすく */
  height: 22px;
  background: #e9ecef;
  border-radius: 11px;
  /* 丸みを持たせる */
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progressBar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00cab9, #00d2ff);
  /* バーをグラデーションに */
  width: 0%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-sm {
  width: 25px;
  height: 25px;
  object-fit: contain;
}

.icon-md {
  width: 35px;
  height: 35px;
  object-fit: contain;
}

.icon-lg {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.icon-xl {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.bossselect {
  border: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 10px;
  background-color: #fff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.bossselect:hover {
  transform: scale(1.08) translateY(-3px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.bossselect.selected {
  border-color: var(--danger-color);
  box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
}

.savehide {
  display: flex;
  align-items: center;
}

.savehide.hidden {
  display: none !important;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1050;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
  /* 背景を少しぼかしておしゃれに */
}

.modal.show {
  display: flex;
  animation: fadeIn 0.3s;
}

.modal-content {
  background: white;
  padding: 1.5rem;
  border-radius: 15px;
  width: 90%;
  max-width: 550px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #f0f4f8;
  padding-bottom: 1rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.5rem;
  border-top: 2px solid #f0f4f8;
  padding-top: 1rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* タイトルにゲームっぽいアニメーションと装飾 */
.app-title {
  font-family: "GameFont";
  font-size: 2.7rem;
  /* 少し大きく */
  font-weight: 900;
  color: #0056b3;
  /* 以前の複雑な影を廃止し、クッキリした白縁＋薄い影に */
  text-shadow:
    3px 3px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff,
    4px 4px 10px rgba(0, 86, 179, 0.2);
  background: linear-gradient(to bottom, #ffffff 40%, #a2d2ff 100%);
  -webkit-background-clip: text;
  letter-spacing: 1px;
  animation: title-float 3s ease-in-out infinite;
}

@keyframes title-float {

  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }

  50% {
    transform: translateY(-5px) rotate(1deg);
  }
}

/* ステータス部分をおしゃれなカード状に */
.status-card {
  background: #f8f9fa;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 15px;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: white;
  padding: 5px 12px;
  border-radius: 8px;
  border-bottom: 3px solid #ddd;
  min-width: 60px;
}

.stat-item .label {
  font-size: 0.75rem;
  color: #666;
  font-weight: bold;
}

.stat-item .value {
  font-size: 1.4rem;
  font-weight: 900;
}

/* 問題ボタンのホバーエフェクト強化 */
.mondai-btn {
  border-width: 2px;
  box-shadow: 0 4px 0 #ddd;
  transition: all 0.1s;
}

.mondai-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #ddd;
}