/* ログインページのスタイル */

/* 背景とメインコンテナ */
.login-page {
  min-height: 100vh;
  background-color: #667eea;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.login-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  padding: 3rem 2rem;
  width: 100%;
  max-width: 720px;
  animation: fadeInUp 0.6s ease-out;
}

/* アニメーション */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ヘッダー */
.login-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.login-title {
  font-size: 2.5rem;
  font-weight: 800;
  background-color: #667eea;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.login-subtitle {
  color: #6b7280;
  font-size: 1rem;
}

/* フォームフィールド */
.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background-color: #f9fafb;
  color: #1f2937;
}

.form-input:focus {
  outline: none;
  border-color: #667eea;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

.form-input::placeholder {
  color: #9ca3af;
}

/* エラーメッセージ */
.error-message {
  display: block;
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 0.25rem;
  animation: shake 0.3s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* ログイン状態を保持するチェックボックス */
.remember-me-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.checkbox-input {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 4px;
  border: 2px solid #d1d5db;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.checkbox-input:checked {
  background-color: #667eea;
  border-color: #667eea;
}

.checkbox-label {
  font-size: 0.875rem;
  color: #4b5563;
  cursor: pointer;
  user-select: none;
}

/* 送信ボタン */
.submit-button {
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #667eea;
  color: white;
  position: relative;
  overflow: hidden;
}

.submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.submit-button:active {
  transform: translateY(0);
  box-shadow: 0 5px 10px rgba(102, 126, 234, 0.2);
}

.submit-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.submit-button:hover::after {
  width: 300px;
  height: 300px;
}

/* アカウント作成リンク */
.signup-link-container {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
}

.signup-link-text {
  font-size: 0.875rem;
  color: #6b7280;
}

.signup-link {
  color: #667eea;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
  margin-left: 0.25rem;
}

.signup-link:hover {
  color: #5a67d8;
  text-decoration: underline;
}

/* TOPページへ戻るリンク */
.back-to-top-container {
  text-align: center;
  margin-top: 1.5rem;
}

.back-to-top-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #6b7280;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.2s ease;
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

.back-to-top-link:hover {
  color: #667eea;
  background-color: rgba(102, 126, 234, 0.1);
}

.back-to-top-link::before {
  content: "←";
  font-size: 1.125rem;
}

/* アラート */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideInLeft 0.3s ease-out;
}

.alert-error {
  background-color: #fee2e2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.alert-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* レスポンシブデザイン */
@media (max-width: 640px) {
  .login-container {
    padding: 2rem 1.5rem;
  }

  .login-title {
    font-size: 2rem;
  }

  .form-input {
    padding: 0.75rem 0.875rem;
  }
}

/* フォーカス時のアクセシビリティ */
.form-input:focus-visible,
.checkbox-input:focus-visible,
.submit-button:focus-visible,
.signup-link:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* ダークモード対応（将来の実装用） */
@media (prefers-color-scheme: dark) {
  /* ダークモードのスタイルをここに追加 */
}