/* ===== ベース ===== */
:root{
  --brand: #e53935;          /* 赤（ブランド） */
  --brand-dark: #e53935;
  --accent: #f1712c;
  --text: #2c3e50;
  --muted: #555;
  --border: #ddd;
  --success: #27ae60;
  --error: #e74c3c;
  --card-shadow: rgba(0,0,0,0.08);
}

*{ box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, #ece9e6, #ffffff);
}

/* ===== ナビゲーション ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background-color: #ffffffcc;
  backdrop-filter: saturate(180%) blur(10px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.logo { height: 28px; width: auto; }
.nav-text { font-size: 18px; font-weight: 700; color: var(--text); }

/* ===== レイアウト ===== */
.registration-wrapper {
  max-width: 560px;
  margin: 56px auto 40px;
  padding: 0 16px;
}
.card {
  background: #fff;
  border-radius: 16px;
  padding: 28px 28px 32px;
  box-shadow: 0 10px 25px var(--card-shadow);
  animation: fadeIn 0.5s ease;
  text-align: left;
}
.card h1 { margin: 0 0 8px; font-size: 26px; line-height: 1.3; }
.lead { margin: 0 0 20px; color: var(--muted); font-size: 14px; }

/* ===== アラート ===== */
.alert { margin: 8px 0 16px; padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.alert.success { color: #0f5132; background: #d1e7dd; border: 1px solid #badbcc; }
.alert.error   { color: #842029; background: #f8d7da; border: 1px solid #f5c2c7; }

/* ===== フォーム ===== */
.registration-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.registration-form label { font-weight: 600; font-size: 14px; }

/* ▼ 入力の見た目（password表示時にtype=textでも同じ見た目にする） */
.registration-form input[type="email"],
.registration-form input[type="password"],
.registration-form .password-field input[type="text"] {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  transition: all .2s ease;
}

/* ▼ フォーカス時の見た目（type=textでも同じ） */
.registration-form input[type="email"]:focus,
.registration-form input[type="password"]:focus,
.registration-form .password-field input[type="text"]:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

/* パスワード表示トグル */
.password-field { position: relative; }
/* ▼ トグル分の余白を常時確保（表示/隠すでずれない） */
.password-field input { padding-right: 72px; }

.password-field .toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  font-size: 13px;
  cursor: pointer;
  color: var(--brand);
  padding: 6px 8px;
  border-radius: 8px;
}
.password-field .toggle:hover { background: rgba(13,110,253,0.08); }

/* インラインエラー */
.inline-error { color: var(--error); font-size: 13px; margin-top: -6px; }

/* 送信ボタン */
.submit-btn {
  margin-top: 6px;
  width: 100%;
  padding: 12px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background: linear-gradient(90deg, var(--brand), var(--brand-dark));
  box-shadow: 0 6px 16px rgba(13,110,253,0.25);
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
}
.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(11,94,215,0.28);
  filter: brightness(1.02);
}

/* 補助リンク */
.aux-links { margin-top: 12px; text-align: center; }
.aux-links a {
  color: var(--brand);
  text-decoration: none;
  position: relative;
  font-size: 14px;
}
.aux-links a::after {
  content: "";
  position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: var(--brand);
  transform: scaleX(0); transform-origin: right;
  transition: transform .25s ease;
}
.aux-links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* アニメ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== レスポンシブ ===== */
@media (max-width: 768px) {
  .navbar { padding: 10px 16px; }
  .logo { height: 26px; }
  .registration-wrapper { margin: 48px auto 32px; }
  .card { padding: 24px; }
  .card h1 { font-size: 24px; }
}
@media (max-width: 480px) {
  .logo { height: 24px; }
  .nav-text { font-size: 16px; }
  .card { padding: 20px; border-radius: 14px; }
  .card h1 { font-size: 22px; }
  .registration-form input[type="email"],
  .registration-form input[type="password"],
  .registration-form .password-field input[type="text"] {
    font-size: 16px; /* モバイルでのタップしやすさ */
  }
  .submit-btn { font-size: 15px; }
}
