/**
 * 共通スタイル
 * シンプルで読みやすいデザイン
 */

/* リセット */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ベーススタイル */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
  padding-bottom: 60px; /* フッター分の余白 */
}

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

/* ヘッダー */
.header {
  background-color: #4A90E2;
  color: white;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header h1 {
  font-size: 24px;
  font-weight: 600;
}

.header p {
  font-size: 14px;
  margin-top: 5px;
  opacity: 0.9;
}

/* カード */
.card {
  background: white;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #333;
}

.card-subtitle {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
}

/* ボタン */
.btn {
  display: inline-block;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  margin-bottom: 12px;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

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

.btn-primary {
  background-color: #4A90E2;
  color: white;
}

.btn-primary:hover {
  background-color: #3A7BC8;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background-color: #5a6268;
}

.btn-success {
  background-color: #28a745;
  color: white;
}

.btn-success:hover {
  background-color: #218838;
}

.btn-outline {
  background-color: white;
  color: #4A90E2;
  border: 2px solid #4A90E2;
}

.btn-outline:hover {
  background-color: #4A90E2;
  color: white;
}

.btn-large {
  padding: 16px 32px;
  font-size: 18px;
}

.btn-small {
  padding: 8px 16px;
  font-size: 14px;
  width: auto;
}

/* フォーム要素 */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
  color: #333;
}

.form-help {
  display: block;
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 6px;
  transition: border-color 0.2s;
  font-family: inherit;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: #4A90E2;
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* チェックボックス・ラジオボタン */
.form-checkbox-group,
.form-radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-checkbox,
.form-radio {
  display: flex;
  align-items: center;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.form-checkbox:hover,
.form-radio:hover {
  background-color: #f8f9fa;
  border-color: #4A90E2;
}

.form-checkbox input,
.form-radio input {
  margin-right: 12px;
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.form-checkbox.selected,
.form-radio.selected {
  background-color: #E3F2FD;
  border-color: #4A90E2;
}

/* スライダー */
.form-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #ddd;
  outline: none;
  -webkit-appearance: none;
}

.form-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #4A90E2;
  cursor: pointer;
}

.form-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #4A90E2;
  cursor: pointer;
  border: none;
}

.slider-value {
  display: block;
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  color: #4A90E2;
  margin-bottom: 12px;
  margin-top: 0;
}

/* アラート・メッセージ */
.alert {
  padding: 16px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.alert-success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.alert-warning {
  background-color: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
}

.alert-danger {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.alert-info {
  background-color: #d1ecf1;
  border: 1px solid #bee5eb;
  color: #0c5460;
}

/* ローディング */
.loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

.loading::after {
  content: "...";
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%, 20% { content: "."; }
  40% { content: ".."; }
  60%, 100% { content: "..."; }
}

/* ステップインジケーター */
.step-indicator {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  padding: 0 20px;
}

.step {
  flex: 1;
  text-align: center;
  position: relative;
}

.step-number {
  display: inline-block;
  width: 36px;
  height: 36px;
  line-height: 36px;
  border-radius: 50%;
  background-color: #ddd;
  color: #666;
  font-weight: 600;
  margin-bottom: 8px;
}

.step.active .step-number {
  background-color: #4A90E2;
  color: white;
}

.step.completed .step-number {
  background-color: #28a745;
  color: white;
}

.step-label {
  font-size: 12px;
  color: #666;
}

.step.active .step-label {
  color: #4A90E2;
  font-weight: 600;
}

/* ユーティリティクラス */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.hidden { display: none; }

/* レスポンシブ */
@media (max-width: 600px) {
  body {
    font-size: 14px;
  }
  
  .container {
    padding: 12px;
  }
  
  .header h1 {
    font-size: 20px;
  }
  
  .card {
    padding: 16px;
  }
  
  .card-title {
    font-size: 18px;
  }
  
  .btn {
    padding: 10px 20px;
    font-size: 14px;
  }
  
  .step-indicator {
    padding: 0;
  }
  
  .step-label {
    font-size: 10px;
  }
}
