/* リセットとベーススタイル */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: #333;
  margin: 0;
  padding: 20px 0;
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 700px;
  margin: 0 auto;
  background: white;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  border-radius: 15px;
  position: relative;
  overflow: hidden;
}

.container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 2px solid #f0f0f0;
}

.logo {
  max-height: 80px;
  max-width: 100%;
  width: auto;
  height: auto;
  margin-bottom: 20px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
  object-fit: contain;
}

h1 {
  font-size: 1.8rem;
  color: #2c3e50;
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.5px;
}

h2 {
  font-size: 1.4rem;
  color: #2c3e50;
  margin-top: 30px;
  margin-bottom: 20px;
  font-weight: 600;
}

/* フォーム要素のスタイル */
label {
  display: block;
  margin-bottom: 20px;
  font-weight: 500;
  color: #34495e;
  position: relative;
}

label::after {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  width: 0;
  transition: width 0.3s ease;
  margin-top: 5px;
}

label:focus-within::after {
  width: 100%;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 12px 15px;
  box-sizing: border-box;
  margin-top: 8px;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: #fafbfc;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 16px;
  padding-right: 45px;
}

textarea {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
}

/* チェックボックススタイル */
.course-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 8px;
  padding: 15px;
  background: #f8f9fa;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.course-checkboxes:hover {
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.checkbox-item:hover {
  background: rgba(102, 126, 234, 0.05);
  border-radius: 6px;
  padding-left: 8px;
  padding-right: 8px;
}

.checkbox-item input[type="checkbox"] {
  width: auto;
  margin: 0;
  cursor: pointer;
  transform: scale(1.2);
}

.checkbox-item input[type="checkbox"]:checked + label {
  color: #667eea;
  font-weight: 600;
}

.checkbox-item input[type="checkbox"]:checked {
  accent-color: #667eea;
}

.checkbox-item label {
  margin: 0;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  color: #495057;
  transition: color 0.3s ease;
}

.checkbox-item label::after {
  display: none;
}

/* 郵便番号検索コンテナ */
.postal-code-container {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.postal-code-container input[type="text"] {
  flex: 1;
  margin-top: 0;
}

.search-btn {
  padding: 12px 20px;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(40, 167, 69, 0.3);
  margin-top: 0;
  width: auto;
}

.search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

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

.search-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

button {
  display: block;
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
  margin-top: 30px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

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

.required {
  color: #e74c3c;
  font-weight: bold;
  margin-left: 2px;
}

/* 注意書きテキストのスタイル */
.notice-text {
  font-size: 0.875em; /* 2ポイント小さく */
  line-height: 1.6;
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #667eea;
}

.notice-text p {
  margin: 0 0 12px 0;
  color: #495057;
}

.notice-text p:last-child {
  margin-bottom: 0;
}

.rules-link {
  color: #007bff;
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.3s ease;
}

.rules-link:hover {
  color: #0056b3;
  text-decoration: none;
}

.email-link {
  color: #007bff;
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.3s ease;
}

.email-link:hover {
  color: #0056b3;
  text-decoration: none;
}

.email-button {
  background: none;
  border: none;
  color: #007bff;
  text-decoration: underline;
  font-size: inherit;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  margin: 0;
  font-weight: 500;
  transition: color 0.3s ease;
}

.email-button:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* 確認画面と完了画面のスタイル */
.confirm-message {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 30px;
  border-left: 4px solid #2196f3;
  box-shadow: 0 2px 10px rgba(33, 150, 243, 0.1);
}

.complete-message {
  background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
  padding: 25px;
  border-radius: 10px;
  margin-bottom: 30px;
  text-align: center;
  border-left: 4px solid #4caf50;
  box-shadow: 0 2px 10px rgba(76, 175, 80, 0.1);
}

.complete-message p {
  margin: 10px 0;
  font-size: 16px;
}

.confirmation-details,
.submission-details {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 25px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border: 1px solid #e9ecef;
}

dl {
  margin: 0;
}

dt {
  font-weight: 600;
  color: #495057;
  margin-top: 20px;
  margin-bottom: 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

dt:first-child {
  margin-top: 0;
}

dd {
  margin: 0 0 15px 0;
  padding: 12px 15px;
  background: white;
  border-radius: 6px;
  border-left: 3px solid #667eea;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  font-size: 16px;
}

.back-link {
  text-align: center;
  margin-top: 40px;
}

.back-link a {
  color: #667eea;
  text-decoration: none;
  padding: 12px 25px;
  border: 2px solid #667eea;
  border-radius: 8px;
  display: inline-block;
  font-weight: 500;
  transition: all 0.3s ease;
  background: white;
}

.back-link a:hover {
  background: #667eea;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
  .container {
    width: 95%;
    padding: 25px;
    margin: 10px auto;
  }
  
  h1 {
    font-size: 1.5rem;
  }
  
  .logo {
    max-height: 60px;
    max-width: 90%;
  }
  
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  select,
  textarea {
    font-size: 16px; /* iOSでズームを防ぐ */
  }
  
  button {
    padding: 18px;
    font-size: 16px;
  }
  
  .postal-code-container {
    flex-direction: column;
    gap: 8px;
  }
  
  .search-btn {
    width: 100%;
    padding: 12px;
  }
  
  .course-checkboxes {
    padding: 12px;
  }
  
  .checkbox-item {
    padding: 3px 0;
  }
}

@media (max-width: 480px) {
  .container {
    width: 98%;
    padding: 20px;
    margin: 5px auto;
  }
  
  .logo {
    max-height: 50px;
    max-width: 85%;
  }
  
  h1 {
    font-size: 1.3rem;
  }
  
  header {
    margin-bottom: 30px;
    padding-bottom: 20px;
  }
}

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

.container {
  animation: fadeInUp 0.6s ease-out;
}

/* フォーカス時の視覚的フィードバック */
input:focus,
select:focus,
textarea:focus {
  animation: pulse 0.3s ease-in-out;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}
