/* ===================================
   プチプリンランド - 共通スタイル
   =================================== */

/* Googleフォントの読み込み（丸くてかわいいフォント） */
@import url('https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@400;500;700&display=swap');

/* ===== 基本設定 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', sans-serif;
  background-color: #fff5f7;
  color: #5c3d4e;
  line-height: 1.8;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== ヘッダー ===== */
header {
  background: linear-gradient(135deg, #ffb7c5, #ffd6e0);
  text-align: center;
  padding: 30px 20px 20px;
  box-shadow: 0 2px 8px rgba(255, 143, 171, 0.3);
}

header h1 {
  font-size: 2.2em;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(255, 100, 130, 0.4);
  letter-spacing: 0.1em;
}

header p {
  color: #fff;
  font-size: 0.95em;
  margin-top: 6px;
  opacity: 0.9;
}

/* ===== ナビゲーション（メニュー） ===== */
nav {
  background-color: #ffeef2;
  border-bottom: 2px solid #ffd6e0;
  text-align: center;
  padding: 10px;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav a {
  display: inline-block;
  color: #d45f7a;
  text-decoration: none;
  padding: 6px 14px;
  margin: 4px;
  border-radius: 20px;
  font-size: 0.95em;
  font-weight: 500;
  transition: background-color 0.2s, color 0.2s;
}

nav a:hover,
nav a.active {
  background-color: #ffb7c5;
  color: #fff;
}

/* ===== メインコンテンツ ===== */
main {
  max-width: 960px;
  width: 90%;
  margin: 30px auto;
  padding: 0 20px;
  flex: 1;
}

/* ===== セクションタイトル ===== */
h2 {
  font-size: 1.5em;
  color: #d45f7a;
  border-left: 5px solid #ffb7c5;
  padding-left: 12px;
  margin: 5px 0 16px;
}

/* ===== カード（ボックス） ===== */
.card {
  background-color: #fff;
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(255, 143, 171, 0.15);
  border: 1px solid #fde8ee;
}

/* ===== ボタン ===== */
.btn {
  display: inline-block;
  background-color: #ffb7c5;
  color: #fff;
  text-decoration: none;
  padding: 10px 24px;
  border-radius: 24px;
  font-size: 0.95em;
  font-weight: 500;
  transition: background-color 0.2s, transform 0.1s;
  box-shadow: 0 3px 8px rgba(255, 143, 171, 0.35);
}

.btn:hover {
  background-color: #ff8fab;
  transform: translateY(-2px);
}

/* ===== トップページのメニューカード ===== */
.top-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.top-menu a {
  display: block;
  background-color: #fff;
  border: 2px solid #ffd6e0;
  border-radius: 16px;
  text-align: center;
  padding: 28px 16px;
  text-decoration: none;
  color: #d45f7a;
  font-weight: 500;
  font-size: 1.05em;
  transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 3px 8px rgba(255, 143, 171, 0.1);
}

.top-menu a:hover {
  background-color: #ffeef2;
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(255, 143, 171, 0.25);
}

.top-menu a .icon {
  font-size: 2.2em;
  display: block;
  margin-bottom: 10px;
}

/* ===== キャラチップ ===== */
.terms-card h3 {
  color: #d45f7a;
  margin-bottom: 12px;
  font-size: 1.05em;
}

.terms-list {
  padding-left: 20px;
  line-height: 2;
  font-size: 0.9em;
  color: #7a5060;
}

.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.char-card {
  padding: 16px;
  text-align: center;
}

.char-image {
  width: 100%;
  max-width: 140px;
  height: auto;
  border-radius: 8px;
  border: 2px solid #fde8ee;
  image-rendering: pixelated;
}

.char-info h3 {
  font-size: 1em;
  color: #d45f7a;
  margin: 10px 0 4px;
}

.char-info p {
  font-size: 0.85em;
  color: #b07080;
}

/* ===== ポップアップ（モーダル） ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 999;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #fff;
  border-radius: 16px;
  padding: 24px;
  max-width: 90vw;
  max-height: 90vh;
  text-align: center;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.4em;
  color: #b07080;
  cursor: pointer;
}

.modal-close:hover {
  color: #d45f7a;
}

.modal-image {
  max-width: 100%;
  max-height: 70vh;
  image-rendering: pixelated;
  border-radius: 8px;
}

.modal-title {
  margin-top: 12px;
  color: #d45f7a;
  font-weight: 500;
  font-size: 1.05em;
}

.char-card {
  cursor: pointer;
}

.char-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(255, 143, 171, 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
}

/* ===== ゲームカード ===== */
.game-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.game-image {
  width: 160px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  border: 2px solid #fde8ee;
}

.game-info {
  flex: 1;
}

.game-info h3 {
  font-size: 1.15em;
  color: #d45f7a;
  margin-bottom: 8px;
}

.game-desc {
  font-size: 0.9em;
  color: #7a5060;
  margin-bottom: 12px;
  line-height: 1.7;
}

.game-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-small {
  padding: 7px 16px;
  font-size: 0.85em;
}

.btn-browser {
  background-color: #ffc8d8;
  color: #d45f7a;
  box-shadow: none;
}

.btn-browser:hover {
  background-color: #ffb7c5;
  color: #fff;
}

@media (max-width: 600px) {
  .game-card {
    flex-direction: column;
  }

  .game-image {
    width: 100%;
    height: 180px;
  }
}

/* ===== プロフィールテーブル ===== */
.profile-table {
  width: 100%;
  border-collapse: collapse;
}

.profile-table tr {
  border-bottom: 1px solid #fde8ee;
}

.profile-table tr:last-child {
  border-bottom: none;
}

.profile-table th {
  text-align: left;
  padding: 12px 16px 12px 0;
  color: #d45f7a;
  font-weight: 500;
  white-space: nowrap;
  width: 30%;
}

.profile-table td {
  padding: 12px 0;
}

/* ===== ツールリスト ===== */
.tool-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.tool-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background-color: #fff5f7;
  border-radius: 12px;
  padding: 14px 16px;
}

.tool-icon {
  font-size: 2em;
  flex-shrink: 0;
}

.tool-item p {
  font-size: 0.85em;
  color: #b07080;
  margin-top: 2px;
}

/* ===== SNSボタン ===== */
.sns-btn {
  margin-top: 10px;
  font-size: 1em;
}

/* ===== フッター ===== */
footer {
  text-align: center;
  padding: 24px;
  margin-top: 40px;
  background-color: #ffeef2;
  border-top: 2px solid #ffd6e0;
  color: #b07080;
  font-size: 0.85em;
}

/* ===== リンク ===== */
.link-card {
  margin-bottom: 20px;
}

.link-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}

.link-title {
  font-size: 1.1em;
  font-weight: 700;
  color: #d45f7a;
  text-decoration: none;
}

.link-title:hover {
  text-decoration: underline;
}

.link-author {
  font-size: 0.85em;
  color: #b07080;
}

.link-desc {
  font-size: 0.9em;
  color: #7a5060;
  margin-bottom: 12px;
  line-height: 1.7;
}

/* ===== スマホ対応 ===== */
@media (max-width: 600px) {
  header h1 {
    font-size: 1.6em;
  }

  nav a {
    font-size: 0.85em;
    padding: 5px 10px;
  }

  .top-menu {
    grid-template-columns: repeat(2, 1fr);
  }
}
