body {
  background: #f0f4f8;
  font-family: 'Roboto', sans-serif;
  margin: 0;
  color: #333;
}

.calendar-container {
  width: 90%;
  max-width: 900px;
  margin: 30px auto;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  padding-bottom: 20px;
  overflow: hidden;
}

.lookup-section {
  padding: 20px 30px;
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  border-radius: 16px 16px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lookup-section div {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lookup-section b {
  font-weight: 500;
  color: #2e7d32;
}

.lookup-section input[type="number"],
.lookup-section input[type="date"] {
  font-size: 14px;
  padding: 8px 12px;
  border: 1px solid #c8e6c9;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.3s;
  width: 60px;
}

.lookup-section input[type="date"] {
  width: auto;
}

.lookup-section input[type="number"]:focus,
.lookup-section input[type="date"]:focus {
  border-color: #4caf50;
}

.lookup-section label {
  font-size: 14px;
  color: #2e7d32;
}

.lookup-section button {
  padding: 8px 16px;
  background: #4caf50;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s, transform 0.1s;
}

.lookup-section button:hover {
  background: #388e3c;
  transform: translateY(-1px);
}

.lookup-section button:active {
  transform: translateY(0);
}

.lookup-section span {
  margin-left: 10px;
  color: #2e7d32;
  font-weight: 500;
  font-size: 14px;
}

.calendar-header {
  background: linear-gradient(135deg, #4caf50, #2e7d32);
  color: #fff;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

#calendar-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  letter-spacing: 1px;
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: none;
  font-size: 24px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.3s, transform 0.1s;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-50%) scale(1.1);
}

#prev-month { left: 20px; }
#next-month { right: 20px; }

.calendar-table {
  width: 100%;
  border-collapse: collapse;
}

.calendar-table th, .calendar-table td {
  border: 1px solid #e0e0e0;
  width: 14.285%;
  height: 90px;
  vertical-align: top;
  padding: 8px;
  font-size: 14px;
  position: relative;
  background: #fff;
  transition: background 0.3s, transform 0.1s;
}

.calendar-table th {
  background: #66bb6a;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 0;
  border-top: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.calendar-table td:hover {
  background: #f5f5f5;
  transform: scale(1.02);
}

.calendar-table td.selected {
  background: #a5d6a7 !important;
  border: 2px solid #4caf50;
  transform: scale(1.02);
}

.calendar-table td .solar {
  font-weight: 600;
  color: #222;
  font-size: 18px;
}

.calendar-table td .lunar {
  font-size: 12px;
  color: #757575;
  margin-top: 4px;
}

.calendar-table td .canchi {
  font-size: 12px;
  color: #388e3c;
  margin-top: 4px;
}

.calendar-table td .dot {
  font-size: 16px;
  line-height: 1;
  position: absolute;
  top: 8px;
  right: 8px;
}

.calendar-table td.other-month {
  background: #f9f9f9;
  color: #bdbdbd;
}

.calendar-table td.today {
  background: #e8f5e9;
  border: 2px solid #2e7d32;
}

@media (max-width: 768px) {
  .calendar-container {
    width: 100%;
    margin: 20px 10px;
  }

  .lookup-section {
    padding: 15px;
    gap: 10px;
  }

  .lookup-section input[type="number"],
  .lookup-section input[type="date"] {
    padding: 6px 8px;
    font-size: 13px;
    width: 50px;
  }

  .lookup-section input[type="date"] {
    width: auto;
  }

  .lookup-section button {
    padding: 6px 12px;
    font-size: 13px;
  }

  .lookup-section span {
    font-size: 13px;
  }

  .calendar-header {
    padding: 15px;
  }

  #calendar-title {
    font-size: 20px;
  }

  .nav-btn {
    font-size: 20px;
    width: 36px;
    height: 36px;
  }

  .calendar-table th, .calendar-table td {
    height: 70px;
    font-size: 12px;
    padding: 6px;
  }

  .calendar-table th {
    font-size: 12px;
    padding: 10px 0;
  }

  .calendar-table td .solar {
    font-size: 16px;
  }

  .calendar-table td .lunar,
  .calendar-table td .canchi {
    font-size: 11px;
  }

  .calendar-table td .dot {
    font-size: 14px;
    top: 6px;
    right: 6px;
  }
}

@media (max-width: 480px) {
  .lookup-section div {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .lookup-section span {
    margin-left: 0;
  }

  .lookup-section input[type="number"],
  .lookup-section input[type="date"] {
    width: 100%;
    max-width: 150px;
  }

  .calendar-table th, .calendar-table td {
    height: 60px;
    font-size: 11px;
  }

  .calendar-table td .solar {
    font-size: 14px;
  }

  .calendar-table td .lunar,
  .calendar-table td .canchi {
    font-size: 10px;
  }
}