@tailwind base;
@tailwind components;
@tailwind utilities;

*,
*::before,
*::after {
  box-sizing: border-box;
}

.alert {
  width: 100%;
  max-width: 48rem; /* Tailwindの max-w-xl 相当 */
  margin: 1rem auto;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  font-size: 0.875rem; /* text-sm */
}

/* 通知（青） */
.alert-notice {
  background-color: #dbeafe; /* bg-blue-100 */
  color: #1e3a8a;             /* text-blue-800 */
}

/* エラー（赤） */
.alert-alert,
.alert-error {
  background-color: #fee2e2; /* bg-red-100 */
  color: #991b1b;             /* text-red-800 */
}

/* 成功（緑） */
.alert-success {
  background-color: #d1fae5; /* bg-green-100 */
  color: #065f46;             /* text-green-800 */
}

.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

/* ベース */
body {
  font-family: 'Helvetica Neue', sans-serif;
  background-color: #fffef9;
  margin: 0;
  color: #333;
}

/* 見出し */
h1 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #444;
}

.wrapper {
  display: flex;
  flex-direction: column;
  padding: 1rem 2rem;
  min-height: 100vh;
}

.main-contents {
  flex-grow: 1;
}

.container {
  display: flex;
  justify-content: center;
}

.login-container {
  max-width: 600px;
  margin: 0 auto 10px auto;
  padding: 20px;
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

/* 公式推奨ボタンのスタイル */
.google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 12px;
  height: 40px;
  width: 100%;
  background-color: #FFFFFF;
  color: #374151;
  border: 1px solid #E5E7EB;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Roboto', sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, box-shadow 0.2s;
}

.google-btn:hover {
  background-color: #F9FAFB;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.google-btn img {
  width: 18px;
  height: 18px;
}

/* --- ハンバーガーボタン --- */
.hamburger-btn {
  position: relative;
  z-index: 1000;
  width: 42px;
  height: 42px;
  border: none;
  background: #4caf50;
  border-radius: 50%;
  cursor: pointer;
  display: block;
}

.hamburger-btn span {
  display: block;
  position: absolute;
  left: 10px;
  width: 22px;
  height: 2px;
  background-color: #fff;
  transition: 0.3s;
  border-radius: 2px;
}

.hamburger-btn span:nth-child(1) { top: 12px; }
.hamburger-btn span:nth-child(2) { top: 20px; }
.hamburger-btn span:nth-child(3) { bottom: 12px; }


/* --- メニューが開いた時のボタン（×印）の形 --- */
.hamburger-btn.is-active span:nth-child(1) {
  top: 20px;
  transform: rotate(45deg);
}
.hamburger-btn.is-active span:nth-child(2) {
  opacity: 0;
}
.hamburger-btn.is-active span:nth-child(3) {
  top: 20px;
  transform: rotate(-45deg);
}


/* --- ナビゲーションメニュー本体 --- */
.hamburger-nav {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 999;
  width: 200px;
  height: 100%;
  background: #fff;
  transform: translateX(100%); /* 初期状態は画面の外に隠す */
  transition: 0.3s;
  padding-top: 80px;
}

.hamburger-nav.is-active {
  transform: translateX(0); /* 画面内に表示 */
}

.hamburger-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hamburger-nav li a {
  display: block;
  padding: 15px 25px;
  color: #333;
  text-decoration: none;
  font-size: 16px;
}
.hamburger-nav li a:hover {
  background: #f5f5f5;
}


/* --- (オプション) 背景オーバーレイ --- */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden; /* クリックできないように */
  transition: 0.3s;
}

.overlay.is-active {
  opacity: 1;
  visibility: visible;
}

/* ログイン推奨画面 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1001; /* ハンバーガーメニューより少し手前に */
  display: none; /* 初期状態では非表示 */
  justify-content: center;
  align-items: center;
}

.modal.is-active {
  display: flex; /* is-activeクラスが付いたら表示 */
}

