/* 注意：.container 已在 design-system.css 中定义 */
/* 注意：.form-field, .form-grid 等基础样式已在 design-system.css 中统一定义 */

/* 1. 组件样式 */

/* 保留本地特有的样式 */
.form-actions {
  grid-column: 1 / -1; /* 跨两列 */
  display: flex;
  justify-content: center;
}

/* 性别切换开关样式 (复用 loan_calculator 的按钮组风格) */
.gender-toggle {
  display: flex;
  gap: 10px; /* 增加间距 */
}

.toggle-option {
  flex: 1;
  padding: 12px 14px;
  font-size: 16px;
  border: 1px solid var(--border-color, #e5e7eb);
  background-color: #fff;
  border-radius: 8px; /* 独立圆角 */
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toggle-option:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.toggle-option.active {
  background-color: var(--brand-blue);
  color: #fff;
  border-color: var(--brand-blue);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.2);
}

/* 2. 结果区域 */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  text-align: center;
}

.stat-item {
  background-color: #f9fafb;
  padding: 15px;
  border-radius: 10px;
  border: 1px solid var(--border-color, #e5e7eb);
}

.stat-item .value {
  font-size: 28px;
  font-weight: 800;
  color: var(--brand-blue);
  letter-spacing: -0.5px;
}

.stat-item .label {
  font-size: 14px;
  color: #6b7280;
  margin-top: 5px;
}

.info-trigger {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.info-trigger i {
  color: var(--primary-color, #2563eb);
  font-size: 14px;
}

.info-trigger:hover {
  opacity: 0.8;
}

/* 4. 人生之路进度条 */
.life-path-container {
  padding: 40px 10px 20px 10px;
}

.life-path {
  position: relative;
  width: 100%;
  height: 10px;
  background-color: #e5e7eb;
  border-radius: 5px;
}

.path-progress {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(to right, var(--brand-cyan), var(--brand-blue));
  border-radius: 5px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.person-icon {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  color: #111827;
  transition: left 1s ease-in-out;
  text-shadow: 0 0 5px white;
}

.path-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 12px;
  color: #6b7280;
}

/* 5. 弹窗样式 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background-color: #fff;
  width: 90%;
  max-width: 400px;
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  transform: scale(0.9);
  animation: slideUp 0.3s forwards cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  color: #111827;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: #9ca3af;
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  padding: 24px;
}

.modal-body p {
  margin: 0 0 12px 0;
  color: #374151;
  line-height: 1.6;
  font-size: 15px;
}

.modal-body .muted-text {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 0;
}

.modal-footer {
  padding: 16px 24px 24px;
  display: flex;
  justify-content: flex-end;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@media (max-width: 576px) {
  .modal-content { width: 85%; }
}

/* 页面头部辅助类 */
.page-header h1 {
  font-size: 1.8rem;
  margin: 0;
}