:root {
  --primary: #4A6FDC;
  --primary-dark: #3A5BC0;
  --primary-light: #E8EFFF;
  --secondary: #FF9F43;
  --text-primary: #333333;
  --text-secondary: #666666;
  --bg-primary: #fff;
  --bg-secondary: #f8f9fa;
  --border-color: #e5e7eb;
  --error: #ef4444;
  --success: #10b981;
  --navbar-height: 70px;
  --focus-ring: 0 0 0 3px rgba(74, 111, 220, 0.3);
  --hover-bg: #f0f7fa;
  --input-bg: #f9fafb;
  --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s ease;
  --border-radius: 0.75rem;
  --container-width: 1200px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: #f0f2f5;
  min-height: 100vh;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header Styles */
header {
  background-color: #fff;
  padding: 0.75rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
  margin: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
}

.nav-logo {
  height: 35px;
  width: auto;
  margin-right: 10px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  z-index: 105;
  position: relative;
}

.logo span {
  color: var(--secondary);
  font-weight: 400;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link.active {
  color: var(--primary);
  position: relative;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--primary);
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, var(--primary-light) 0%, rgba(255, 255, 255, 0.8) 100%);
  border-radius: var(--border-radius);
  padding: 2.5rem 3rem;
  margin-bottom: 2.5rem;
  text-align: left;
  position: relative;
  box-shadow: var(--card-shadow);
  border-left: 5px solid var(--primary);
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background-color: rgba(74, 111, 220, 0.1);
  z-index: 0;
}

.page-header::after {
  content: '';
  position: absolute;
  bottom: -30px;
  right: 40%;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-color: rgba(255, 159, 67, 0.1);
  z-index: 0;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.page-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 700px;
  position: relative;
  z-index: 1;
  line-height: 1.7;
}

/* Form Styles */
.form-container {
  background-color: var(--bg-primary);
  border-radius: var(--border-radius);
  padding: 2.5rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 3rem;
  transition: var(--transition);
}

.form-section {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary-light);
  position: relative;
}

.form-section-title::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background-color: var(--primary);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.form-label .required {
  color: var(--error);
  margin-left: 0.25rem;
}

.form-control, .form-select {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--input-bg);
  background-clip: padding-box;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  transition: var(--transition);
}

.form-control:hover, .form-select:hover {
  border-color: #cbd5e1;
  background-color: #fff;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  outline: 0;
  box-shadow: var(--focus-ring);
  background-color: #fff;
}

.form-control::placeholder {
  color: #94a3b8;
  opacity: 1;
}

.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23f8971d' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 16px 12px;
  appearance: none;
}

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

.form-row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.75rem;
}

.form-col {
  flex: 1 0 100%;
  padding: 0 0.75rem;
}