.modal-content {
  background: #fff;
  padding: 25px 30px;
  border-radius: 8px;
  max-width: 450px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.modal-content h4 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.modal-content p {
  margin-bottom: 20px;
  color: #666;
  font-size: 0.9rem;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
  color: #aaa;
}
.modal-close:hover {
  color: #333;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 30px;
}

/* クイズ一覧グリッド */
.quiz-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 1.5rem;
  padding: 0 1rem;
  justify-content: center;
  margin: 0 auto;
}

.quiz-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  margin: 0 auto;
}

/* クイズカード */
.quiz-card {
  max-width: 600px;
  background-color: #fff;
  border: 2px solid #ffe066;
  border-radius: 16px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  padding: 1rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}
.quiz-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}
.quiz-card h2 {
  font-size: clamp(1.2rem, 5vw, 2rem); /* 絵文字や短文に最適 */
  margin-top: 0;
  min-width: 300px;
  margin-bottom: 0.5rem;
  white-space: nowrap;
  text-overflow: clip; /* はみ出し省略なしで小さく調整 */
  max-width: 100%;
  box-sizing: border-box;
}
.quiz-card p {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
}

.quiz-card-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0 auto;
  gap: 0.25rem;
}

.badge-success {
  display: inline-block;
  background-color: #d4edda;
  color: #155724;
  border-radius: 9999px;
  padding: 0.3em 0.8em;
  font-size: 0.8rem;
  margin: 0em 2em;
}

.badge-warning {
  display: inline-block;
  background-color: #fff3cd;
  color: #856404;
  border-radius: 9999px;
  padding: 0.3em 0.8em;
  font-size: 0.8rem;
  margin: 0em 2em;
}

/* 今日の1問 */
.daily-container {
  padding: 0 1rem;
  display: flex;
  justify-content: center;
  margin: 0 auto;
}

/* 初正解時のアニメーション関係 */
.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn 0.5s ease-out;
}
.modal-overlay.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

.modal-content {
  background: white;
  padding: 2em 3em;
  border-radius: 1em;
  font-size: 1.5rem;
  text-align: center;
  animation: pop 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pop {
  0%   { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1);   opacity: 1; }
}

#emoji-confetti {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
}

.emoji-float {
  position: absolute;
  font-size: 2rem;
  animation: fallDown 3s ease-in forwards;
  opacity: 0;
}

