:root {
  --primary-color: #e91e63;
  --secondary-color: #f8bbd0;
  --text-color: #333;
  --light-bg: #f8f9fa;
}

body {
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--text-color);
  line-height: 1.6;
}

/* Navigation */
.navbar {
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.95) !important;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
}

.navbar-nav .nav-link {
  font-weight: 500;
  transition: color 0.3s ease;
}

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

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color), #ad1457);
  min-height: 500px;
  display: flex;
  align-items: center;
}

.hero-section h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.hero-section .lead {
  font-size: 1.25rem;
  opacity: 0.9;
}

/* Tool Cards */
.tool-card {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  border: none;
  border-radius: 15px;
  overflow: hidden;
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

.tool-card .card-body {
  padding: 2rem;
}

.tool-card i {
  transition: transform 0.3s ease;
}

.tool-card:hover i {
  transform: scale(1.1);
}

/* Quick Calculator */
#quick-calculator .card {
  border: none;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(233, 30, 99, 0.1);
}

#quick-calculator h2 {
  color: var(--primary-color);
  font-weight: 600;
}

/* FAQ Section */
.accordion-button {
  font-weight: 500;
  color: var(--text-color);
}

.accordion-button:not(.collapsed) {
  background-color: rgba(233, 30, 99, 0.1);
  color: var(--primary-color);
}

/* Footer */
footer {
  background-color: #ededed;
  color: #212529;
}

footer h5,
footer h6 {
  color: #fff;
  font-weight: 600;
}

footer a {
  transition: color 0.3s ease;
}

footer a:hover {
  color: var(--primary-color) !important;
}

/* Buttons */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  padding: 0.75rem 2rem;
  font-weight: 500;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: #c2185b;
  border-color: #c2185b;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(233, 30, 99, 0.3);
}

.btn-outline-primary {
  border-color: var(--primary-color);
  color: var(--primary-color);
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

/* Forms */
.form-control {
  border-radius: 10px;
  border: 2px solid #e9ecef;
  padding: 0.75rem 1rem;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(233, 30, 99, 0.25);
}

/* Cards */
.card {
  border-radius: 15px;
  border: none;
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 2.5rem;
  }

  .hero-section .lead {
    font-size: 1.1rem;
  }

  .navbar-brand {
    font-size: 1.2rem;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Language Selector */
.btn-group-vertical .btn {
  margin-bottom: 0.5rem;
  text-align: left;
}

.btn-group-vertical .btn.active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* SEO Enhancement */
.text-primary {
  color: var(--primary-color) !important;
}

.bg-primary {
  background-color: var(--primary-color) !important;
}

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

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Print Styles */
@media print {
  .navbar,
  footer,
  .btn,
  .accordion-button {
    display: none !important;
  }

  .card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
}

/* ====== Advanced Due Date Calculator ====== */
.calc-form {
  transition: opacity 0.3s ease;
}
.btn-group input[type="radio"]:checked + label {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}
#resultsSection .card {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
#resultsSection .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}
.display-3 {
  font-size: calc(2rem + 2.5vw);
  font-weight: 700;
}
.progress {
  border-radius: 10px;
}
.progress-bar {
  border-radius: 10px;
}
.badge.bg-soft-primary {
  background-color: rgba(233, 30, 99, 0.1);
  color: var(--primary-color);
}
.badge.bg-soft-info {
  background-color: rgba(23, 162, 184, 0.1);
  color: #17a2b8;
}
#milestoneTable th {
  white-space: nowrap;
}
#milestoneTable td {
  vertical-align: middle;
}
/* 响应式优化 */
@media (max-width: 576px) {
  .btn-group label {
    font-size: 0.875rem;
  }
  .display-3 {
    font-size: 2rem;
  }
}
/* ===== 统一高度 ===== */
input.form-control,
select.form-select {
  min-height: 38px; /* 统一最小高度 */
  padding-top: 0.375rem; /* Bootstrap 5 默认值 */
  padding-bottom: 0.375rem;
  font-size: 1rem;
  line-height: 1.5;
}

/* ====== 胎动计数器专用样式 ====== */

/* 胎动计数器主按钮 */
#countBtn {
  font-size: 1.25rem;
  padding: 1rem 2rem;
  border-radius: 50px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

#countBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(220, 53, 69, 0.3);
}

#countBtn:active {
  transform: translateY(0);
}

#countBtn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}

#countBtn:active::after {
  width: 300px;
  height: 300px;
}

/* 胎动强度选择 */
.btn-group input[type="radio"]:checked + label {
  background-color: #198754;
  border-color: #198754;
  color: #fff;
}

