/* ==========================================================================
   Memphis Pop Game Review Card Styles (Dark Mode)
   ========================================================================== */



/* Core Pages layout */
.pages-area {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
  width: 100%;
}

.pages-area .page-wrapper {
  max-width: 1060px;
  width: 100%;
  padding: 24px;
  position: relative;
  box-sizing: border-box;
  background: #141c2b;
  border: 2px solid #2e3a4f;
  border-radius: 10px;
  box-shadow: 4px 4px 0px #090d16;
}

.pages-area .page-header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #2e3a4f;
}

.pages-area .page-title {
  font-size: 1.6rem;
  margin: 0;
  font-family: 'Meiryo', 'メイリオ', 'Hiragino Kaku Gothic ProN', sans-serif;
  font-weight: 800;
  color: #f8fafc;
}

.pages-area .review-intro-text {
  margin: 0.6rem 0 0;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.5;
  color: #cbd5e1;
  text-indent: 1em;
}

.pages-area .page-num {
  font-size: 0.9rem;
  font-weight: 900;
  font-family: 'Outfit', sans-serif;
  color: #f8fafc;
  border: 2px solid #2e3a4f;
  background: #1a2436;
  padding: 4px 10px;
  border-radius: 6px;
  box-shadow: 2px 2px 0px #090d16;
}

.pages-area .game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 24px;
  row-gap: 16px;
}

.pages-area .game-card {
  display: flex;
  height: 110px;
  overflow: hidden;
  position: relative;
  background: #1c2638;
  border: 1px solid #2e3a4f;
  border-radius: 8px;
  box-shadow: 0 0 0 transparent;
  transition: border-color 0.15s ease;
}

/* Pop-up effect on hover and focus */
.pages-area .game-card:hover,
.pages-area .game-card:focus-within {
  border-color: #94a3b8;
  z-index: 10;
}

.pages-area .left-col {
  width: 200px;
  height: 100%;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.pages-area .title-box {
  padding: 8px 8px 0px 8px;
  height: 26px;
  display: flex;
  align-items: flex-start;
  background: #1c2638;
  width: 100%;
}

.pages-area .title-area {
  flex: 1;
  min-width: 0;
  height: 100%;
  background: transparent;
  border: none;
  font-family: 'Meiryo', 'メイリオ', 'Hiragino Kaku Gothic ProN', sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  resize: none;
  outline: none;
  padding: 0;
  overflow: hidden;
  color: #f8fafc;
  white-space: nowrap;
}

.pages-area .card-body {
  display: flex;
  flex: 1;
  width: 100%;
  min-height: 0;
}

.pages-area .img-box {
  width: 100%;
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1c2638;
  padding-left: 8px;
  padding-bottom: 8px;
  min-height: 0;
}

.pages-area .img-box a {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: 6px;
}

.pages-area .img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 6px;
}

.pages-area .star-badge {
  font-size: 13px;
  margin-right: 4px;
  flex-shrink: 0;
  display: inline-block;
  line-height: 1;
  margin-top: 1px;
  filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.1));
  z-index: 10;
}

.pages-area .memo-box {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
  min-width: 0;
  position: relative;
  background: #1c2638;
}

/* Small label to represent scratchpad/scribble area (Stamp styled) */
.pages-area .memo-tag {
  position: absolute;
  top: 8px;
  left: 12px;
  font-family: 'Meiryo', 'メイリオ', 'Hiragino Kaku Gothic ProN', sans-serif;
  font-size: 8.5px;
  font-weight: 900;
  color: rgba(255, 107, 11, 0.9);
  border: 1.5px solid rgba(255, 107, 11, 0.9);
  background: rgba(28, 38, 56, 0.9);
  padding: 1.5px 4px;
  border-radius: 3px;
  pointer-events: none;
  transform: rotate(-2.5deg);
  box-shadow: none;
  letter-spacing: 0.05em;
  line-height: 1;
  z-index: 5;
}

.pages-area .memo-area {
  width: 100%;
  flex: 1;
  background: transparent;
  border: none;
  font-family: 'Meiryo', 'メイリオ', 'Hiragino Kaku Gothic ProN', sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.02em;
  resize: none;
  outline: none;
  padding: 22px 0 0 0;
  color: #e2e8f0;
}

.pages-area .memo-area::placeholder {
  color: #a1a1a1;
}

/* Print settings overrides */
@media print {
  .pages-area .page-wrapper {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
    page-break-after: always;
  }
  .save-bar,
  .btn-totop,
  .breadcrumb {
    display: none !important;
  }
}

/* Homepage action button & layout overrides */
.reviews-action-footer {
  text-align: center;
  margin-top: 3.5rem;
  width: 100%;
}

.btn-reviews-more {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 900;
  text-decoration: none;
  background-color: var(--accent-yellow);
  color: var(--text-dark);
  border: 3px solid var(--border-dark);
  padding: 0.8rem 2rem;
  border-radius: 8px;
  box-shadow: 5px 5px 0px var(--border-dark);
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.15), box-shadow 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.15);
}

.btn-reviews-more:hover {
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0px var(--border-dark);
}

