/* 基本設定 */
:root {
  /* ピンク紫系からグリーン系へ変更 */
  --primary-color: #4a7c59;
  /* グリーン系プライマリ */
  --primary-light: #5a9b6a;
  --primary-dark: #3a6347;
  --secondary-color: #5b8c68;
  --accent-color: #7bb389;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --info-color: #4a7c59;
  --light-bg: #f8fdf9;
  --border-radius: 12px;
  --box-shadow: 0 4px 12px rgba(74, 124, 89, 0.15);
  --gradient-primary: linear-gradient(135deg, #4a7c59 0%, #5b8c68 100%);
  --gradient-light: linear-gradient(135deg, #f8fdf9 0%, #edf5ef 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Noto Sans JP", "Noto Sans", sans-serif;
  margin: 0;
  padding: 0;
  background: var(--gradient-light);
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  height: 100px;
  box-sizing: border-box;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.logo {
  height: 100px;
  font-size: 24px;
  font-weight: bold;
  transition: transform 0.3s ease;
}

.logo img {
  height: 120%;
  width: auto;
  margin-top: 20px;
}

.logo:hover {
  transform: scale(1.02);
}

.page-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.content-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  /* ロゴによる押し下げを相殺 */
  margin-top: 0;
}

/* ログインエリアのカードスタイル */
.auth-container {
  width: 500px;
  max-width: 95vw;
  padding: 0;
  margin: 0;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(74, 124, 89, 0.15);
  /* グリーン系 */
  background: white;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  /* 画像の配置に合わせる */
  position: relative;
  top: 0;
}

.auth-container:hover {
  box-shadow: 0 15px 40px rgba(74, 124, 89, 0.2);
  /* グリーン系 */
}

/* ヘッダー部分 */
.auth-header {
  background: var(--gradient-primary);
  /* グリーン系 */
  color: white;
  padding: 25px 30px;
  border-bottom: none;
}

.auth-title {
  font-size: 1.8rem;
  color: white;
  margin: 0;
  text-align: center;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.auth-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 8px 0 0 0;
  text-align: center;
  line-height: 1.5;
  font-weight: 400;
}

/* コンテンツエリア */
.auth-content {
  padding: 30px;
  position: relative;
}

/* ログインフォームセクション (ID/PW関連のスタイルは削除) */

.input-group {
  margin-bottom: 20px;
  position: relative;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  color: #34495e;
  font-weight: 500;
  font-size: 14px;
}

.input-group input {
  width: 100%;
  padding: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: #fff;
}

.input-group input:hover {
  border-color: #bdc3c7;
}

.input-group input:focus {
  border-color: var(--primary-color);
  /* グリーン系 */
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.2);
  /* グリーン系 */
}

/* ID/PW関連の不要なスタイルを削除: .password-input-wrapper, .password-toggle, .password-reset */

.error-message {
  color: #e74c3c;
  font-size: 12px;
  margin-top: 5px;
  display: none;
}

.input-group.error .error-message {
  display: block;
}

.submit-btn {
  background: var(--primary-color);
  /* グリーン系 */
  color: white;
  padding: 15px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  width: 100%;
  margin-top: 15px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.submit-btn:hover:not(:disabled) {
  background: var(--primary-dark);
  /* グリーン系 */
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(74, 124, 89, 0.3);
  /* グリーン系 */
}

.submit-btn:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: none;
}

.submit-btn:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
  transform: none;
}

/* アラートとスピナーのスタイルは維持 */
.alert {
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  display: none;
}

.alert-success {
  background: #e8f5e8;
  color: #2d5a2d;
  border: 1px solid #c3e6c3;
}

.alert-error {
  background: #fce8e8;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #ffffff40;
  border-top: 2px solid #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* 言語切替ボタン (位置は画像通り右上に配置) */
.lang-switcher {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  border-radius: 25px;
  padding: 5px;
  box-shadow: 0 4px 15px rgba(74, 124, 89, 0.1);
  /* グリーン系 */
  z-index: 1000;
}

.lang-btn {
  background: none;
  border: none;
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.3s ease;
  color: #7f8c8d;
}

.lang-btn.active {
  background: var(--primary-color);
  /* グリーン系 */
  color: white;
}

/* モーダルスタイル (未使用だが残存) */
/* ... */

/* ログアウト通知 (未使用だが残存) */
/* ... */

/* 背景画像 */
.background-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-image: url('../image-data/bgphoto.jpg');
  background-size: cover;
  background-position: left top;
  opacity: 0.5;
  z-index: -1;
}

/* アニメーション */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* ログインステップ関連 (メール認証に一本化のため、不要なクラスを削除/調整) */
.email-step,
.code-step {
  /* 初期表示 */
  display: block;
}

.email-step.active,
.code-step.active {
  /* アクティブなステップのみ表示 */
  display: block;
  animation: none;
  /* ステップアニメーションは不要なため削除 */
  position: static;
  opacity: 1;
  transform: none;
}

/* ステップ切替時のアニメーション関連のスタイルは削除 */

/* メール認証ステップ2のメッセージ */
.code-sent-info {
  background: #e8f4fd;
  border: 1px solid #d0e7d7;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  color: #387046;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.code-sent-info i {
  color: var(--info-color);
  margin-right: 5px;
}

.resend-link {
  background: none;
  border: none;
  color: var(--primary-color);
  font-weight: 500;
  cursor: pointer;
  transition: color 0.3s;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 4px;
}

.resend-link:hover {
  color: var(--primary-dark);
}

/* レスポンシブ対応 */
@media (max-width: 960px) {
  .auth-container {
    width: calc(100% - 40px);
    margin: 0 20px 40px;
  }
}

@media (max-width: 768px) {
  .auth-container {
    width: calc(100% - 20px);
    margin: 0 10px 40px;
  }

  .auth-header {
    padding: 20px 25px;
  }

  .auth-content {
    padding: 25px;
  }

  .auth-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  header {
    height: auto;
    padding: 15px 20px;
  }

  .logo img {
    height: 80px;
    margin-top: 10px;
  }

  .auth-container {
    width: calc(100% - 20px);
    margin: 0 10px 40px;
  }

  .auth-header {
    padding: 20px;
  }

  .auth-content {
    padding: 20px;
  }

  .auth-title {
    font-size: 1.3rem;
    flex-direction: column;
    gap: 8px;
  }

  .auth-subtitle {
    font-size: 0.9rem;
  }

  .input-group input {
    padding: 12px;
    font-size: 14px;
  }

  .submit-btn {
    padding: 12px 16px;
    font-size: 14px;
  }

  .lang-switcher {
    top: 15px;
    right: 15px;
  }

  .lang-btn {
    padding: 6px 12px;
    font-size: 11px;
  }
}