@media (min-width: 768px) {
  .form-col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

.file-upload {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  border: 2px dashed var(--border-color);
  border-radius: 0.5rem;
  background-color: var(--input-bg);
  cursor: pointer;
  transition: var(--transition);
}

.file-upload:hover {
  border-color: var(--primary);
  background-color: rgba(74, 111, 220, 0.05);
}

.file-upload-icon {
  width: 40px;
  height: 40px;
  color: var(--primary);
  margin-right: 1.25rem;
  flex-shrink: 0;
  transition: var(--transition);
}

.file-upload:hover .file-upload-icon {
  transform: scale(1.1);
}

.file-upload-text {
  flex: 1;
}

.file-upload-text p:first-child {
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.btn {
  display: inline-block;
  font-weight: 500;
  text-align: center;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.5rem;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
  background-repeat: no-repeat;
  background-position: 50%;
  transform: scale(10, 10);
  opacity: 0;
  transition: transform 0.5s, opacity 1s;
}

.btn:active::after {
  transform: scale(0, 0);
  opacity: 0.3;
  transition: 0s;
}

.btn-primary {
  color: white;
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 111, 220, 0.2);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-secondary {
  color: var(--text-primary);
  background-color: #f1f5f9;
  border-color: #e2e8f0;
}

.btn-secondary:hover {
  background-color: #e2e8f0;
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-secondary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-block {
  display: block;
  width: 100%;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.radio-label {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background-color: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

.radio-label:hover {
  background-color: var(--hover-bg);
  border-color: #cbd5e1;
}

.radio-input {
  margin-right: 0.5rem;
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--primary);
}

.radio-input:checked + span {
  color: var(--primary);
}

.form-note {
  margin-top: 2rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: center;
}

.form-note .required {
  color: var(--error);
}

/* Highlight required fields */
.highlight-required {
  background-color: var(--input-bg);
  border-left: 3px solid var(--primary);
}

.highlight-required:focus {
  background-color: var(--bg-primary);
}

/* Footer */
footer {
  background-color: var(--primary-dark);
  color: white;
  padding: 2rem 0;
  margin-top: 3rem;
}

/* 添加新的样式 */
.focused {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.invalid {
  border-color: var(--error) !important;
}

.invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

.file-selected {
  border-color: var(--success);
  background-color: rgba(16, 185, 129, 0.05);
}

.file-selected .file-upload-icon {
  color: var(--success);
}

.file-size {
  color: var(--text-secondary);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.error-message, .success-message {
  padding: 1rem;
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
  text-align: center;
  animation: fadeIn 0.3s ease-in-out;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.error-message {
  background-color: #fee2e2;
  color: var(--error);
  border: 1px solid #fecaca;
}

.success-message {
  background-color: #d1fae5;
  color: var(--success);
  border: 1px solid #a7f3d0;
}

/* 添加进度指示器 */
.form-progress-container {
  margin: 2.5rem 0;
  padding: 0 1rem;
}

.form-progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.form-progress::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  height: 4px;
  width: 100%;
  background-color: var(--border-color);
  z-index: 0;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  width: 25%;
  transition: var(--transition);
}

.step-indicator {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: white;
  border: 4px solid var(--border-color);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-bottom: 0.75rem;
  position: relative;
  transition: var(--transition);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.step-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
  transition: var(--transition);
  white-space: nowrap;
}

.progress-step.active .step-indicator {
  background-color: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 0 0 5px rgba(74, 111, 220, 0.2);
}

.progress-step.active .step-label {
  color: var(--primary-dark);
  font-weight: 600;
}

.progress-step.completed .step-indicator {
  background-color: var(--success);
  border-color: var(--success);
  color: white;
}

.progress-step.completed::before {
  background-color: var(--success);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .form-container {
    padding: 1.5rem;
  }
  
  .page-header {
    padding: 2rem 1.5rem;
  }
  
  .page-title {
    font-size: 2rem;
  }
  
  .page-description {
    font-size: 1rem;
  }
  
  .form-progress {
    overflow-x: auto;
    padding-bottom: 1.5rem;
    justify-content: flex-start;
  }
  
  .progress-step {
    min-width: 120px;
  }
  
  .step-indicator {
    width: 35px;
    height: 35px;
  }
  
  .step-label {
    font-size: 0.8rem;
  }
  
  .form-label, .form-control, .form-select, .btn {
    font-size: 0.95rem;
  }
  
  .logo {
    font-size: 1.125rem;
  }
}

/* 添加动画效果 */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.btn-primary:hover {
  animation: pulse 2s infinite;
}

/* 添加工具提示 */
.tooltip {
  position: relative;
  display: inline-block;
  margin-left: 0.5rem;
  width: 18px;
  height: 18px;
  background-color: #e2e8f0;
  color: var(--text-secondary);
  border-radius: 50%;
  font-size: 0.75rem;
  text-align: center;
  line-height: 18px;
  cursor: help;
}

.tooltip .tooltip-text {
  visibility: hidden;
  width: 200px;
  background-color: #334155;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 0.75rem;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.85rem;
  font-weight: normal;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* 添加表单分组标题 */
.form-group-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 0.5rem;
}

/* 添加抖动动画效果 */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
  animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

/* 改进表单元素过渡效果 */
.form-control, .form-select, .form-textarea, .file-upload, .btn, .radio-label {
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 改进进度条完成状态的连接线 */
.progress-step.completed:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 50%;
  width: 100%;
  height: 4px;
  background-color: var(--success);
  z-index: 0;
}

/* 改进表单错误状态 */
.invalid {
  border-color: var(--error) !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15) !important;
}

/* 添加更多移动端优化 */
@media (max-width: 480px) {
  .page-header {
    padding: 1.5rem 1.25rem;
  }
  
  .page-title {
    font-size: 1.75rem;
  }
  
  .form-row {
    margin: 0;
  }
  
  .form-col {
    padding: 0;
  }
  
  .step-label {
    font-size: 0.7rem;
  }
  
  .step-indicator {
    width: 30px;
    height: 30px;
  }
}

/* 添加表单项获取焦点时的放大效果 */
.form-group:focus-within {
  transform: translateY(-2px);
}

/* 增强表单标签可见性 */
.form-label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.form-group:focus-within .form-label {
  color: var(--primary);
}

/* Loading indicator styles */
.spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: #0066cc;
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#loading-indicator {
  background-color: #f9f9f9;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
}

#loading-indicator p {
  margin-top: 10px;
  font-weight: 500;
  color: #333;
}

/* Disabled button style */
button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Add loading indicator for positions */
.form-loading {
  display: none;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  padding-left: 0.5rem;
  font-style: italic;
  animation: pulse 1.5s infinite;
}

/* Position select improvements */
#position {
  transition: opacity 0.3s ease;
}

#position.loading {
  opacity: 0.7;
}

/* Animation for select when options are loaded */
@keyframes selectLoaded {
  0% {
    transform: translateY(-5px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.select-loaded {
  animation: selectLoaded 0.5s ease forwards;
}

/* Style for when a position is pre-selected */
#position[data-preselected="true"] {
  border-color: var(--primary);
  background-color: rgba(74, 111, 220, 0.05);
  font-weight: 500;
}

/* Highlight the position field when loaded from URL */
.highlight-preselected {
  position: relative;
}

.highlight-preselected::after {
  content: 'Selected from job listing';
  position: absolute;
  right: 0;
  top: 0;
  font-size: 0.8rem;
  color: var(--primary);
  background-color: var(--primary-light);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  opacity: 0;
  transform: translateY(-50%);
  animation: fadeInOut 3s forwards;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateY(-50%); }
  10% { opacity: 1; transform: translateY(0); }
  90% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-50%); }
}