.btn-reviews-more:active {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0px var(--border-dark);
}

/* Homepage grid responsive layout */
.pages-area .game-grid.homepage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
}

@media (max-width: 1024px) {
  .pages-area .game-grid.homepage-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .pages-area .game-grid.homepage-grid {
    grid-template-columns: 1fr;
  }
}

/* Refactored Save Bar & Action Buttons (from game_review subpage) */
.save-bar {
  display: flex;
  gap: 15px;
  margin-top: 20px;
  justify-content: center;
}

.btn-main {
  font-family: 'Meiryo', 'メイリオ', 'Hiragino Kaku Gothic ProN', sans-serif;
  font-weight: 800;
  border: 2px solid #111;
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: 3px 3px 0px #111;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-main:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0px #111;
}

.btn-main.accent {
  background: #ffde59;
  color: #111;
}

.btn-main.info {
  background: #e3f8ff;
  color: #111;
}

/* 新しく追加されたゲームのグループと既存グループ의間の区切り線 */
.pages-area .group-separator {
  grid-column: span 2;
  height: 1px;
  background-color: #2e3a4f;
  margin: 15px 0;
  border: none;
}

/* index.html（トップページ）用のカードの背景・文字色を元の白ベースに強制する */
#reviews-container .game-card {
  background: #ffffff;
  border-color: #111111;
}

#reviews-container .title-box,
#reviews-container .img-box,
#reviews-container .memo-box {
  background: #ffffff;
}

#reviews-container .title-area {
  color: #111111;
}

#reviews-container .memo-area {
  color: #222222;
}

#reviews-container .memo-tag {
  background: rgba(255, 255, 255, 0.85);
}

#reviews-container .game-card:hover,
#reviews-container .game-card:focus-within {
  transform: none;
  box-shadow: 0 0 0 transparent;
  border-color: #111111;
}

/* ==========================================================================
   Mobile Responsive Rules (width < 768px)
   ========================================================================== */
@media (max-width: 767px) {
  .section-container {
    padding: 2rem 8px !important;
  }

  .pages-area .page-wrapper {
    width: 100% !important;
    padding: 8px !important;
  }

  .pages-area .game-grid {
    grid-template-columns: 1fr !important;
    column-gap: 0 !important;
    row-gap: 12px !important;
  }

  .pages-area .game-card {
    display: flex !important;
    height: 140px !important;
  }

  .pages-area .left-col {
    display: flex !important;
    flex-direction: column !important;
    width: 210px !important;
    height: 100% !important;
    flex-shrink: 0 !important;
  }

  .pages-area .title-box {
    height: 32px !important;
    width: 100% !important;
    padding: 6px 8px 0px 8px !important;
  }

  .pages-area .title-area {
    font-size: 15px !important;
  }

  .pages-area .img-box {
    width: 100% !important;
    flex: 1 !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding-left: 8px !important;
    padding-bottom: 8px !important;
  }

  .pages-area .img-box img {
    border-radius: 6px !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
  }

  .pages-area .memo-box {
    flex: 1 !important;
    height: 100% !important;
    position: relative !important;
    padding: 0 8px 8px 12px !important;
  }

  .pages-area .memo-area {
    padding-top: 34px !important;
    font-size: 16px !important;
  }

  .pages-area .memo-tag {
    top: 6px !important;
    left: 12px !important;
    font-size: 9.5px !important;
    padding: 2px 5px !important;
    border-width: 1.5px !important;
  }

  .pages-area .group-separator {
    grid-column: span 1 !important;
    margin: 10px 0 !important;
  }

  .save-bar {
    flex-direction: column !important;
    gap: 10px !important;
    align-items: stretch !important;
  }

  .btn-main {
    padding: 12px !important;
    font-size: 14px !important;
    text-align: center !important;
  }
}

/* Review tags occupy their own row so the original review area keeps its space. */
.game-review-page .pages-area .game-card { flex-wrap: wrap; height: auto; overflow: visible; }
.game-review-page .pages-area .left-col { height: auto; }
.game-review-page .pages-area .img-box { flex: none; height: 84px; box-sizing: border-box; }
.game-review-page .pages-area .memo-box { height: 110px; box-sizing: border-box; }
.game-review-page .game-tags { flex: none; box-sizing: border-box; display: flex; flex-wrap: wrap; gap: 5px; padding: 4px 8px 8px; }
.game-review-page .game-tag { max-width: 100%; overflow-wrap: anywhere; color: #dbeafe; background: #293a52; border: 1px solid #49617f; border-radius: 0; padding: 3px 8px; font-size: 11px; line-height: 1.5; }
@media (max-width: 767px) {
  .game-review-page .pages-area .game-card { height: auto !important; }
  .game-review-page .pages-area .left-col { width: 55% !important; height: auto !important; }
  .game-review-page .pages-area .memo-box { height: 140px !important; }
  .game-review-page .pages-area .img-box { flex: none !important; height: 108px; box-sizing: border-box; }
}

/* Slightly smaller review text on the homepage only. */
#reviews-container .memo-area { font-size: 11px; }
@media (max-width: 767px) { #reviews-container .memo-area { font-size: 15px !important; } }
