body {
  margin: 0;
  padding: 0;
  font-family: 'Arial', sans-serif;
  background-color: #f9f9f9;
  color: #333;
}

h1, h2, h3 {
  color: #5a5a5a;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.week-display {
  background-color: #e0f7fa;
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.med-tracker {
  background-color: #fff3e0;
  border-radius: 10px;
  padding: 15px;
  margin-top: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.calendar-widget {
  background-color: #e8f5e9;
  border-radius: 10px;
  padding: 15px;
  margin-top: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.task-manager {
  background-color: #fffde7;
  border-radius: 10px;
  padding: 15px;
  margin-top: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

button {
  background-color: #00796b;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 10px 15px;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #004d40;
}

input[type="text"], input[type="date"], textarea {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

input[type="text"]:focus, input[type="date"]:focus, textarea:focus {
  border-color: #00796b;
  outline: none;
}

.task-list {
  list-style-type: none;
  padding: 0;
}

.task-list li {
  background-color: #ffffff;
  border-radius: 5px;
  padding: 10px;
  margin: 5px 0;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

/* Calendar styles */
#calendar-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.calendar-header button {
    background: #f8e1ea;
    border: none;
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    color: #c85a90;
    font-weight: bold;
}

.calendar-header button:hover {
    background: #f5d1e1;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
}

#calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day {
    aspect-ratio: 1;
    border-radius: 12px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    background: #f7f8fa;
    transition: all 0.2s;
}

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

.calendar-day.today {
    border: 2px solid #c85a90;
}

.calendar-day.with-records {
    background: #eefaf0;
}

.calendar-day.incomplete {
    background: #fff7f7;
}

.calendar-day .date {
    font-size: 1.1em;
    font-weight: 600;
    color: #444;
}

.calendar-day .indicator {
    margin-top: 4px;
    font-size: 0.8em;
    color: #666;
}

/* Task Manager Styles */
#task-manager {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
}

.task-controls {
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    justify-content: flex-start;
}

.task-list {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.task-item {
    padding: 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.2s;
}

.task-item:last-child {
    border-bottom: none;
}

.task-item:hover {
    background-color: #f8f9fa;
}

.task-info {
    flex: 1;
}

.task-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.task-dose {
    color: #666;
    font-size: 0.9em;
}

.task-notes {
    color: #888;
    font-size: 0.85em;
    margin-top: 4px;
}

.task-actions {
    display: flex;
    gap: 8px;
}

/* Dialog Styles */
dialog {
    border: none;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.15);
}

dialog::backdrop {
    background: rgba(0,0,0,0.4);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #444;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

.dialog-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

/* Button Styles */
.primary-btn {
    background: #ff8fb1;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
}

.secondary-btn {
    background: #f2d9e6;
    color: #c85a90;
    border: none;
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
}

.danger-btn {
    background: #ffe7e7;
    color: #e74c3c;
    border: none;
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
}

/* Settings Styles */
#settings-panel {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
}

.settings-group {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.settings-group h3 {
    color: #2c3e50;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.setting-item {
    margin-bottom: 16px;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-item label {
    display: block;
    margin-bottom: 8px;
    color: #444;
}

.setting-item input[type="date"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

.setting-hint {
    margin-top: 8px;
    color: #666;
    font-size: 0.9em;
}

.theme-colors {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.color-btn {
    width: 40px;
    height: 40px;
    border-radius: 20px;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s;
}

.color-btn:hover {
    transform: scale(1.1);
}

.color-btn.active {
    border-color: #333;
}

.about-info {
    color: #666;
    line-height: 1.6;
}

/* 药物打卡列表样式 */
#med-records {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 15px;
}

.med-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.2s;
}

.med-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.med-row .task-info {
  flex: 1;
  padding-right: 15px;
}

.med-row .task-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.med-row .task-dose {
  color: var(--text-secondary);
  font-size: 0.9em;
  margin-bottom: 2px;
}

.med-row .task-notes {
  color: var(--text-secondary);
  font-size: 0.85em;
}

.med-row input[type="checkbox"] {
  width: 24px;
  height: 24px;
  margin: 0;
  cursor: pointer;
  border: 2px solid var(--primary-color);
  border-radius: 4px;
}

.med-row.done {
  background: var(--primary-light);
}

.med-row.done .task-name {
  text-decoration: line-through;
  color: var(--text-secondary);
}

/* 日历组件样式 */
.calendar-container {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 auto;
  padding: 0 15px;
}

.calendar {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .calendar {
    font-size: 14px;
  }

  .calendar th,
  .calendar td {
    padding: 8px 4px;
    height: 36px;
    min-width: 36px;
  }

  .calendar td span {
    width: 32px;
    height: 32px;
    line-height: 32px;
  }

  .date-controls {
    padding: 0 10px;
  }

  .date-controls button {
    padding: 6px 12px;
    font-size: 14px;
  }
}

/* 超小屏幕适配 */
@media (max-width: 360px) {
  .calendar {
    font-size: 12px;
  }

  .calendar th,
  .calendar td {
    padding: 6px 2px;
    height: 32px;
    min-width: 32px;
  }

  .calendar td span {
    width: 28px;
    height: 28px;
    line-height: 28px;
  }
}

/* 孕周信息样式 */
#preg-week {
  font-weight: 700;
  font-size: 1.2em;
  color: var(--primary-color);
}

#pregnancy-overview {
  text-align: center;
  margin: 1rem 0;
}

#pregnancy-overview div:first-child {
  font-weight: 700;
  font-size: 1.2em;
  color: var(--primary-color);
}