/* 状态提醒动画 */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.alert-success {
  animation: pulse 2s infinite;
}

/* 胎动数据显示 */
.display-3 {
  font-size: calc(1.5rem + 3vw);
  font-weight: 700;
}

/* 图表容器 */
.chart-container {
  position: relative;
  height: 300px;
  margin: 1rem 0;
}

/* 历史记录表格 */
#historyTable {
  font-size: 0.875rem;
}

#historyTable th {
  white-space: nowrap;
  font-weight: 600;
}

#historyTable td {
  vertical-align: middle;
}

/* 状态徽章 */
.badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

/* 胎动知识卡片 */
.knowledge-card {
  transition: transform 0.3s ease;
}

.knowledge-card:hover {
  transform: translateY(-5px);
}

/* 常见问题手风琴 */
.accordion-button:not(.collapsed) {
  background-color: rgba(233, 30, 99, 0.1);
  color: var(--primary-color);
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.25rem rgba(233, 30, 99, 0.25);
}

/* 胎动计数器特色功能 */
.feature-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), #ad1457);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: white;
  font-size: 1.5rem;
}

/* 实时计数动画 */
.counting-active {
  animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
  0% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.1);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.1);
  }
  70% {
    transform: scale(1);
  }
}

/* 数据导出按钮 */
.export-btn {
  transition: all 0.3s ease;
}

.export-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 胎动提醒弹窗 */
.movement-reminder {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1050;
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* 胎动详情模态框 */
.movement-detail-modal .modal-body {
  max-height: 70vh;
  overflow-y: auto;
}

/* 响应式优化 */
@media (max-width: 768px) {
  .display-3 {
    font-size: 2.5rem;
  }

  #countBtn {
    font-size: 1.1rem;
    padding: 0.75rem 1.5rem;
  }

  .chart-container {
    height: 250px;
  }

  #historyTable {
    font-size: 0.75rem;
  }
}

/* 打印样式 */
@media print {
  .navbar,
  footer,
  .btn,
  .alert {
    display: none !important;
  }

  .card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    page-break-inside: avoid;
  }

  #historyTable {
    font-size: 0.75rem;
  }
}
/* ====== 排卵日计算器专用样式 ====== */

/* 方法选择按钮增强 */
.ovulation-method-selector .btn-outline-primary {
  border-width: 2px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.ovulation-method-selector .btn-outline-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(233, 30, 99, 0.2);
}

.ovulation-method-selector .btn-check:checked + label {
  background: linear-gradient(135deg, var(--primary-color), #ad1457);
  border-color: var(--primary-color);
  color: white;
  transform: scale(1.05);
}

/* 准确度进度条 */
.method-rating .progress {
  background-color: #e9ecef;
  border-radius: 10px;
}

.method-rating .progress-bar {
  border-radius: 10px;
  transition: width 0.6s ease;
}

/* 日历网格样式 */
.calendar-grid {
  padding: 1rem 0;
}

.calendar-cell {
  background-color: #f8f9fa;
  border: 2px solid transparent;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.calendar-cell:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.calendar-cell.today {
  border-color: var(--primary-color);
  background-color: rgba(233, 30, 99, 0.1);
  font-weight: bold;
}

.calendar-cell.period {
  background-color: #ffebee;
  border-color: #f44336;
}

.calendar-cell.fertile {
  background-color: #fff3e0;
  border-color: #ff9800;
}

.calendar-cell.ovulation {
  background-color: #e8f5e9;
  border-color: #4caf50;
  font-weight: bold;
}

.tiny-text {
  font-size: 0.7rem;
  line-height: 1;
  margin-top: 2px;
}

/* 周期状态指示器 */
.cycle-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* 排卵症状卡片 */
.ovulation-symptoms-card {
  background: linear-gradient(135deg, #ffeaa7, #fab1a0);
  border: none;
  border-radius: 15px;
}

.ovulation-symptoms-card .card-body {
  color: #2d3436;
}

/* 同房时机建议 */
.intercourse-timing-card {
  background: linear-gradient(135deg, #fd79a8, #e84393);
  color: white;
  border: none;
  border-radius: 15px;
}

.intercourse-timing-card .card-title,
.intercourse-timing-card .card-text {
  color: white;
}

/* 时间线表格增强 */
#timelineTable tr {
  transition: all 0.3s ease;
}

#timelineTable tr:hover {
  background-color: rgba(233, 30, 99, 0.05);
  transform: scale(1.01);
}

#timelineTable .table-primary {
  background-color: var(--primary-color) !important;
  color: white;
  box-shadow: 0 4px 8px rgba(233, 30, 99, 0.3);
}

/* 预测方法对比卡片 */
.method-comparison-card {
  transition: all 0.3s ease;
  border: none;
  border-radius: 15px;
  overflow: hidden;
}

.method-comparison-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
}

