/* ==========================================
   仏タイピング - 共通スタイル (style.css 完全版)
   ========================================== */

:root {
  --bg-main: #f4f6f9;
  --bg-admin-main: #eef2f7;
  --primary-blue: #3b82f6;
  --primary-blue-hover: #2563eb;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --border-color: #d1d5db;
  --modal-bg: rgba(0, 0, 0, 0.5);
  --warning-yellow: #fef08a;
  --danger-red: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 共通ボタン（角の尖っていない丸みを帯びた四角いボタン） */
.btn-primary {
  background-color: var(--primary-blue);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-primary:hover {
  background-color: var(--primary-blue-hover);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-secondary:hover {
  background-color: #f3f4f6;
}

/* ==========================================
   ボタン内アイコン用スタイル追加
   ========================================== */
.menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px; /* アイコンと文字の間隔 */
}

.menu-btn img.btn-icon {
  width: 20px;  /* アイコンの幅 */
  height: 20px; /* アイコンの高さ */
  object-fit: contain;
}

/* ==========================================
   ヘッダー関連スタイル
   ========================================== */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 32px;
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  position: relative;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.header-logo {
  width: 32px;
  height: 32px;
  display: block;
}

/* 中央ナビゲーション（FAQ・お問い合わせ・アップデート情報） */
.header-nav .nav-list {
  display: flex;
  gap: 28px;
  list-style: none;
}

.header-nav .nav-link {
  text-decoration: none;
  color: #374151;
  font-weight: 500;
  font-size: 14px;
  transition: color 0.2s;
}

.header-nav .nav-link:hover {
  color: var(--primary-blue);
}

/* 右側（ベルマーク・通知領域） */
.header-right {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.bell-container {
  cursor: pointer;
  position: relative;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bell-icon {
  font-size: 20px;
  color: #eab308; /* 黄色いベルマーク */
}

.unread-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  background-color: var(--danger-red);
  color: #ffffff;
  font-size: 10px;
  font-weight: bold;
  padding: 1px 5px;
  border-radius: 9999px;
  line-height: 1.2;
}

/* 通知ポップアップ */
.notification-dropdown {
  position: absolute;
  right: 0;
  top: 45px;
  width: 320px;
  background-color: #1e293b;
  color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  display: none;
  z-index: 1000;
  overflow: hidden;
}

.notification-dropdown.active {
  display: block;
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  font-weight: bold;
  font-size: 14px;
}

.mark-all-read {
  color: #38bdf8; /* 水色 */
  font-size: 12px;
  cursor: pointer;
}

.notification-divider {
  height: 1px;
  background-color: #334155;
  width: 100%;
}

.notification-body {
  padding: 30px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}

.notification-empty-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.notification-empty-icon {
  font-size: 28px;
  margin-bottom: 8px;
  color: #64748b;
}

.notification-empty-text {
  color: #94a3b8;
  font-size: 13px;
}

.notification-footer {
  padding: 12px;
  text-align: center;
}

.view-all-notifications {
  color: #38bdf8;
  font-size: 13px;
  text-decoration: none;
}

/* ==========================================
   Cookie同意バナー関連スタイル
   ========================================== */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
  z-index: 2000;
}

.cookie-text {
  color: var(--text-muted);
  font-size: 13px;
  max-width: 70%;
}

.cookie-buttons {
  display: flex;
  gap: 10px;
}

/* ==========================================
   フッター関連スタイル
   ========================================== */

.site-footer {
  background-color: #ffffff;
  border-top: 1px solid #e5e7eb;
  padding: 24px 32px;
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo {
  width: 24px;
  height: 24px;
  display: block;
}

.footer-brand {
  font-weight: bold;
  font-size: 14px;
  color: #374151;
}

.footer-nav {
  display: flex;
  gap: 24px;
  list-style: none;
  align-items: center;
}

.footer-link {
  text-decoration: none;
  color: #6b7280;
  font-size: 13px;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--primary-blue);
}

.cookie-manage-btn {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.cookie-manage-btn:hover {
  color: var(--primary-blue);
}

.footer-right p {
  font-size: 12px;
  color: #9ca3af;
}

/* ==========================================
   プレイデータ削除・モーダル関連スタイル追加
   ========================================== */

/* モーダルの背景オーバーレイ（背景を暗くして全体を覆う） */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vw;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3000;
}

/* モーダルのコンテンツボックス */
.modal-content {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  position: relative;
  box-sizing: border-box;
}

/* ==========================================
   ランク一覧モーダル・ランクカード専用スタイル（添付画像完全再現・拡張）
   ========================================== */

.rank-modal-container {
  background: linear-gradient(135deg, #161b26 0%, #0d1117 100%);
  border: 1px solid #30363d;
  border-radius: 16px;
  padding: 24px 32px;
  width: 720px;
  max-width: 95vw;
  color: #c9d1d9;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  position: relative;
}

.rank-modal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  position: relative;
}

.rank-modal-title-box {
  background: linear-gradient(180deg, #21262d 0%, #161b26 100%);
  border: 2px solid #3b82f6;
  border-radius: 30px;
  padding: 8px 36px;
  font-weight: bold;
  font-size: 16px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
  position: relative;
}

.rank-modal-title-box::before,
.rank-modal-title-box::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  background: #3b82f6;
  position: absolute;
  top: 50%;
}
.rank-modal-title-box::before { left: -50px; }
.rank-modal-title-box::after { right: -50px; }

/* 2カラムレイアウト（10個ずつ左右配置） */
.rank-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  margin-bottom: 24px;
}

/* 各ランクカードの共通ベース（カプセル状デザイン） */
.rank-card-item {
  background: linear-gradient(180deg, rgba(33, 38, 45, 0.9) 0%, rgba(22, 27, 34, 0.95) 100%);
  border: 1.5px solid #3b82f6;
  border-radius: 9999px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 2px 5px rgba(0,0,0,0.3);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.rank-card-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.rank-card-id {
  font-weight: bold;
  color: #93c5fd;
  min-width: 24px;
}

.rank-card-name {
  flex-grow: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 10px;
}

/* スマイルエキスパート階層（10〜20）および個別ランクごとの専用グラデーション・演出デザイン */
.rank-card-item[data-id="9"] {
  border-color: #38bdf8;
  background: linear-gradient(90deg, #0f172a, #1e3a8a, #0f172a);
}

/* 10: ネオンスマイルエキスパート (ネオンシアン発光) */
.rank-card-item[data-id="10"] {
  border-color: #06b6d4;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.6), inset 0 0 8px rgba(6, 182, 212, 0.3);
}

/* 11: バーストスマイルエキスパート (オレンジバースト) */
.rank-card-item[data-id="11"] {
  border-color: #f97316;
  background: linear-gradient(135deg, #2a1508, #161b26);
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.5);
}

/* 12: フラッシュスマイルエキスパート (光／閃光の線エフェクト搭載) */
.rank-card-item[data-id="12"] {
  border-color: #facc15;
  background: linear-gradient(135deg, #1f2430 0%, #3d3412 50%, #1f2430 100%);
  box-shadow: 0 0 15px rgba(250, 204, 21, 0.6);
}
.rank-card-item[data-id="12"]::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(60deg, transparent 40%, rgba(255, 255, 255, 0.3) 50%, transparent 60%);
  transform: rotate(25deg);
  animation: flashSweep 3s infinite linear;
  pointer-events: none;
}
@keyframes flashSweep {
  0% { transform: translateX(-100%) rotate(25deg); }
  100% { transform: translateX(100%) rotate(25deg); }
}

/* 13: ボルトスマイルエキスパート (雷光パープル) */
.rank-card-item[data-id="13"] {
  border-color: #c084fc;
  background: linear-gradient(135deg, #1e1b4b, #161b26);
  box-shadow: 0 0 12px rgba(192, 132, 252, 0.5);
}

/* 14: インフィニティスマイルエキスパート (無限ループエメラルド) */
.rank-card-item[data-id="14"] {
  border-color: #34d399;
  background: linear-gradient(135deg, #064e3b, #161b26);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.5);
}

/* 15: アルティメットスマイルエキスパート (究極ゴールド) */
.rank-card-item[data-id="15"] {
  border-color: #fbbf24;
  background: linear-gradient(135deg, #451a03, #161b26);
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.7);
}

/* 16: ブレイカースマイルエキスパート (真紅クラッシュ) */
.rank-card-item[data-id="16"] {
  border-color: #f87171;
  background: linear-gradient(135deg, #450a0a, #161b26);
  box-shadow: 0 0 15px rgba(248, 113, 113, 0.7);
}

/* 17: 絶・スマイルエキスパート (漆黒と鮮烈な青光) */
.rank-card-item[data-id="17"] {
  border-color: #60a5fa;
  background: radial-gradient(circle, #1e3a8a 0%, #090d16 100%);
  box-shadow: 0 0 18px rgba(96, 165, 250, 0.8);
}

/* 18: 帝・スマイルエキスパート (高貴なロイヤルパープル光) */
.rank-card-item[data-id="18"] {
  border-color: #e879f9;
  background: radial-gradient(circle, #581c87 0%, #0d1117 100%);
  box-shadow: 0 0 18px rgba(232, 121, 249, 0.8);
}

/* 19: 超・スマイルエキスパート (超次元レインボーシマー) */
.rank-card-item[data-id="19"] {
  border: 2px solid transparent;
  background: linear-gradient(#161b26, #161b26) padding-box, linear-gradient(45deg, #f43f5e, #8b5cf6, #3b82f6, #10b981) border-box;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.8);
}

/* 20: 世界を笑顔にする覇者 (最高峰太陽光ゴールドフレア) */
.rank-card-item[data-id="20"] {
  border: 2px solid #ffd700;
  background: linear-gradient(135deg, #78350f, #1c1917, #78350f);
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.9), inset 0 0 12px rgba(255, 215, 0, 0.5);
  animation: supremeGlow 2.5s infinite alternate;
}
@keyframes supremeGlow {
  0% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.6); }
  100% { box-shadow: 0 0 25px rgba(255, 215, 0, 0.95), inset 0 0 15px rgba(255, 215, 0, 0.6); }
}

/* モーダル下部の注意書きテキスト（指定文言に変更） */
.rank-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}

.rank-modal-notice {
  font-size: 12px;
  color: #8b949e;
}

.rank-modal-close-btn {
  background: linear-gradient(180deg, #21262d 0%, #161b26 100%);
  border: 1.5px solid #3b82f6;
  border-radius: 8px;
  color: #ffffff;
  padding: 8px 24px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  transition: background 0.2s;
}

.rank-modal-close-btn:hover {
  background: #30363d;
}

/* ==========================================
   ベストタイム更新ハンコ（スタンプ）用スタイル
   ========================================== */
.best-record-stamp {
  position: absolute;
  top: 15px;
  right: 15px;
  border: 3px solid #ef4444;
  color: #ef4444;
  font-size: 15px;
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 6px;
  transform: rotate(-12deg);
  letter-spacing: 1px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  background-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.2);
  z-index: 10;
}

.best-record-stamp.show {
  opacity: 1;
}