/* ============================================================
   ログイン/登録画面 専用スタイル
   メインの style.css (Inter フォント / 白背景 / 角丸ボタン) に揃える
   --
   注意: body へのレイアウト指定は .auth-page クラスで囲い、
   index.php / fav.php (漫画ビューア本体) のレイアウトを破壊しないようにする
   ============================================================ */

body.auth-page {
  margin: 0;
  padding: 20px;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f5f5f5;
  color: #1a1a1a;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  justify-content: center;
}
.auth-logo .logo-img {
  height: 56px;
  width: auto;
  display: block;
}
.auth-logo .logo-text { line-height: 1.1; text-align: center; }
.auth-logo .logo-title {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 2px;
  color: #1a1a1a;
}
.auth-logo .logo-sub {
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 3px;
  color: #1a1a1a;
}

.auth-title {
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 28px;
}

.auth-form { display: flex; flex-direction: column; gap: 16px; }

.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label {
  font-size: 13px;
  font-weight: 500;
  color: #555;
}
.auth-field input {
  height: 44px;
  border: 1.5px solid #d0d0d0;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  background: #fafafa;
}
.auth-field input:focus {
  border-color: #0088ff;
  background: white;
}

.auth-submit {
  background: #0088ff;
  color: white;
  border: none;
  border-radius: 8px;
  height: 46px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.15s;
}
.auth-submit:hover { background: #006ed9; }
.auth-submit:disabled { background: #ccc; cursor: not-allowed; }

/* 「または」区切り */
.auth-or {
  display: flex;
  align-items: center;
  text-align: center;
  color: #aaa;
  font-size: 13px;
  margin: 18px 0 14px;
}
.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e5e5;
}
.auth-or span { padding: 0 12px; }

/* ゲストボタン (セカンダリ) */
.auth-guest {
  width: 100%;
  background: #fff;
  color: #0088ff;
  border: 1.5px solid #0088ff;
  border-radius: 8px;
  height: 46px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.auth-guest:hover { background: #f0f8ff; }

.auth-guest-note {
  text-align: center;
  font-size: 12px;
  color: #888;
  margin-top: 8px;
}

.auth-error {
  background: #ffe5e5;
  border: 1px solid #ffb3b3;
  color: #c0392b;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  text-align: center;
}

.auth-success {
  background: #e6f7e6;
  border: 1px solid #a8e0a8;
  color: #2d7a2d;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  text-align: center;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: #666;
}
.auth-footer a {
  color: #0088ff;
  text-decoration: none;
  font-weight: 500;
}
.auth-footer a:hover { text-decoration: underline; }

.auth-hint {
  font-size: 12px;
  color: #888;
  margin-top: -2px;
}

/* ヘッダー右側のユーザーアバター + ドロップダウンメニュー */
.user-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.user-avatar-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #d1f2f8;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  color: #2b7d8c;
  text-transform: uppercase;
  padding: 0;
  flex-shrink: 0;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.user-avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.user-avatar-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.user-avatar-btn[aria-expanded="true"] {
  background: #0088ff;
  color: white;
}

.user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  min-width: 200px;
  z-index: 200;
  padding: 6px 0;
}
.user-menu[hidden] { display: none; }
.user-menu-name {
  padding: 10px 16px;
  font-size: 12px;
  color: #888;
  border-bottom: 1px solid #eee;
  margin-bottom: 4px;
}
.user-menu-name strong {
  display: block;
  color: #1a1a1a;
  font-weight: 600;
  font-size: 14px;
  margin-top: 2px;
  word-break: break-all;
}
.user-menu .menu-link {
  display: block;
  padding: 9px 16px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  font-family: inherit;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.user-menu .menu-link:hover { background: #f5f5f5; }
.user-menu .menu-link.danger { color: #c0392b; }
.user-menu .menu-link.danger:hover { background: #ffeaea; }