.method-comparison-card .card-body {
  padding: 1.5rem;
}

/* 高级选项面板 */
#advancedOptionsPanel {
  background-color: #f8f9fa;
  border-radius: 10px;
  padding: 1.5rem;
  margin-top: 1rem;
  border: 1px solid #e9ecef;
}

#advancedOptionsPanel .form-label {
  font-weight: 600;
  color: #495057;
}

/* 排卵日结果高亮 */
#ovulationDateDisplay {
  background: linear-gradient(135deg, #ff6b6b, #ee5a52);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* 易孕期警告样式 */
.alert-fertile {
  background: linear-gradient(135deg, #ffa726, #ff9800);
  color: white;
  border: none;
  border-radius: 10px;
}

.alert-fertile .alert-heading {
  color: white;
}

/* 进度条动画 */
.progress-bar {
  transition: width 0.6s ease;
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.2) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.2) 75%,
    transparent 75%,
    transparent
  );
  background-size: 30px 30px;
  animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 30px 30px;
  }
}

/* 分享按钮组 */
.share-button-group .btn {
  transition: all 0.3s ease;
  border-radius: 25px;
  padding: 0.5rem 1rem;
}

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

/* 响应式优化 */
@media (max-width: 768px) {
  .calendar-cell {
    min-height: 50px;
    padding: 0.5rem;
  }

  .tiny-text {
    font-size: 0.6rem;
  }

  .ovulation-method-selector .btn-outline-primary {
    font-size: 0.875rem;
    padding: 0.5rem;
  }

  #ovulationDateDisplay {
    font-size: 2rem;
  }
}

@media (max-width: 576px) {
  .calendar-grid .row {
    margin: 0 -5px;
  }

  .calendar-grid .col-2 {
    padding: 0 2px;
    margin-bottom: 4px;
  }

  .method-comparison-card {
    margin-bottom: 1rem;
  }
}

/* 打印样式 */
@media print {
  .navbar,
  footer,
  .btn,
  .share-button-group {
    display: none !important;
  }

  .calendar-cell {
    background-color: white !important;
    border: 1px solid #ddd !important;
  }

  .calendar-cell.period {
    background-color: #ffebee !important;
  }

  .calendar-cell.fertile {
    background-color: #fff3e0 !important;
  }

  .calendar-cell.ovulation {
    background-color: #e8f5e9 !important;
  }

  #timelineTable {
    font-size: 0.875rem;
  }
}

/* 动画效果 */
.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

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

/* 加载动画 */
.loading-ovulation {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(233, 30, 99, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

/* 工具提示增强 */
.custom-tooltip {
  position: relative;
}

.custom-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  font-size: 0.875rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.custom-tooltip:hover::after {
  opacity: 1;
  visibility: visible;
  bottom: calc(100% + 5px);
}

/* 排卵计算器专属颜色方案 */
:root {
  --ovulation-color: #4caf50;
  --fertile-color: #ff9800;
  --period-color: #f44336;
  --luteal-color: #9c27b0;
  --follicular-color: #2196f3;
}

.bg-ovulation {
  background-color: var(--ovulation-color) !important;
}
.bg-fertile {
  background-color: var(--fertile-color) !important;
}
.bg-period {
  background-color: var(--period-color) !important;
}
.bg-luteal {
  background-color: var(--luteal-color) !important;
}
.bg-follicular {
  background-color: var(--follicular-color) !important;
}

.text-ovulation {
  color: var(--ovulation-color) !important;
}
.text-fertile {
  color: var(--fertile-color) !important;
}
.text-period {
  color: var(--period-color) !important;
}
.text-luteal {
  color: var(--luteal-color) !important;
}
.text-follicular {
  color: var(--follicular-color) !important;
}

/* ====== 怀孕测试计算器专用样式 ====== */

/* 方法选择按钮增强 */
.pregnancy-test-calculator .ovulation-method-selector .btn-outline-primary {
  border-width: 2px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.pregnancy-test-calculator
  .ovulation-method-selector
  .btn-outline-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(233, 30, 99, 0.2);
}

.pregnancy-test-calculator
  .ovulation-method-selector
  .btn-check:checked
  + label {
  background: linear-gradient(135deg, var(--primary-color), #ad1457);
  border-color: var(--primary-color);
  color: white;
  transform: scale(1.05);
}

/* 准确度进度条 */
.pregnancy-test-calculator .method-rating .progress {
  background-color: #e9ecef;
  border-radius: 10px;
}

.pregnancy-test-calculator .method-rating .progress-bar {
  border-radius: 10px;
  transition: width 0.6s ease;
}

/* 图表容器样式 */
.pregnancy-test-calculator #hcgChartContainer {
  position: relative;
  height: 300px;
  margin: 1rem 0;
}

.pregnancy-test-calculator .chart-container {
  background: white;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* HCG数据表格增强 */
.pregnancy-test-calculator #hcgTable tr {
  transition: all 0.3s ease;
}

.pregnancy-test-calculator #hcgTable tr:hover {
  background-color: rgba(233, 30, 99, 0.05);
  transform: scale(1.01);
}

.pregnancy-test-calculator #hcgTable tr.table-primary {
  background-color: var(--primary-color) !important;
  color: white;
  box-shadow: 0 4px 8px rgba(233, 30, 99, 0.3);
}