/* 强化的错误提示样式 */
.field-error-message {
  color: #f44336;
  font-size: 0.85rem;
  margin-top: 5px;
  font-weight: 500;
  animation: fade-in 0.3s ease;
  display: block;
  padding: 4px 0;
  border-radius: 3px;
}

@keyframes fade-in {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.error-flash {
  animation: flash-error 0.5s 3;
}

.invalid {
  border-color: #f44336 !important;
  background-color: rgba(244, 67, 54, 0.03) !important;
  box-shadow: 0 0 0 1px #f44336;
}

.invalid:focus {
  box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.3) !important;
}

.file-upload.invalid {
  border: 2px dashed #f44336 !important;
  background-color: rgba(244, 67, 54, 0.05) !important;
}

.radio-group.invalid {
  border: 1px solid #f44336;
  border-radius: 4px;
  padding: 8px;
  background-color: rgba(244, 67, 54, 0.05);
}

.error-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: #f44336;
  color: white;
  padding: 12px 20px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: translateX(120%);
  transition: transform 0.3s ease;
  font-weight: 500;
}

.error-notification.visible {
  transform: translateX(0);
}

/* Make the section lock overlay more visible */
.section-lock-overlay.visible {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 0, 0, 0.05);
  animation: fade-in 0.3s;
}

.section-lock-message {
  background: white;
  padding: 20px 25px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  text-align: center;
  max-width: 80%;
  border-left: 4px solid #f44336;
}

/* 感謝頁面樣式 */
.success-message {
  background-color: #f9f9f9;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  animation: slideUp 0.5s ease-out;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  max-width: 800px;
  margin: 0 auto;
}

.success-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  position: relative;
}

.thank-you-logo {
  height: 70px;
  margin-right: 20px;
}

.success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background-color: #4CAF50;
  color: white;
  border-radius: 50%;
  font-size: 32px;
  margin: 0 auto 1rem;
  box-shadow: 0 4px 10px rgba(76, 175, 80, 0.3);
}

.success-message h2 {
  color: #333;
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.submission-details {
  text-align: left;
  margin-bottom: 2rem;
}

.main-thanks {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #333;
}

.next-steps {
  background-color: #f0f7ff;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-left: 4px solid #3498db;
}

.next-steps h3 {
  color: #3498db;
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.next-steps ul {
  margin: 0;
  padding-left: 1.5rem;
}

.next-steps li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.company-values {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 2rem 0;
}

.company-mission, .company-culture {
  flex: 1;
  min-width: 250px;
  padding: 1.5rem;
  border-radius: 8px;
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.company-mission {
  border-left: 4px solid #e67e22;
}

.company-culture {
  border-left: 4px solid #9b59b6;
}

.company-values h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
}

.company-mission h3 {
  color: #e67e22;
}

.company-culture h3 {
  color: #9b59b6;
}

.company-values p {
  margin: 0;
  line-height: 1.5;
  font-size: 1.1rem;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 768px) {
  .company-values {
    flex-direction: column;
  }
  
  .thank-you-logo {
    height: 50px;
  }
  
  .success-message {
    padding: 1.5rem;
  }
}