/* ========================================================
   簡易パスワード認証用スタイルシート (assets/auth.css)
   ======================================================== */

/* 認証前のコンテンツ非表示・スクロール抑制（チラ見え完全防止） */
html.auth-locked {
  overflow: hidden !important;
  height: 100% !important;
}

html.auth-locked body {
  overflow: hidden !important;
  height: 100% !important;
  margin: 0 !important;
}

html.auth-locked body > *:not(#auth-gate-modal) {
  display: none !important;
}

/* 認証ゲート 全画面オーバーレイ */
#auth-gate-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at 50% 30%, #172554 0%, #090d16 100%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  color: #e2e8f0;
  box-sizing: border-box;
}

/* モーダルカード（ガラスモーフィズム） */
.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(56, 189, 248, 0.1);
  text-align: center;
  animation: authFadeIn 0.3s ease-out forwards;
}

@keyframes authFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ロックアイコン バッジ */
.auth-icon-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px auto;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(99, 102, 241, 0.25));
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}

.auth-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0 0 26px 0;
}

/* 入力フォームコンテナ */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.auth-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 44px 13px 16px;
  background: #0f172a;
  border: 1.5px solid #334155;
  border-radius: 10px;
  color: #ffffff;
  font-size: 1rem;
  outline: none;
  transition: all 0.2s ease;
}

.auth-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

/* パスワード表示トグルボタン */
.auth-toggle-pwd {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.auth-toggle-pwd:hover {
  color: #94a3b8;
}

/* 送信ボタン */
.auth-submit-btn {
  width: 100%;
  padding: 13px 20px;
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.auth-submit-btn:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
  transform: translateY(-1px);
}

.auth-submit-btn:active {
  transform: translateY(0);
}

/* エラーメッセージ */
.auth-error {
  display: none;
  font-size: 0.85rem;
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  padding: 10px 14px;
  border-radius: 8px;
  text-align: center;
}

/* シェイクアニメーション（パスワード間違い時） */
.auth-shake {
  animation: authShake 0.4s ease-in-out;
}

@keyframes authShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* 控えめな再ロック（ログアウト）ボタン（画面右下に常駐） */
#auth-lock-btn {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #94a3b8;
  padding: 8px 14px;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

#auth-lock-btn:hover {
  color: #ffffff;
  background: rgba(30, 41, 59, 0.95);
  border-color: #38bdf8;
  transform: translateY(-2px);
}
