: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;
}
