/* リセットと基本設定 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 変数定義 - 足立電機のブランドカラー */
:root {
  --primary-color: #005bac;
  --primary-dark: #004494;
  --text-color: #333;
  --text-light: #666;
  --bg-color: #f8f9fa;
  --white: #ffffff;
  --border-color: #ddd;
  --success-bg: #e6fffa;
  --success-border: #38b2ac;
  --success-text: #234e52;
  --error-bg: #fff5f5;
  --error-border: #fc8181;
  --error-text: #742a2a;
}

/* 基本スタイル */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Meiryo', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  min-height: 100vh;
}

/* コンテナ */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* タイトル */
h1 {
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 10px;
  text-align: center;
  font-weight: 700;
}

.subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 40px;
}

/* カード（フォーム・メッセージ共通） */
.card {
  background: var(--white);
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* フォームグループ */
.form-group {
  margin-bottom: 24px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-color);
}

.required {
  color: #e53e3e;
  margin-left: 4px;
}

/* フォーム要素 */
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 91, 172, 0.1);
}

textarea {
  min-height: 150px;
  resize: vertical;
}

.form-note {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 4px;
}

/* ボタン */
.button-group {
  text-align: center;
  margin-top: 32px;
}

.button {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--white);
  border: none;
  padding: 16px 48px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: inline-block;
  text-decoration: none;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 91, 172, 0.3);
}

.button:active {
  transform: translateY(0);
}

/* セカンダリボタン（修正ボタン用） */
.button-secondary {
  background: #e2e8f0;
  color: #4a5568;
}

.button-secondary:hover {
  background: #cbd5e0;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* リンク */
.back-link {
  text-align: center;
  margin-top: 20px;
}

.back-link a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.back-link a:hover {
  text-decoration: underline;
}

/* 成功ページ用 */
.success-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.success-icon svg {
  width: 40px;
  height: 40px;
  color: var(--white);
}

.message {
  color: var(--text-light);
  margin-bottom: 32px;
  line-height: 1.8;
}

.note {
  background: #f0f7ff;
  padding: 16px;
  border-radius: 4px;
  font-size: 14px;
  color: var(--primary-dark);
  margin-bottom: 32px;
}

/* エラーメッセージ */
.error-message {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error-text);
  padding: 16px;
  border-radius: 4px;
  margin-bottom: 24px;
}

.error-message ul {
  margin: 0;
  padding-left: 20px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .container {
      padding: 20px 15px;
  }
  
  .card {
      padding: 24px;
  }
  
  h1 {
      font-size: 1.5rem;
  }
  
  .button {
      width: 100%;
      padding: 16px 24px;
  }
}

/* ローディングアニメーション */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--bg-color);
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 10px;
}