*{
  margin: 0;
  padding: 0;
}

body {
  background-color: #f1f2f3;
}

.container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1560px;
  min-width: 1240px;
  margin: 25px auto;
  position: relative;
  color: #333;
}

.container * {
  box-sizing: border-box;
}

header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 25px;
  width: 100%;
}

header h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}

header p {
  opacity: 0.9;
  font-size: 1.1rem;
}


.tools-container {
  display: flex;
  gap: 25px;
  margin-bottom: 25px;
}

.tool-section {
  flex: 1;
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  padding: 20px;
  transition: transform 0.3s ease;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #3498db;
}

.input-group {
  margin-bottom: 20px;
  position: relative;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #2c3e50;
}

/* 优化后的日期选择器样式 */
.flatpickr-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  background: white;
  cursor: pointer;
  transition: all 0.3s;
}

.flatpickr-input:hover {
  border-color: #3498db;
}

.flatpickr-input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.calculate-btn {
  background: #3498db;
  color: white;
  border: none;
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  width: 100%;
  font-weight: 600;
  transition: background 0.3s;
  margin-top: 10px;
}

.calculate-btn:hover {
  background: #2980b9;
}

.results-container {
  margin-top: 30px;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.result-item {
  background: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.result-label {
  font-weight: 500;
  color: #7f8c8d;
  margin-bottom: 5px;
}

.result-value {
  font-size: 1.2rem;
  color: #2c3e50;
  font-weight: 600;
}

.date-options {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}
.date-options #direction,
.date-options #quantity,
.date-options #unit{
  flex: 1;
}

select,
.number-input {
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
}

.number-input {
  width: 100px;
}

.date-result {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 25px;
  text-align: center;
  margin-top: 20px;
}

.date-result-value {
  font-size: 2.2rem;
  font-weight: 700;
  color: #27ae60;
  margin-bottom: 10px;
}

.date-result-weekday {
  font-size: 1.4rem;
  color: #7f8c8d;
}

footer {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.footer-title {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #2c3e50;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-bottom: 20px;
}

.feature {
  text-align: center;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 12px;
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.feature-title {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: #2c3e50;
}

.feature-desc {
  color: #7f8c8d;
}

.about {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
}

.about h3 {
  font-size: 1.25rem;
  margin-bottom: 15px;
  color: #2c3e50;
}

.copyright {
  text-align: center;
  margin-top: 20px;
  color: #7f8c8d;
}

.highlight {
  color: #e74c3c;
  font-weight: bold;
}

/* 自定义Flatpickr按钮 */
.flatpickr-today-button {
  background: #3498db !important;
  color: white !important;
  border: none !important;
  border-radius: 4px !important;
  padding: 5px 10px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
}

.result-value:empty::after,
.date-result-value:empty::after,
.date-result-weekday:empty::after {
  content: "待计算";
  color: #999;
}

/* 确保结果容器在没有内容时也有最小高度 */
.result-value,
.date-result-value,
.date-result-weekday {
  min-height: 1.5em;
}