.pregnancy-test-calculator #hcgTable tr.table-primary td {
  border-color: var(--primary-color);
}

/* 进度条动画 */
.pregnancy-test-calculator .progress {
  border-radius: 10px;
  overflow: hidden;
}

.pregnancy-test-calculator .progress-bar {
  border-radius: 10px;
  transition: width 0.6s ease;
  position: relative;
  overflow: hidden;
}

.pregnancy-test-calculator .progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.2) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.2) 75%,
    transparent 75%,
    transparent
  );
  background-size: 30px 30px;
  animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 30px 30px;
  }
}

/* 软徽章样式 */
.pregnancy-test-calculator .badge.bg-soft-info {
  background-color: rgba(23, 162, 184, 0.1);
  color: #17a2b8;
  font-weight: 500;
}

.pregnancy-test-calculator .badge.bg-soft-danger {
  background-color: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  font-weight: 500;
}

/* 测试方法对比卡片 */
.pregnancy-test-calculator .method-comparison-card {
  transition: all 0.3s ease;
  border: none;
  border-radius: 15px;
  overflow: hidden;
}

.pregnancy-test-calculator .method-comparison-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
}

.pregnancy-test-calculator .method-comparison-card .card-body {
  padding: 1.5rem;
}

/* 高级选项面板 */
.pregnancy-test-calculator #advancedOptionsPanel {
  background-color: #f8f9fa;
  border-radius: 10px;
  padding: 1.5rem;
  margin-top: 1rem;
  border: 1px solid #e9ecef;
}

.pregnancy-test-calculator #advancedOptionsPanel .form-label {
  font-weight: 600;
  color: #495057;
}

/* 结果高亮显示 */
.pregnancy-test-calculator #bestTestDateDisplay {
  background: linear-gradient(135deg, #4caf50, #45a049);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  font-weight: 700;
}

