﻿.auth-overlay{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  z-index: 9999;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.auth-overlay.active{
  opacity: 1;
  pointer-events: auto;
}

.auth-overlay.fade-out{
  opacity: 0;
}

.auth-modal{
  width: 320px;
  max-width: 90%;

  /* ガラス風 */
  background: rgba(22, 54, 124, 0.158);
  backdrop-filter: blur(12px);

  /* 白文字 */
  color: #fff;

  padding: 18px;

  /* 白縁取り */
  border: 1px solid rgba(255,255,255,0.6);

  border-radius: 10px;

  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  font-family: inherit;

  transform: translateY(10px);
  transition: transform 0.2s ease;
}

.auth-overlay.active .auth-modal{
  transform: translateY(0);
}

.auth-modal h2{
  margin: 0 0 8px;
  font-size: 18px;
  color: #fff;
}

.auth-modal p{
  margin: 0 0 12px;
  font-size: 14px;
  color: rgba(255,255,255,0.85);
}

.auth-modal input[type="password"]{
  width: 100%;
  box-sizing: border-box;
  padding: 8px;

  /* ガラス風入力欄 */
  background: rgba(155, 154, 161, 0.253);
  color: #fff;

  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 4px;

  margin-bottom: 8px;
  font-size: 14px;
}

.auth-modal input::placeholder{
  color: rgba(255,255,255,0.6);
}

.auth-error{
  color: #ff8080;
  font-size: 13px;
  height: 18px;
  margin-bottom: 6px;
}

.auth-actions{
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.auth-actions button{
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.5);

  /* 半透明ボタン */
  background: rgba(46, 92, 190, 0.61);
  color: #fff;

  backdrop-filter: blur(6px);
  cursor: pointer;
}

.auth-actions button:hover{
  background: rgba(255,255,255,0.35);
}

.auth-actions button.cancel{
  background: rgba(150,150,150,0.3);
}

@media (prefers-reduced-motion: reduce){
  *{
    transition: none !important;
  }
}

/* 横揺れアニメーション */
@keyframes shake {
  0%   { transform: translateX(0); }
  20%  { transform: translateX(-6px); }
  40%  { transform: translateX(6px); }
  60%  { transform: translateX(-4px); }
  80%  { transform: translateX(4px); }
  100% { transform: translateX(0); }
}

.auth-modal.shake {
  animation: shake 0.3s ease;
}