/* ===================================== */
/* NeoHall 共通モーダルスタイル（純CSS版） */
/* ===================================== */

/* 背景レイヤー（.hiddenが付くと display:none; になるのはTailwind側） */
.modal-base {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;

  /* アニメーション */
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease-out;
}

/* 開いている状態 */
.modal-base.active {
  opacity: 1;
  pointer-events: auto;
}

/* 中央ボックス */
.modal-content {
  background-color: rgb(30, 41, 59);  /* slate-800 近似 */
  color: #fff;
  border-radius: 1rem;                 /* rounded-2xl */
  padding: 1.5rem;                     /* p-6 */
  width: 20rem;                        /* w-80 */
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);

  /* アニメーション */
  transform: scale(.95);
  transition: transform 300ms ease-out;
}

/* baseがactiveのとき拡大して出る */
.modal-base.active .modal-content {
  transform: scale(1);
}

/* タイトル */
.modal-title {
  font-size: 1.125rem; /* text-lg */
  font-weight: 600;    /* font-semibold */
  margin-bottom: 1rem; /* mb-4 */
}

/* 入力 */
.modal-input {
  width: 100%;
  padding: .25rem .5rem;               /* px-2 py-1 */
  border-radius: .375rem;              /* rounded */
  background: rgb(15,23,42);           /* slate-900 */
  border: 1px solid rgb(71,85,105);    /* slate-600 */
  color: #fff;
  font-size: .875rem;                  /* text-sm */
}

/* ボタン行 */
.modal-button-row {
  display: flex;
  justify-content: space-between;
  margin-top: 1.25rem; /* mt-5 */
}

/* ボタン（キャンセル） */
.modal-btn-cancel {
  padding: .5rem 1rem;
  background: rgb(75,85,99);           /* gray-600 */
  color: #fff;
  border-radius: .5rem;
  font-size: .875rem;
}
.modal-btn-cancel:hover {
  background: rgb(55,65,81);           /* gray-700 */
}

/* ボタン（決定） */
.modal-btn-confirm {
  padding: .5rem 1rem;
  background: rgb(5,150,105);          /* emerald-600 */
  color: #fff;
  border-radius: .5rem;
  font-size: .875rem;
}
.modal-btn-confirm:hover {
  background: rgb(4,120,87);           /* emerald-700 */
}

/* 成功メッセージ */
.success-message {
  text-align: center;
  color: rgb(52,211,153);              /* emerald-400 */
  font-size: 1.125rem;                 /* text-lg */
  font-weight: 600;                    /* font-semibold */
  margin-top: 1rem;
}

/* 拡張例 */
.modal-wide .modal-content { width: 32rem; }
.modal-alert .modal-content { background-color: rgb(153,27,27); } /* red-800相当 */


/* ======== Tailwind競合対策 ======== */
/* Tailwindのhiddenクラスはdisplay:none;なので、transition前に戻す */
.modal-base.hidden {
  display: none !important;
}
.modal-base:not(.hidden) {
  display: flex !important;
}

/* active状態でクリックを有効化 */
.modal-base.active {
  opacity: 1;
  pointer-events: auto;
}

/* 非active状態（閉じる途中）はクリック無効 */
.modal-base {
  pointer-events: none;
}

/* ===============================
   ナビバー選択状態の背景＆発光
   =============================== */
.text-active {
  color: rgb(52, 211, 153); /* emerald-400 */
  text-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* 背景も光る（親ボタンに付与される） */
.nav-active {
  background-color: rgba(16, 185, 129, 0.15); /* 薄いエメラルドの光 */
  box-shadow: inset 0 0 10px rgba(16, 185, 129, 0.4),
              0 0 8px rgba(16, 185, 129, 0.3);
  border-top: 1px solid rgba(16, 185, 129, 0.3);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* ====== 称号スタイル ====== */
.title_S, .title_A, .title_B, .title_C, .title_N1, .title_N2, .title_N3 {
  position: relative;
  display: inline-block;
  font-weight: bold;
  padding: 4px 12px;
  margin: 2px;
  color: black;
  border-radius: 8px;
  white-space: nowrap;
  overflow: hidden;
  width: calc(1em * 15);
  box-sizing: border-box;
  text-align: center;
  box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.5);
  z-index: 2;
  line-height: 1.5;
  vertical-align: middle;
}

.title_S::before, .title_A::before, .title_B::before, .title_C::before, .title_N1::before, .title_N2::before, .title_N3::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  z-index: 1;
  pointer-events: none;
}

.title_S {
  background-image: linear-gradient(150deg, rgba(247, 166, 12, 1) 10%, rgba(250, 93, 131, 1) 40%, rgba(187, 111, 243, 1) 68%, rgba(38, 106, 255, 1) 90%);
}

