* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #e8f4fd 0%, #fdf0f6 100%);
  min-height: 100vh;
  padding: 20px;
  color: #2d3a4a;
}

.app {
  max-width: 680px;
  margin: 0 auto;
}

.app-header {
  text-align: center;
  margin-bottom: 24px;
}

.app-header h1 {
  font-size: 28px;
  color: #1f6fb2;
  margin-bottom: 6px;
}

.subtitle {
  color: #7a8ba0;
  font-size: 14px;
}

.reminder-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffe9e6;
  border: 2px solid #ff6b57;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
  animation: pulse 1.2s ease-in-out infinite;
}

.reminder-banner.hidden {
  display: none;
}

.reminder-content {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: #c63a28;
}

.reminder-icon {
  font-size: 22px;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 87, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(255, 107, 87, 0); }
}

.card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(31, 111, 178, 0.08);
}

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

.card-header h2 {
  font-size: 18px;
  color: #1f6fb2;
}

.progress {
  font-size: 14px;
  color: #1f6fb2;
  font-weight: 600;
}

.progress-bar {
  height: 8px;
  background: #e6eef6;
  border-radius: 4px;
  margin-top: 14px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4fc3f7, #29b6f6);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.today-list, .medicine-list, .history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.empty {
  text-align: center;
  color: #a0aec0;
  padding: 20px 0;
  font-size: 14px;
}

.today-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f7fafd;
  border: 1px solid #e2edf6;
  border-radius: 12px;
  padding: 12px 16px;
}

.today-item.overdue {
  border-color: #ff6b57;
  background: #fff5f3;
}

.today-item.done {
  border-color: #b2e3c2;
  background: #f0faf3;
}

.today-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.today-time {
  font-size: 20px;
  font-weight: 700;
  color: #1f6fb2;
}

.today-item.done .today-time {
  color: #2e9e5b;
  text-decoration: line-through;
}

.today-name {
  font-size: 15px;
  font-weight: 600;
}

.today-dose {
  font-size: 13px;
  color: #8a97a8;
}

.today-status {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 6px;
}

.status-pending {
  background: #fff3d6;
  color: #c78c1d;
}

.status-overdue {
  background: #ffe0db;
  color: #c63a28;
}

.btn-check {
  border: none;
  border-radius: 20px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: #29b6f6;
  color: #fff;
  transition: all 0.2s;
}

.btn-check:hover {
  background: #1f9ee0;
}

.btn-check.done {
  background: #e6eef6;
  color: #7a8ba0;
  cursor: default;
}

.medicine-form {
  background: #f7fafd;
  border: 1px dashed #bcd7ec;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.form-times {
  flex-wrap: wrap;
}

.times-wrap {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}

input[type="text"] {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid #d6e3ee;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}

input[type="text"]:focus {
  border-color: #29b6f6;
}

.time-input {
  padding: 8px 10px;
  border: 1px solid #d6e3ee;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
}

.time-input:focus {
  border-color: #29b6f6;
}

.btn-primary {
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  background: #1f6fb2;
  color: #fff;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #185d96;
}

.btn-small {
  border: none;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 13px;
  cursor: pointer;
  background: #e6eef6;
  color: #4a5a6e;
  transition: background 0.2s;
}

.btn-small:hover {
  background: #d3e3f1;
}

.btn-outline {
  background: #fff;
  border: 1px solid #bcd7ec;
  color: #1f6fb2;
}

.btn-outline:hover {
  background: #f0f7fd;
}

.medicine-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f7fafd;
  border: 1px solid #e2edf6;
  border-radius: 12px;
  padding: 12px 16px;
}

.medicine-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.medicine-title {
  font-size: 15px;
  font-weight: 600;
}

.medicine-times {
  font-size: 13px;
  color: #8a97a8;
}

.btn-delete {
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  background: #ffe9e6;
  color: #c63a28;
  transition: background 0.2s;
}

.btn-delete:hover {
  background: #ffd5d0;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f7fafd;
  border: 1px solid #e2edf6;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
}

.history-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-time {
  font-weight: 600;
  color: #1f6fb2;
}

.history-name {
  color: #5a6b7e;
}

.history-date {
  color: #a0aec0;
  font-size: 12px;
}
