@charset "UTF-8";

/* === カラーパレット定義 === */
:root {
  --brand-gold: #ff9f1c;
  --brand-gold-dark: #e88d10;
  --brand-yellow: #ffe600;
  --accent-green: #2ec4b6;
  --accent-green-hover: #25a094;
  --light-bg: #f9f8f5;
  --card-bg: #ffffff;
  
  --color-html: #ff5252;
  --color-css: #2e86de;
  --color-js: #f9ca24;
  --color-pc: #747d8c;
  --color-block: #2ecc71;
}

body { background-color: var(--light-bg); color: #4a4a4a; font-family: "Noto Sans JP", sans-serif; margin: 0; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; }

/* === ヘッダー（共通） === */
.header { background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.05); padding: 15px 0; }
.header .container { display: flex; justify-content: space-between; align-items: center; max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.logo { font-weight: 900; font-size: 1.5rem; color: var(--brand-gold); }
.header-nav ul { display: flex; gap: 20px; }
.header-nav a { font-weight: bold; color: #666; transition: 0.3s; }
.header-nav a:hover { color: var(--brand-gold); }

/* === ページヘッダー（流れるキーワード） === */
.page-header {
  background: linear-gradient(135deg, #ffc107 0%, #ff9f1c 100%);
  color: #fff; padding: 60px 0; position: relative; overflow: hidden; text-align: center;
}
.page-header h1 { color: #fff; text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15); z-index: 2; position: relative; font-weight: 900; margin: 0; }
.page-header p { color: rgba(255, 255, 255, 0.95); font-weight: bold; z-index: 2; position: relative; margin-top: 10px; }

.math-animation {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 20px; pointer-events: none; opacity: 0.3;
}
.math-animation span {
  color: #fff; font-weight: 900; font-size: 1.2rem;
  animation: float-text 10s infinite linear;
}
@keyframes float-text {
  0% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

/* === メインコンテンツエリア === */
.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.game-section { padding: 40px 0; }

/* === 分割ページ用ナビゲーション === */
/* .category-nav { display: flex; justify-content: center; gap: 10px; margin-bottom: 40px; flex-wrap: wrap; } */
.category-nav { display: none;}
.category-btn {
  padding: 12px 20px; background: #eae6df; color: #7a6b5d; border-radius: 40px;
  font-weight: 900; transition: 0.3s;
}
.category-btn:hover, .category-btn.current {
  background: #fff; color: var(--brand-gold); box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* === ここがポイント！ボックス === */
.point-box {
  background: #fff;
  border: 4px solid var(--brand-yellow);
  border-radius: 24px;
  padding: 25px 30px;
  margin: 0 auto 50px;
  max-width: 800px;
  box-shadow: 0 6px 0 #ebd600;
  position: relative;
}

.point-box-title {
  font-size: 1.3rem;
  font-weight: 900;
  color: #5d5045;
  margin: 0 0 15px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.point-box-title i {
  color: var(--brand-gold);
  font-size: 1.6rem;
  animation: bounce 2s infinite;
}

.point-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.point-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
  font-weight: 700;
  color: #666;
  line-height: 1.7;
  font-size: 1.05rem;
}

.point-list li:last-child {
  margin-bottom: 0;
}

.point-list li::before {
  content: "\f00c"; /* Font Awesome Check */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 4px;
  color: var(--accent-green);
  font-size: 1.2rem;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
  40% {transform: translateY(-6px);}
  60% {transform: translateY(-3px);}
}

/* === カードデザイン === */
.game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* PCは2列 */
  gap: 30px;
  margin-bottom: 40px;
}

.game-card {
  display: flex; flex-direction: column; background: var(--card-bg); border-radius: 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
  text-decoration: none; color: inherit; height: 100%; border: 1px solid #eee; position: relative;
}
.game-card:hover:not(.disabled-card) { transform: translateY(-10px); box-shadow: 0 15px 40px rgba(255, 159, 28, 0.15); border-color: var(--brand-gold); }

.game-card-image-wrapper { position: relative; aspect-ratio: 16 / 9; margin: 15px; border-radius: 22px; overflow: hidden; background: #f0f7ff; border: 2px solid #fff; }
.door-portal { position: absolute; width: 100%; height: 100%; background: radial-gradient(circle at center, #fff 0%, #fff9db 100%); display: flex; justify-content: center; align-items: center; }
.door-portal::before { content: ""; position: absolute; width: 200%; height: 200%; background-image: radial-gradient(circle, var(--brand-gold) 1px, transparent 1px); background-size: 30px 30px; animation: portal-spin 35s linear infinite; opacity: 0.15; }
@keyframes portal-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.course-main-icon { font-size: 4.8rem; z-index: 4; animation: icon-float 3s infinite ease-in-out; }
@keyframes icon-float { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }

.icon-html { color: var(--color-html); }
.icon-css { color: var(--color-css); }
.icon-js { color: var(--color-js); }
.icon-pc { color: var(--color-pc); }
.icon-block { color: var(--color-block); }
.icon-rank { color: var(--brand-gold); }

.neko-guide { position: absolute; bottom: -5px; right: 10px; width: 90px; z-index: 5; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1)); animation: neko-float 4s infinite ease-in-out; }
@keyframes neko-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.game-card-body { padding: 15px 25px; flex-grow: 1; }
.game-card-body h2 { display: flex; align-items: center; justify-content: center; font-size: 1.35rem; font-weight: 900; margin: 0 0 12px 0; white-space: nowrap; color: #5d5045; }
.game-card-body h2 i { margin-right: 10px; flex-shrink: 0; }
ruby { white-space: nowrap; vertical-align: baseline; }
rt { font-size: 0.6em; color: #888; font-weight: 400; }
.game-card p { font-size: 1rem; color: #666; line-height: 1.7; margin: 0; }

.game-card-footer { padding: 0 25px 25px; display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.game-card-main-btn { padding: 16px; background-color: var(--accent-green); color: #fff; font-size: 1.2rem; border-radius: 50px; text-decoration: none; font-weight: 900; text-align: center; box-shadow: 0 4px 0 #1f8c82; transition: 0.2s; }
.game-card-main-btn:hover { background-color: var(--accent-green-hover); transform: translateY(2px); box-shadow: 0 2px 0 #1f8c82; }

.game-card-sub-buttons { display: flex; gap: 8px; }
.game-card-sub-btn { flex: 1; padding: 10px; font-size: 0.95rem; color: #555; background-color: #f1f5f9; border-radius: 50px; text-decoration: none; font-weight: 700; text-align: center; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 4px; }
.game-card-sub-btn i { color: var(--brand-gold); }

.next-section-wrapper { text-align: center; padding: 50px 0 20px; margin-top: 30px; border-top: 2px dashed #ddd; }
.next-section-btn { 
  display: inline-flex; 
  align-items: center; 
  justify-content: center;
  gap: 12px; 
  background: var(--brand-gold); 
  color: #fff !important; 
  padding: 18px 45px; 
  border-radius: 50px; 
  font-size: 1.35rem; 
  font-weight: 900; 
  text-decoration: none; 
  box-shadow: 0 6px 0 var(--brand-gold-dark); 
  transition: all 0.2s ease; 
  border: none; 
  cursor: pointer;
  box-sizing: border-box; /* はみ出し防止 */
  max-width: 100%;       /* はみ出し防止 */
}
.next-section-btn:hover { transform: translateY(2px); box-shadow: 0 3px 0 var(--brand-gold-dark); background-color: #e68a00; color: #fff !important; }
.next-section-btn i { font-size: 1.6rem; animation: arrow-down 1s infinite alternate; }

.rank-list { list-style: none; padding: 0; margin: 15px 0 0; display: flex; flex-direction: column; gap: 10px; }
.rank-btn { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: #fff; border: 2px solid #f1f5f9; border-radius: 18px; text-decoration: none; font-weight: 700; color: #444; transition: 0.2s; white-space: nowrap; }
.rank-btn:hover { border-color: var(--brand-gold); background: #fffcf0; }
.rank-label { background: #fef3c7; color: #d97706; padding: 2px 10px; border-radius: 6px; font-size: 0.85em; margin-right: 10px; flex-shrink: 0; }

.grid-subheading { text-align: center; color: #5d5045; font-size: 1.7rem; font-weight: 900; margin-bottom: 1.5em; margin-top: 2em; }
.grid-subheading:first-child { margin-top: 0; }

.game-card.disabled-card { opacity: 0.7; filter: grayscale(0.4); pointer-events: none; }
.lock-icon { position: absolute; top: 15px; right: 15px; color: #999; font-size: 1.5rem; z-index: 10; }

.modal { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); align-items: center; justify-content: center; backdrop-filter: blur(5px); }
.modal img { max-width: 90%; border-radius: 20px; box-shadow: 0 0 50px rgba(0,0,0,0.5); }
.footer { text-align: center; padding: 20px; color: #999; font-size: 0.9rem; margin-top: 50px; }

.js-open-manga{
  display: none;
}

/* === レスポンシブ対応 === */
@media (max-width: 768px) {
  .game-grid { grid-template-columns: 1fr; } /* スマホは1列 */
  .rank-btn { white-space: normal; font-size: 0.95rem; }
  
  .point-box { padding: 20px; }
  .point-box-title { font-size: 1.1rem; }
  .point-list li { font-size: 0.95rem; }

  .next-section-btn { 
    font-size: 1.1rem; 
    width: 90%; 
    padding: 18px 20px; /* スマホ時のパディング調整ではみ出し防止 */
  }
}