.title_A {
  background-image: radial-gradient(circle, rgba(255, 242, 58, 1), rgba(224, 162, 8, 1) 70%);
}

.title_B {
  background-image: radial-gradient(circle, rgba(233, 233, 233, 1), rgba(172, 172, 172, 1) 100%);
}

.title_C {
  background-image: linear-gradient(90deg, rgba(248, 134, 57, 1), rgba(97, 48, 48, 1));
}

/* 紫 */
.title_N1 {
  background-color: #b58cd9;
}

/* 青 */
.title_N2 {
  background-color: #4a90e2;
}

/* 赤 */
.title_N3 {
  background-color: #e74c3c;
}

/* ====== rateスタイル ====== */
.rateN {
  position: relative;
  display: inline-block;
  font-weight: bold;
  padding: 4px 12px;
  margin: 2px;
  color: black;
  border-radius: 8px;
  white-space: nowrap;
  overflow: hidden;
  width: calc(1em * 6 + 24px);
  min-width: calc(1em * 6 + 24px);
  box-sizing: border-box;
  text-align: center;
  box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.5);
  z-index: 2;
  line-height: 1.5;
  vertical-align: middle;
  background-image: linear-gradient(90deg, rgba(248, 134, 57, 1), rgba(97, 48, 48, 1));
}

.rateN::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  z-index: 1;
  pointer-events: none;
}

/* ====== ヘッダースタイル ====== */
/* ユーザー名の光るエフェクト */
header .userNameDisplay {
  position: relative;
  display: inline-block;
  transition: text-shadow 0.3s ease;
}

/* 店舗名の左側にログイン状態の緑の丸を表示 */
header .hallNameDisplay {
  position: relative;
  display: inline-block;
  padding-left: 0.75rem;
}

header .hallNameDisplay::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(5, 150, 105, 0.7));
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.7),
              0 0 12px rgba(16, 185, 129, 0.5),
              0 0 16px rgba(16, 185, 129, 0.3);
  animation: pulse-glow 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulse-glow {
  0%, 100% {
    opacity: 0.6;
    transform: translateY(-50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateY(-50%) scale(1.2);
  }
}

/* ヘッダーのグラデーション強化 */
header {
  background: linear-gradient(135deg, 
    rgba(30, 41, 59, 0.95) 0%,
    rgba(15, 23, 42, 0.98) 50%,
    rgba(30, 41, 59, 0.95) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* 区切り線のアニメーション */
header .h-12.w-px {
  position: relative;
}

header .h-12.w-px::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 60%;
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(148, 163, 184, 0.3) 20%,
    rgba(148, 163, 184, 0.6) 50%,
    rgba(148, 163, 184, 0.3) 80%,
    transparent 100%);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.8;
  }
}

/* 所持金の強調表示 */
.moneyDisplay {
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.5),
               0 0 20px rgba(16, 185, 129, 0.3);
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
}

.moneyDisplay:hover {
  text-shadow: 0 0 15px rgba(16, 185, 129, 0.7),
               0 0 25px rgba(16, 185, 129, 0.5);
  transform: scale(1.05);
}

/* アイコンの光るエフェクト */
.userIconDisplay {
  transition: all 0.3s ease;
  position: relative;
}

.userIconDisplay:hover {
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4),
              0 0 25px rgba(16, 185, 129, 0.2);
  transform: scale(1.05);
}

/* 称号表示の調整（ヘッダー内用） */
header .userTitleDisplay {
  color: rgb(0, 0, 0); /* 黒濃いめ */
  font-weight: 600;
}

/* ====== スマホ風メニューモーダル ====== */
.mobile-menu-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  /* タッチスクロールを有効化（モーダル内のみ） */
  touch-action: pan-y;
}