/* 警告样式 */
.pregnancy-test-calculator .alert-fertile {
  background: linear-gradient(135deg, #ffa726, #ff9800);
  color: white;
  border: none;
  border-radius: 10px;
}

.pregnancy-test-calculator .alert-fertile .alert-heading {
  color: white;
}

/* 分享按钮组 */
.pregnancy-test-calculator .share-button-group .btn {
  transition: all 0.3s ease;
  border-radius: 25px;
  padding: 0.5rem 1rem;
}

.pregnancy-test-calculator .share-button-group .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 动画效果 */
.pregnancy-test-calculator .fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

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

/* 加载动画 */
.pregnancy-test-calculator .loading-pregnancy-test {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(233, 30, 99, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

/* 工具提示增强 */
.pregnancy-test-calculator .custom-tooltip {
  position: relative;
}

.pregnancy-test-calculator .custom-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  font-size: 0.875rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.pregnancy-test-calculator .custom-tooltip:hover::after {
  opacity: 1;
  visibility: visible;
  bottom: calc(100% + 5px);
}

/* 怀孕测试计算器专属颜色方案 */
.pregnancy-test-calculator:root {
  --hcg-positive: #4caf50;
  --hcg-negative: #f44336;
  --hcg-weak: #ff9800;
  --test-urine: #17a2b8;
  --test-blood: #dc3545;
}

.pregnancy-test-calculator .bg-hcg-positive {
  background-color: var(--hcg-positive) !important;
}
.pregnancy-test-calculator .bg-hcg-negative {
  background-color: var(--hcg-negative) !important;
}
.pregnancy-test-calculator .bg-hcg-weak {
  background-color: var(--hcg-weak) !important;
}
.pregnancy-test-calculator .bg-test-urine {
  background-color: var(--test-urine) !important;
}
.pregnancy-test-calculator .bg-test-blood {
  background-color: var(--test-blood) !important;
}

.pregnancy-test-calculator .text-hcg-positive {
  color: var(--hcg-positive) !important;
}
.pregnancy-test-calculator .text-hcg-negative {
  color: var(--hcg-negative) !important;
}
.pregnancy-test-calculator .text-hcg-weak {
  color: var(--hcg-weak) !important;
}
.pregnancy-test-calculator .text-test-urine {
  color: var(--test-urine) !important;
}
.pregnancy-test-calculator .text-test-blood {
  color: var(--test-blood) !important;
}

/* 响应式优化 */
@media (max-width: 768px) {
  .pregnancy-test-calculator .display-3 {
    font-size: 2rem;
  }

  .pregnancy-test-calculator .chart-container {
    height: 250px;
    padding: 0.5rem;
  }

  .pregnancy-test-calculator #hcgTable {
    font-size: 0.75rem;
  }

  .pregnancy-test-calculator .ovulation-method-selector .btn-outline-primary {
    font-size: 0.875rem;
    padding: 0.5rem;
  }

  .pregnancy-test-calculator .share-button-group .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 576px) {
  .pregnancy-test-calculator .method-comparison-card {
    margin-bottom: 1rem;
  }

  .pregnancy-test-calculator #advancedOptionsPanel {
    padding: 1rem;
  }

  .pregnancy-test-calculator .progress {
    height: 6px;
  }
}

/* 打印样式 */
@media print {
  .pregnancy-test-calculator .navbar,
  .pregnancy-test-calculator footer,
  .pregnancy-test-calculator .btn,
  .pregnancy-test-calculator .share-button-group {
    display: none !important;
  }

  .pregnancy-test-calculator .card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    page-break-inside: avoid;
  }

  .pregnancy-test-calculator #hcgTable {
    font-size: 0.75rem;
  }

  .pregnancy-test-calculator .chart-container {
    height: 200px !important;
  }

  .pregnancy-test-calculator .progress-bar::after {
    animation: none !important;
  }
}

/* 特殊状态指示器 */
.pregnancy-test-calculator .status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}

.pregnancy-test-calculator .status-indicator.early {
  background-color: rgba(255, 193, 7, 0.1);
  color: #ffc107;
}

.pregnancy-test-calculator .status-indicator.optimal {
  background-color: rgba(40, 167, 69, 0.1);
  color: #28a745;
}

.pregnancy-test-calculator .status-indicator.wait {
  background-color: rgba(108, 117, 125, 0.1);
  color: #6c757d;
}

/* 结果卡片悬停效果 */
.pregnancy-test-calculator .result-card {
  transition: all 0.3s ease;
  cursor: pointer;
}

.pregnancy-test-calculator .result-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

/* 数据导出按钮 */
.pregnancy-test-calculator .export-btn {
  transition: all 0.3s ease;
  border-radius: 20px;
}

.pregnancy-test-calculator .export-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 响应式表格容器 */
.pregnancy-test-calculator .table-responsive {
  border-radius: 10px;
  overflow: hidden;
}

/* 图表工具提示 */
.pregnancy-test-calculator .chartjs-tooltip {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border-radius: 5px;
  padding: 0.5rem;
  font-size: 0.875rem;
}

/* 特殊动画效果 */
@keyframes pulse-success {
  0% {
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
  }
}

.pregnancy-test-calculator .pulse-success {
  animation: pulse-success 2s infinite;
}

/* ====== 产后恢复计算器专用样式 ====== */

/* 时间线样式 */
.timeline {
  position: relative;
  padding: 20px 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e9ecef;
}

.timeline-item {
  position: relative;
  padding-left: 50px;
  margin-bottom: 30px;
}

.timeline-marker {
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #6c757d;
}

.timeline-item.completed .timeline-marker {
  background: #28a745;
  border-color: #28a745;
  color: white;
}

.timeline-item.current .timeline-marker {
  background: #007bff;
  border-color: #007bff;
  color: white;
  animation: pulse 2s infinite;
}

.timeline-content {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  border-left: 3px solid #e9ecef;
}

.timeline-item.completed .timeline-content {
  border-left-color: #28a745;
}

.timeline-item.current .timeline-content {
  border-left-color: #007bff;
  background: #e3f2fd;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
  }
}

