/* Registration Page Styles */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&family=Noto+Serif+JP:wght@400;700&family=Inter:wght@300;400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans JP', 'Inter', sans-serif;
  background: #F0EDE6;
  color: #1A1A2E;
  min-height: 100vh;
}

/* Registration Header */
.reg-header {
  background: linear-gradient(135deg, #0D1B3E 0%, #1B2B5E 60%, #C8102E 100%);
  padding: 60px 0 80px;
  position: relative;
  overflow: hidden;
}

.reg-header::before {
  content: '登録';
  position: absolute;
  right: 40px; bottom: -40px;
  font-family: 'Noto Serif JP', serif;
  font-size: 180px;
  font-weight: 900;
  color: rgba(255,255,255,0.04);
  pointer-events: none;
  line-height: 1;
}

.reg-header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}

.reg-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 28px;
  transition: color 0.3s;
}

.reg-back-link:hover { color: rgba(255,255,255,0.9); }

.reg-header-logos {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.reg-header-logos .logo-card {
  background: white;
  border-radius: 10px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
}

.reg-header-logos img {
  max-height: 36px;
  max-width: 120px;
  object-fit: contain;
}

.reg-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 700;
  color: white;
  line-height: 1.3;
  margin-bottom: 12px;
}

.reg-subtitle {
  font-size: 15px;
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
}

.reg-event-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.reg-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.75);
}

.reg-meta-item span:first-child { font-size: 16px; }

/* Form Container */
.reg-container {
  max-width: 900px;
  margin: -32px auto 60px;
  padding: 0 32px;
  position: relative;
  z-index: 2;
}

.reg-form-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
  overflow: hidden;
}

.reg-form-section {
  padding: 40px 48px;
  border-bottom: 1px solid rgba(0,0,0,0.07);
}

.reg-form-section:last-child { border-bottom: none; }

.reg-section-title {
  font-size: 18px;
  font-weight: 700;
  color: #0D1B3E;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.reg-section-title::before {
  content: '';
  width: 4px;
  height: 20px;
  background: #C8102E;
  border-radius: 2px;
}

.reg-section-sub {
  font-size: 13px;
  color: #888;
  margin-bottom: 28px;
}

/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  letter-spacing: 0.02em;
}

.form-label .required {
  color: #C8102E;
  margin-left: 3px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid #DDD;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: #1A1A2E;
  transition: all 0.3s ease;
  background: #FAFAFA;
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: #1B2B5E;
  background: white;
  box-shadow: 0 0 0 3px rgba(27,43,94,0.08);
}

.form-input.error { border-color: #C8102E; }
.error-msg {
  font-size: 11px;
  color: #C8102E;
  display: none;
}
.form-group.has-error .error-msg { display: block; }
.form-group.has-error .form-input { border-color: #C8102E; }

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

/* Phone input */
.phone-input-wrapper {
  display: flex;
  gap: 8px;
}

.phone-country-code {
  width: 80px;
  min-width: 80px;
  padding: 11px 10px;
  border: 1.5px solid #DDD;
  border-radius: 10px;
  font-size: 14px;
  background: #FAFAFA;
  color: #555;
  outline: none;
  text-align: center;
}

/* Time select */
.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* Product checkboxes */
.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1.5px solid #E0E0E0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.checkbox-item:hover {
  border-color: #1B2B5E;
  background: rgba(27,43,94,0.03);
}

.checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #C8102E;
  cursor: pointer;
  flex-shrink: 0;
}

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

.checkbox-item:has(input:checked) {
  border-color: #C8102E;
  background: rgba(200,16,46,0.04);
}

.checkbox-item span {
  font-size: 13px;
  color: #444;
}

/* Company Selection */
.company-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.company-select-card {
  border: 2px solid #E8E8E8;
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  user-select: none;
  background: white;
}

.company-select-card:hover {
  border-color: #1B2B5E;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.company-select-card.selected {
  border-color: #C8102E;
  background: rgba(200,16,46,0.04);
}

.company-select-card input[type="checkbox"] {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 16px;
  height: 16px;
  accent-color: #C8102E;
  cursor: pointer;
}

.company-select-badge {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: white;
  margin: 0 auto 12px;
  letter-spacing: -0.02em;
}

.company-select-logo-wrap {
  width: 80px;
  height: 52px;
  border-radius: 10px;
  background: #f0ede8;
  border: 1px solid #e0dbd4;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 4px;
  margin: 0 auto 12px;
}

.company-select-logo-img {
  max-width: 100%;
  max-height: 44px;
  object-fit: contain;
  display: block;
}

.company-select-name {
  font-size: 12px;
  font-weight: 700;
  color: #1A1A2E;
  line-height: 1.3;
  margin-bottom: 6px;
}

.company-select-products {
  font-size: 10px;
  color: #888;
  line-height: 1.4;
}

.selected-indicator {
  display: none;
  position: absolute;
  top: 8px;
  left: 8px;
  width: 20px;
  height: 20px;
  background: #C8102E;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 11px;
  font-weight: 700;
}

.company-select-card.selected .selected-indicator { display: flex; }

/* Submit Button */
.reg-submit-section {
  padding: 40px 48px;
  background: #FAFAFA;
  text-align: center;
}

.reg-note {
  font-size: 13px;
  color: #888;
  margin-bottom: 24px;
  line-height: 1.6;
}

.btn-submit {
  background: #C8102E;
  color: white;
  padding: 16px 56px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  letter-spacing: 0.04em;
  position: relative;
  overflow: hidden;
}

.btn-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
}

.btn-submit:hover::before { transform: translateX(100%); }
.btn-submit:hover { background: #E8334A; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(200,16,46,0.4); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Success Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 20px;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: white;
  border-radius: 20px;
  padding: 48px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay.show .modal-card { transform: scale(1); }

.modal-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #C8102E, #E8334A);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 24px;
}

.modal-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 24px;
  font-weight: 700;
  color: #0D1B3E;
  margin-bottom: 12px;
}

.modal-text {
  font-size: 15px;
  color: #666;
  line-height: 1.7;
  margin-bottom: 28px;
}

.modal-btn {
  background: #0D1B3E;
  color: white;
  padding: 12px 36px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s ease;
}

.modal-btn:hover { background: #1B2B5E; }

/* Language switcher in reg page */
.reg-lang {
  display: flex;
  gap: 6px;
  margin-top: 20px;
}

.reg-lang-btn {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.75);
  padding: 5px 12px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.reg-lang-btn.active,
.reg-lang-btn:hover {
  background: #C9A84C;
  border-color: #C9A84C;
  color: #0D1B3E;
}

/* Responsive */
@media (max-width: 700px) {
  .reg-form-section { padding: 28px 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .reg-submit-section { padding: 28px 24px; }
  .modal-card { padding: 32px 24px; }
  .company-selection-grid { grid-template-columns: repeat(2, 1fr); }
}