.mobile-menu-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-content {
  width: 375px;
  height: 667px;
  max-width: 90vw;
  max-height: 90vh;
  background: linear-gradient(180deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 2rem;
  border: 8px solid rgba(0, 0, 0, 0.8);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 0 0 2px rgba(0, 0, 0, 0.1) inset;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transform: scale(0.9) translateY(30px) rotateY(5deg);
  transition: transform 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-modal.active .mobile-menu-content {
  transform: scale(1) translateY(0) rotateY(0deg);
}

/* アプリ表示時はモーダル内の全領域を使用（サイズは変更しない） */

/* カメラエリア（ノッチ風） */
.mobile-menu-camera-area {
  width: 100%;
  height: 24px;
  background: rgba(60, 60, 60, 0.5);
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 26;
  flex-shrink: 0;
}

/* アプリ表示時もカメラエリアを表示 */
.mobile-menu-content.app-view-active .mobile-menu-camera-area {
  display: block;
}

/* ステータスバー */
.mobile-menu-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1.5rem;
  background: #000;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  border-bottom: 1px solid #fff;
  position: relative;
  z-index: 25; /* アプリ表示時も上に表示されるようにz-indexを上げる */
  flex-shrink: 0;
}

/* アプリ表示時もステータスバーを表示（時間表示を残す） */
.mobile-menu-content.app-view-active .mobile-menu-status-bar {
  display: flex; /* 常に表示 */
  position: relative; /* 相対配置を維持 */
  z-index: 25; /* アプリ表示エリアより上に表示 */
}

.mobile-menu-status-time {
  font-weight: 700;
}

.mobile-menu-status-icons {
  display: flex;
  gap: 0.5rem;
  font-size: 0.75rem;
  align-items: center;
}

.mobile-menu-device-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  opacity: 0.9;
}

.mobile-menu-user-type-badge {
  font-size: 0.75rem;
  opacity: 0.9;
}

/* メインコンテンツ */
.mobile-menu-body {
  flex: 1;
  overflow: hidden;
  padding: 2rem 1.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: #fff;
  position: relative;
}

/* アプリ表示時はパディングを削除 */
.mobile-menu-body.app-view-active {
  padding: 0;
}

/* アプリアイコングリッド */
.mobile-app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  width: 100%;
  max-width: 280px;
}

.mobile-app-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 0;
  position: relative;
}

.mobile-app-icon:active {
  transform: scale(0.9);
}

.mobile-app-icon-bg {
  width: 70px;
  height: 70px;
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 8px 16px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset,
    0 2px 4px rgba(255, 255, 255, 0.3) inset;
  position: relative;
  overflow: hidden;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.mobile-app-icon-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, transparent 50%);
  pointer-events: none;
}

.mobile-app-icon:hover .mobile-app-icon-bg {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 
    0 12px 24px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.3) inset,
    0 4px 8px rgba(255, 255, 255, 0.4) inset;
}

.mobile-app-icon-emoji {
  font-size: 2rem;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.mobile-app-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #1e293b;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
  letter-spacing: 0.01em;
}

/* アプリアイコンのバッジ（未読数など） */
.mobile-app-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ff3b30;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-shadow: 
    0 2px 6px rgba(255, 59, 48, 0.4),
    0 0 0 2px #fff;
  z-index: 30;
  line-height: 1;
  letter-spacing: -0.01em;
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* ホームフッター（iPhone風） */
.mobile-menu-home-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.5rem 1rem;
  background: rgba(60, 60, 60, 0.5);
  border-top: 1px solid rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 30;
  flex-shrink: 0;
  min-height: 64px;
}

/* アプリ表示時もフッターを表示 */
.mobile-menu-content.app-view-active .mobile-menu-home-footer {
  display: flex;
}

.mobile-menu-home-button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 240, 240, 0.9) 100%);
  border: 2px solid rgba(200, 200, 200, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.15),
    inset 0 1px 2px rgba(255, 255, 255, 0.8),
    inset 0 -1px 2px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  position: relative;
}

.mobile-menu-home-button::before {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
  opacity: 0.6;
}

.mobile-menu-home-button:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(250, 250, 250, 0.95) 100%);
  transform: scale(1.08);
  box-shadow: 
    0 4px 10px rgba(0, 0, 0, 0.2),
    inset 0 1px 3px rgba(255, 255, 255, 0.9),
    inset 0 -1px 3px rgba(0, 0, 0, 0.15);
  border-color: rgba(180, 180, 180, 0.5);
}

.mobile-menu-home-button:active {
  transform: scale(0.92);
  background: linear-gradient(135deg, rgba(240, 240, 240, 0.9) 0%, rgba(230, 230, 230, 0.8) 100%);
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.2),
    inset 0 2px 4px rgba(0, 0, 0, 0.1);
}


/* スクロールバーのスタイル */
.mobile-menu-body::-webkit-scrollbar {
  width: 4px;
}

.mobile-menu-body::-webkit-scrollbar-track {
  background: transparent;
}

.mobile-menu-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}

.mobile-menu-body::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* アプリ表示エリア */
.mobile-app-view {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #f5f7fa;
  z-index: 15; /* ステータスバー（z-index: 25）より下に配置 */
  border-radius: 0;
  overflow: hidden;
}

.mobile-app-view.hidden {
  display: none;
}

.mobile-app-content {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.mobile-app-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: white;
}

/* ====== ホーム画面アニメーション（削除：ちらつき防止） ====== */