/* 进度卡片增强 */
.recovery-card {
  transition: all 0.3s ease;
  border: none;
  border-radius: 15px;
  overflow: hidden;
}

.recovery-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
}

.progress {
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar {
  border-radius: 10px;
  transition: width 0.6s ease;
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.2) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.2) 75%,
    transparent 75%,
    transparent
  );
  background-size: 30px 30px;
  animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 30px 30px;
  }
}

/* 产后恢复专属颜色 */
:root {
  --postpartum-uterus: #dc3545;
  --postpartum-lochia: #17a2b8;
  --postpartum-weight: #ffc107;
  --postpartum-period: #28a745;
}

.bg-postpartum-uterus {
  background-color: var(--postpartum-uterus) !important;
}
.bg-postpartum-lochia {
  background-color: var(--postpartum-lochia) !important;
}
.bg-postpartum-weight {
  background-color: var(--postpartum-weight) !important;
}
.bg-postpartum-period {
  background-color: var(--postpartum-period) !important;
}

.text-postpartum-uterus {
  color: var(--postpartum-uterus) !important;
}
.text-postpartum-lochia {
  color: var(--postpartum-lochia) !important;
}
.text-postpartum-weight {
  color: var(--postpartum-weight) !important;
}
.text-postpartum-period {
  color: var(--postpartum-period) !important;
}

/* 高级选项面板 */
#advancedOptionsPanel {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-radius: 15px;
  padding: 2rem;
  margin-top: 1rem;
  border: 1px solid #dee2e6;
}

/* 表单增强 */
.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(233, 30, 69, 0.25);
}

/* 按钮增强 */
.btn-postpartum {
  background: linear-gradient(135deg, var(--primary-color), #c2185b);
  border: none;
  border-radius: 25px;
  padding: 0.75rem 2rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-postpartum:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(233, 30, 69, 0.3);
}

/* 状态徽章 */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}

.status-badge.completed {
  background-color: rgba(40, 167, 69, 0.1);
  color: #28a745;
}

.status-badge.current {
  background-color: rgba(0, 123, 255, 0.1);
  color: #007bff;
}

.status-badge.upcoming {
  background-color: rgba(108, 117, 125, 0.1);
  color: #6c757d;
}

/* 响应式优化 */
@media (max-width: 768px) {
  .timeline::before {
    left: 15px;
  }

  .timeline-item {
    padding-left: 40px;
  }

  .timeline-marker {
    width: 30px;
    height: 30px;
    font-size: 1rem;
  }

  .progress {
    height: 6px;
  }

  .display-3 {
    font-size: 2rem;
  }
}

@media (max-width: 576px) {
  #advancedOptionsPanel {
    padding: 1rem;
  }

  .timeline-content {
    padding: 10px;
  }

  .timeline-item {
    margin-bottom: 20px;
  }
}

/* 打印样式 */
@media print {
  .navbar,
  footer,
  .btn,
  .share-button-group {
    display: none !important;
  }

  .timeline::before {
    background-color: #000 !important;
  }

  .timeline-content {
    background: white !important;
    border: 1px solid #ddd !important;
    page-break-inside: avoid;
  }

  .progress-bar::after {
    animation: none !important;
  }

  .card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
}

/* 动画效果 */
.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

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