@keyframes fallDown {
  0% {
    transform: translateY(-10vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}
/* 不正解時の表示 */
.incorrect-alert {
  background-color: #ffe0e0;
  color: #a94442;
  border: 2px solid #f5c6cb;
  max-width: 600px;
  padding: 1rem;
  border-radius: 8px;
  font-weight: bold;
  text-align: center;
  margin: 1em 0;
  font-size: 1.1rem;
  margin: 1rem auto;
}

.give-up-alert {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
  max-width: 600px;
  padding: 1rem;
  border-radius: 8px;
  font-weight: bold;
  text-align: center;
  margin: 1em 0;
  font-size: 1.1rem;
  margin: 1rem auto;
}


/* タグ */
.tag-area {
  padding: 0 0.5rem;
  text-align: left;
}

.tag-badge {
  display: inline-block;
  background-color: #e0f0ff;
  color: #007bff;
  border: 1px solid #b6d9ff;
  border-radius: 9999px;
  padding: 4px 10px;
  margin: 2px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.tag-badge:hover {
  background-color: #cce5ff;
  transform: scale(1.05);
}

.tagify__tag__removeBtn {
  color: white;
}

.popular-title {
  text-align: center;
  margin-bottom: 1em;
}

.popular-wrapper {
  min-width: 300px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5em;
  margin: 1em;
}

/* ランク表示 */
.rank {
  font-weight: bold;
  font-size: 0.8rem;
  padding: 2px 6px;
  border-radius: 6px;
}

/* 上位3位に色付け */
.ranking-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1em;
}

.ranking-table th, .ranking-table td {
  padding: 0.5em;
  border: 1px solid #ccc;
  text-align: center;
  text-decoration: none;
}

.ranking-table .gold {
  background-color: #ffd70033;
}

.ranking-table .silver {
  background-color: #c0c0c033;
}

.ranking-table .bronze {
  background-color: #cd7f3233;
}

.underline-none {
  text-decoration: none;
}
/* 詳細画面用 */
.quiz-show {
  max-width: 600px;
  margin: auto;
}

.quiz-detail-card {
  background-color: #fffef8;
  border: 2px solid #ffd43b;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  padding: 2rem;
  max-width: 600px;
  margin: 2rem auto;
  text-align: left;
  font-family: "Helvetica Neue", sans-serif;
}
.quiz-detail-card h1 {
  font-size: 3rem;
  color: #333;
  margin-bottom: 1rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
}

/* ページネーション */
.pagination{
  text-align: center;
  display: flex;
  justify-content: center;
  column-gap: 10px;
  margin: 10px;
}

.pagination span{
  text-align: center;
  font-size: 20px;
}

.pagination a{
  color: #818181;
  display: block;
  width: 100%;
  height: 100%;
  font-weight: bold;
  padding: 10px;
}

.pagination a:hover{
  height: 50px;
  background-color: #84b8eb;
  color: #FFF;
  border-radius: 10%;
}

.current{
  background-color: #fffef8;
  font-weight: bold;
  color: #5ba1e7;
  padding: 10px;
}

/* ボタン類 */
.btn,
.btn-create,
.btn-login,
.btn-sign-up,
.btn-give-up,
.btn-ai,
.btn-share {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  font-size: 0.95rem;
  border: none;
}

/* 各ボタンの色分け */
.btn {
  background-color: #ff922b;
  color: white;
}
.btn:hover {
  background-color: #e67700;
}

.btn-create {
  background-color: #40c057;
  color: white;
}
.btn-create:hover {
  background-color: #2f9e44;
}

.btn-login {
  background-color: #40c057;
  color: white;
  width: 100%;
}
.btn-login:hover {
  background-color: #2f9e44;
}

.btn-sign-up {
  background-color: #0d6efd;
  color: white;
  width: 100%;
}
.btn-sign-up:hover {
  background-color: #0b5ed7;
}

.btn-give-up {
  background-color: #fa5252;
  color: white;
}
.btn-give-up:hover {
  background-color: #e03131;
}

.btn-share {
  background-color: #111827;
  color: white;
}

.btn-share:hover {
  background-color: #3e4149;
}

.btn-ai {
  background-color: #0551f7c4;
  color: white;
}

.btn-ai:hover {
  background-color: #4781ffc4;
}

/* フォーム */
.form-group {
  margin-bottom: 1.5rem;
}
.form-control {
  width: 100%;
  max-width: 600px;
  padding: 0.6rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.search-form-wrapper {
  display: flex;
  gap: 8px; /* ボタンとの隙間 */
  padding: 0 1rem;
}

.search-form {
  max-width: 700px;
  padding: 0.6rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.search-and-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* スマホ対応 */
  margin-bottom: 1em;
}

.pagination-container {
  display: flex;
  justify-content: flex-end;
  padding: 0 1rem;
}

/* ツールチップ */
.emoji-hint-toggle {
  border: none;
  background-color: transparent;
}

.emoji-hint-toggle:hover {
  background-color: #f0f0f0;
  color: #222;
}

.emoji-hint-toggle:active {
  background-color: #e0e0e0;
  color: #000;
}

.hidden {
  display: none;
}

.emoji-tooltip {
  position: absolute;
  top: 110%; /* ボタンの下に表示 */
  left: 50%;
  transform: translateX(-50%);
  background: #444;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  color: #fffbe6;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  width: max-content;
  z-index: 100;
  white-space: normal;
  text-align: left;
  user-select: none;
}

.emoji-tooltip-arrow {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  background: #444;
  transform-origin: center;
  clip-path: polygon(0 100%, 100% 100%, 50% 0);
}

/* 認証リンク */
.auth-links {
  text-align: right;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

/* ヘッダー */
.site-header {
  background-color: #fff8dc;
  padding: 1rem 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 1rem;
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
}

.header-logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
  text-decoration: none;
}
.header-logo:hover {
  background-color: #c9c9c9;
  border-radius: 4px;
}

.terms-container {
  margin: 0 auto;
  padding: 2rem;
  line-height: 1.8;
  font-size: 16px;
  background-color: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.terms-container h2{
  color: #fc8f00
}

.line {
  border-bottom: 1px solid #ccc; /* 薄いグレーの線 */
  padding-bottom: 0.5em;
  margin-bottom: 1em;
}

.terms-title {
  font-size: 2rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 1rem;
}

.terms-updated {
  font-size: 0.9rem;
  color: #666;
  text-align: center;
  margin-bottom: 2rem;
}

.terms-list {
  padding-left: 1.5rem;
  list-style: disc;
}

.terms-footer {
  text-align: right;
  margin-top: 3rem;
  font-weight: bold;
}

/* 遊び方 */
/* 全体のコンテナ */
.how-to-play-container {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 1rem 2rem;
  font-family: sans-serif;
  color: #333;
  background-color: #fff8e1; /* サイトの背景色に合わせる */
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 各セクション */
.how-to-play-container section {
  padding: 2rem 0;
}

/* 見出し */
.how-to-play-container h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  font-weight: bold;
}
.how-to-play-container h3 {
  font-size: 1.4rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
}
.how-to-play-container h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

/* 段落 */
.how-to-play-container p {
  line-height: 1.8;
  font-size: 1rem;
}

/* 区切り線 */
.how-to-play-container hr {
  border: none;
  border-top: 2px solid #f0e6c8;
  margin: 1rem 0;
}

/* 画像のプレースホルダー */
.image-placeholder {
  width: 100%;
  background-color: #f0f0f0;
  border-radius: 12px;
  margin: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #aaa;
  overflow: hidden;
}
.image-placeholder.screenshot {
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.image-placeholder img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}
/* 注釈リスト */
.annotations {
  margin-top: 2rem;
}
.annotation-item {
  margin-bottom: 1.5rem;
}

/* ログイン機能のカード */
.features-grid {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
}
.feature-card {
  flex: 1;
  min-width: 200px;
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid #eee;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.feature-card ul {
  padding-left: 20px;
  line-height: 1.8;
}

/* 登録案内のエリア */
.cta-area {
  text-align: center;
  margin-top: 3rem;
}
.cta-message {
  font-weight: bold;
  font-size: 1.2rem;
}

/* フッター */
.footer {
  background-color: #f5f5f5;
  padding: 20px 10px;
  font-size: 14px;
  color: #333;
}

.footer-container {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-copy {
  margin-bottom: 10px;
}

.footer-links a {
  color: #1a73e8;
  text-decoration: none;
  margin: 0 10px;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* マイページ */
h2.page-header {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.edit-profile-btn {
  font-size: 14px;
  background-color: #fde047;
  color: #1f2937;
  padding: 8px 16px;
  margin: 0px 5px;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.edit-profile-btn:hover {
  background-color: #facc15;
}

.calendar-btn {
  font-size: 14px;
  background-color: #721bfd;
  color: #ffffff;
  padding: 8px 16px;
  margin: 0px 5px;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.calendar-btn:hover {
  background-color: #5b21b6;
}

section {
  margin-bottom: 30px;
}

h3.section-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #fde047;
}

.section-title {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: #444;
}

.action-container {
  display: flex;
  justify-content: center;
}

.quiz-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #ffd43b;
  border-radius: 12px;
  overflow: hidden;
  background-color: #fffef9;
  font-size: 0.95rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.quiz-table thead {
  background-color: #fff3bf;
}

.quiz-table th,
.quiz-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #f3f3f3;
  border-right: 1px solid #f3f3f3;
  color: #333;
}

.quiz-table tbody tr:hover {
  background-color: #fff9db;
  transition: background-color 0.2s ease;
}

.question-link {
  text-decoration: none;
  color: #1d4ed8;
}
.question-link:hover {
  text-decoration: underline;
}

.detail-btn {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background-color: #ff922b;
  color: white;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
}
.detail-btn:hover {
  background-color: #e67700;
}

.empty-message {
  text-align: center;
  color: #666;
  margin-top: 2rem;
  font-size: 1rem;
}

/* カレンダー */
.fade-in-container {
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.calendar {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
}
.calendar th, .calendar td {
  border: 1px solid #ddd;
  width: 14.2%;
  height: 80px;
  vertical-align: top;
  padding: 4px;
  position: relative;
}

.calendar thead tr {
  height: 24px;
  background: #f7f7f7;
}

.calendar thead th {
  height: 24px;
  line-height: 24px;
  font-weight: 600;
  font-size: 0.85rem;
  color: #333;
  padding: 2px 4px;
  text-align: center;
}

.calendar thead th:nth-child(1) { color: red; }     /* 日曜を赤 */
.calendar thead th:nth-child(7) { color: blue; }    /* 土曜を青 */

.date {
  font-size: 12px;
  position: absolute;
  top: 4px;
  left: 4px;
}
.emoji {
  font-size: 28px;
  margin-top: 20px;
}
.today {
  background-color: #fdf6e3;
}
td.not-this-month {
  background-color: #f0f0f0;
  color: #aaa;
}

/* ヒント機能 */
.hint-container {
  margin: 1em 0;
}

.hint-button {
  background-color: #4a90e2;
  color: white;
  border: none;
  padding: 0.5em 1em;
  margin: 0.5em 0;
  border-radius: 8px;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.3s;
  display: inline-block;
}

.hint-button:hover {
  background-color: #357ABD;
}

.hint-box {
  background-color: #f0f0f0;
  padding: 0.75em 1em;
  margin-bottom: 1em;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.bottom-nav {
  display: none; /* デフォルトは非表示（PCなど） */
}

/* ---------- スマホ対応 ---------- */
@media (max-width: 750px) {
  h1 {
    text-align: center;
    font-size: 1.6rem;
    margin-bottom: 2rem;
    color: #444;
  }

  .header-inner {
    flex-direction: row;
    align-items: stretch;
  }



  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-left: auto;
    flex-wrap: nowrap;
  }

  .search-and-pagination {
    flex-direction: column;
    align-items: center;
  }

  .search-and-pagination{
    display: flex;
    margin:0 0 0 auto
  }

  .search-form-wrapper,
  .pagination-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 0.5em;
  }

  .quiz-list {
    grid-template-columns: 1fr; /* スマホでは1列 */
    gap: 0.5rem;
    padding: 0.5rem;
  }

  .quiz-card {
    padding: 0.8rem;
    font-size: 0.9rem;
  }

  .quiz-card h2 {
    font-size: clamp(1rem, 6vw, 1.6rem);
  }

  .quiz-card p {
    font-size: 0.8rem;
  }

  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    border-top: 1px solid #cccccc;
    justify-content: space-around;
    padding: 15px 0;
    z-index: 1000;
    font-size: 1em;
  }

  .bottom-nav a {
    text-align: center;
    color: #333;
    text-decoration: none;
  }

  .bottom-nav a:hover {
    color: #007bff;
  }

  body {
    padding-bottom: 60px; /* ナビ分の余白を下につける */
  }
  .container {
    display: block; /* display:flex を解除し、ランキングを縦並びに戻す */
  }

  .popular-wrapper {
    min-width: none;
  }

  .search-form {
  width: 50%;
  }

  .quiz-detail-card h1 {
    font-size: 2.5rem;
  }

  .footer {
    margin-bottom: 20px;
  }

  .how-to-play-container {
    padding: 1rem;
    margin: 1rem;
  }
  .how-to-play-container h2 {
    font-size: 1.6rem;
  }
  .features-grid {
    flex-direction: column;
  }
}