/* 加载动画 */
.loading-postpartum {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(233, 30, 69, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

/* 特殊效果 */
.pulse-success {
  animation: pulse-success 2s infinite;
}

@keyframes pulse-success {
  0% {
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
  }
}

/* ====== EPDS测试优化样式 ====== */

.epds-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.epds-option {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  background: #ffffff;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  min-height: 60px;
}

.epds-option:hover {
  border-color: var(--primary-color);
  background: #f8f9fa;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.epds-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.epds-option input[type="radio"]:checked + .option-text {
  color: var(--primary-color);
  font-weight: 600;
}

.epds-option input[type="radio"]:checked {
  border-color: var(--primary-color);
  background: linear-gradient(
    135deg,
    rgba(233, 30, 99, 0.05),
    rgba(233, 30, 99, 0.1)
  );
}

.epds-option.selected {
  border-color: var(--primary-color);
  background: linear-gradient(
    135deg,
    rgba(233, 30, 99, 0.05),
    rgba(233, 30, 99, 0.1)
  );
}

.option-text {
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #495057;
  transition: all 0.3s ease;
}

/* 选中状态的视觉效果 */
.epds-option:has(input[type="radio"]:checked) {
  border-color: var(--primary-color);
  background: linear-gradient(
    135deg,
    rgba(233, 30, 99, 0.05),
    rgba(233, 30, 99, 0.1)
  );
  box-shadow: 0 4px 12px rgba(233, 30, 99, 0.15);
}

.epds-option:has(input[type="radio"]:checked)::before {
  content: "✓";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-color);
  font-size: 1.2rem;
  font-weight: bold;
}

/* 特殊状态 - 第10题 */
.question-item.border-danger .epds-option {
  border-color: #dc3545;
}

.question-item.border-danger .epds-option:hover {
  border-color: #dc3545;
  background: #fff5f5;
}

/* 响应式优化 */
@media (max-width: 768px) {
  .epds-option {
    padding: 0.875rem 1rem;
    min-height: 54px;
  }

  .option-text {
    font-size: 0.875rem;
    padding-right: 2rem; /* 为勾选标记留出空间 */
  }
}

@media (max-width: 576px) {
  .epds-options {
    gap: 0.5rem;
  }

  .epds-option {
    padding: 0.75rem 0.875rem;
    min-height: 50px;
  }

  .option-text {
    font-size: 0.8rem;
    line-height: 1.3;
  }
}

/* 无障碍优化 */
.epds-option:focus-within {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.epds-option input[type="radio"]:focus {
  outline: none;
}

/* 动画效果 */
.epds-option {
  animation: fadeInUp 0.4s ease-out;
}

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

/* 打印样式 */
@media print {
  .epds-option {
    border: 1px solid #ddd !important;
    background: white !important;
  }

  .epds-option:has(input[type="radio"]:checked) {
    background: #f0f0f0 !important;
  }
}

/* 深色模式支持（如果网站支持） */
@media (prefers-color-scheme: dark) {
  .epds-option {
    background: #2d3748;
    border-color: #4a5568;
  }

  .epds-option:hover {
    background: #4a5568;
    border-color: var(--primary-color);
  }

  .option-text {
    color: #e2e8f0;
  }
}

/* ====== 宝宝起名工具专用样式 ====== */

/* 方法选择按钮增强 */
.ovulation-method-selector .btn-outline-primary {
  border-width: 2px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0.75rem 0.5rem;
  font-size: 0.9rem;
}

.ovulation-method-selector .btn-outline-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(233, 30, 99, 0.2);
}

.ovulation-method-selector .btn-check:checked + label {
  background: linear-gradient(135deg, var(--primary-color), #ad1457);
  border-color: var(--primary-color);
  color: white;
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(233, 30, 99, 0.3);
}

.ovulation-method-selector i {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

/* 名字卡片样式 */
.name-card {
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.name-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
  border-color: var(--primary-color);
}

.name-card.border-success {
  border-color: #28a745;
  background: linear-gradient(135deg, #f8fff9, #ffffff);
}

.name-card.bg-light {
  background: linear-gradient(135deg, #fff3cd, #ffffff);
}

/* 评分徽章样式 */
.badge {
  font-weight: 600;
  padding: 0.5rem 0.75rem;
}

.badge.fs-6 {
  font-size: 0.875rem !important;
}

/* 五行颜色系统 */
.bg-wood {
  background-color: #28a745 !important;
}
.bg-fire {
  background-color: #dc3545 !important;
}
.bg-earth {
  background-color: #ffc107 !important;
}
.bg-metal {
  background-color: #6c757d !important;
}
.bg-water {
  background-color: #17a2b8 !important;
}

.text-wood {
  color: #28a745 !important;
}
.text-fire {
  color: #dc3545 !important;
}
.text-earth {
  color: #ffc107 !important;
}
.text-metal {
  color: #6c757d !important;
}
.text-water {
  color: #17a2b8 !important;
}

/* 八字分析面板 */
.bazi-analysis-panel {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-radius: 15px;
  padding: 1.5rem;
  margin-top: 1rem;
  border: 1px solid #dee2e6;
}

.bazi-pillar {
  background: white;
  border-radius: 10px;
  padding: 1rem;
  margin: 0.5rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.bazi-pillar:hover {
  transform: translateY(-2px);
}

.bazi-pillar .tian-gan {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
}

.bazi-pillar .di-zhi {
  font-size: 1.2rem;
  color: #6c757d;
}

.bazi-pillar .element {
  font-size: 0.9rem;
  color: #28a745;
}

/* 诗词典故卡片 */
.poetry-card {
  background: linear-gradient(135deg, #fff8e1, #ffffff);
  border-left: 4px solid #ffc107;
  padding: 1rem;
  margin: 0.5rem 0;
  border-radius: 0 10px 10px 0;
  transition: all 0.3s ease;
}

.poetry-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateX(5px);
}

.poetry-card .source {
  font-size: 0.8rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.poetry-card .content {
  font-style: italic;
  color: #495057;
  margin-bottom: 0.5rem;
}

.poetry-card .extractable {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.poetry-card .char-badge {
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 15px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.poetry-card .char-badge:hover {
  background: #c2185b;
  transform: scale(1.1);
}

/* 成语卡片 */
.idiom-card {
  background: linear-gradient(135deg, #e8f5e9, #ffffff);
  border-left: 4px solid #28a745;
  padding: 1rem;
  margin: 0.5rem 0;
  border-radius: 0 10px 10px 0;
  transition: all 0.3s ease;
}

.idiom-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateX(5px);
}

.idiom-card .idiom {
  font-size: 1.1rem;
  font-weight: bold;
  color: #28a745;
  margin-bottom: 0.5rem;
}

.idiom-card .meaning {
  font-size: 0.9rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.idiom-card .characters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* 名字详情模态框 */
.name-detail-modal .modal-content {
  border-radius: 15px;
  border: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.name-detail-modal .modal-header {
  background: linear-gradient(135deg, var(--primary-color), #ad1457);
  color: white;
  border-radius: 15px 15px 0 0;
}

.name-detail-modal .modal-body {
  max-height: 70vh;
  overflow-y: auto;
}

.name-detail-modal .table th {
  background-color: #f8f9fa;
  border: none;
  font-weight: 600;
}

.name-detail-modal .table td {
  vertical-align: middle;
  border: none;
  border-bottom: 1px solid #e9ecef;
}

/* 收藏功能 */
.favorite-names-panel {
  background: linear-gradient(135deg, #fff3e0, #ffffff);
  border-radius: 15px;
  padding: 1.5rem;
  margin-top: 2rem;
  border: 2px solid #ffc107;
}

.favorite-name-item {
  background: white;
  border-radius: 10px;
  padding: 1rem;
  margin: 0.5rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.favorite-name-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.favorite-name-item .name-info h6 {
  margin: 0;
  color: var(--primary-color);
}

.favorite-name-item .name-info small {
  color: #6c757d;
}

.favorite-name-item .actions {
  display: flex;
  gap: 0.5rem;
}

/* 响应式优化 */
@media (max-width: 768px) {
  .ovulation-method-selector .btn-outline-primary {
    font-size: 0.8rem;
    min-height: 50px;
    padding: 0.5rem 0.25rem;
  }

  .ovulation-method-selector i {
    font-size: 1rem;
  }

  .name-card .card-body {
    padding: 1rem;
  }

  .name-card h4 {
    font-size: 1.2rem;
  }

  .bazi-pillar {
    margin: 0.25rem 0;
  }

  .poetry-card,
  .idiom-card {
    padding: 0.75rem;
  }
}

@media (max-width: 576px) {
  .name-card .card-footer {
    padding: 0.5rem;
  }

  .name-card .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }

  .modal-dialog {
    margin: 0.5rem;
  }

  .modal-content {
    border-radius: 10px;
  }
}

/* 动画效果 */
@keyframes nameCardAppear {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.name-card {
  animation: nameCardAppear 0.5s ease-out;
}

@keyframes baziGlow {
  0%,
  100% {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  50% {
    box-shadow: 0 4px 20px rgba(233, 30, 69, 0.3);
  }
}

.bazi-pillar {
  animation: baziGlow 3s ease-in-out infinite;
}

/* 打印样式 */
@media print {
  .navbar,
  footer,
  .btn,
  .modal {
    display: none !important;
  }

  .name-card {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }

  .bazi-analysis-panel {
    background: white !important;
  }

  .poetry-card,
  .idiom-card {
    background: white !important;
    border: 1px solid #ddd !important;
  }
}

/* 特殊效果 */
.name-card.recommended {
  position: relative;
  overflow: hidden;
}

.name-card.recommended::before {
  content: "推荐";
  position: absolute;
  top: 10px;
  right: -30px;
  background: #ffc107;
  color: #212529;
  padding: 0.25rem 2rem;
  transform: rotate(45deg);
  font-size: 0.75rem;
  font-weight: bold;
}

/* 加载动画 */
.loading-names {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(233, 30, 99, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 工具提示增强 */
.name-card .custom-tooltip {
  position: relative;
}

.name-card .custom-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  font-size: 0.875rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.name-card .custom-tooltip:hover::after {
  opacity: 1;
  visibility: visible;
  bottom: calc(100% + 5px);
}
