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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #e3f2fd;
  min-height: 100vh;
  color: #1a237e;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
}

/* Header */
header {
  text-align: center;
  padding: 20px 0 12px;
}

header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1565c0;
}

.date-display {
  font-size: 0.85rem;
  color: #5c6bc0;
  margin-top: 4px;
}

/* Goal Section */
.goal-section {
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.goal-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.goal-row label {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.goal-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.goal-input-wrap input {
  width: 90px;
  padding: 6px 8px;
  border: 1.5px solid #90caf9;
  border-radius: 8px;
  font-size: 0.95rem;
  text-align: right;
  color: #1a237e;
}

.goal-input-wrap span {
  font-size: 0.85rem;
  color: #5c6bc0;
}

#setGoalBtn {
  padding: 6px 14px;
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
}

#setGoalBtn:hover {
  background: #1565c0;
}

/* Progress Section */
.progress-section {
  background: #fff;
  border-radius: 12px;
  padding: 20px 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  text-align: center;
}

.progress-numbers {
  font-size: 2rem;
  font-weight: 700;
  color: #1565c0;
  margin-bottom: 12px;
}

.progress-numbers .current-amount {
  font-size: 2.4rem;
  color: #1976d2;
}

.progress-numbers .unit {
  font-size: 1rem;
  color: #5c6bc0;
  margin-left: 2px;
}

.progress-bar-wrap {
  background: #e3f2fd;
  border-radius: 99px;
  height: 22px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #42a5f5, #1565c0);
  border-radius: 99px;
  width: 0%;
  transition: width 0.4s ease;
}

.progress-bar.complete {
  background: linear-gradient(90deg, #26c6da, #00897b);
}

.remaining-text {
  font-size: 0.95rem;
  color: #5c6bc0;
}

.remaining-text.complete {
  color: #00897b;
  font-weight: 700;
}

/* Add Section */
.add-section {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.add-section h2 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1565c0;
  margin-bottom: 12px;
}

.add-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.add-form input[type="text"] {
  padding: 10px 12px;
  border: 1.5px solid #90caf9;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #1a237e;
  width: 100%;
}

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

.amount-row input {
  flex: 1;
  padding: 10px 12px;
  border: 1.5px solid #90caf9;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #1a237e;
  text-align: right;
}

.amount-row span {
  font-size: 0.85rem;
  color: #5c6bc0;
  white-space: nowrap;
}

.quick-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.quick-btn {
  padding: 6px 10px;
  background: #e3f2fd;
  color: #1565c0;
  border: 1.5px solid #90caf9;
  border-radius: 8px;
  font-size: 0.8rem;
  cursor: pointer;
  font-weight: 600;
}

.quick-btn:hover {
  background: #bbdefb;
}

.add-btn {
  padding: 12px;
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.add-btn:hover {
  background: #1565c0;
}

/* Records Section */
.records-section {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  margin-bottom: 24px;
}

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

.records-header h2 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1565c0;
}

.reset-btn {
  padding: 5px 12px;
  background: #fff;
  color: #e53935;
  border: 1.5px solid #ef9a9a;
  border-radius: 8px;
  font-size: 0.8rem;
  cursor: pointer;
}

.reset-btn:hover {
  background: #ffebee;
}

.record-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.record-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #f5faff;
  border-radius: 8px;
  border-left: 4px solid #42a5f5;
}

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

.record-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a237e;
}

.record-time {
  font-size: 0.75rem;
  color: #7986cb;
}

.record-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.record-amount {
  font-size: 1rem;
  font-weight: 700;
  color: #1976d2;
}

.delete-btn {
  background: none;
  border: none;
  color: #bdbdbd;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
}

.delete-btn:hover {
  color: #e53935;
}

.empty-msg {
  text-align: center;
  color: #90caf9;
  font-size: 0.9rem;
  padding: 12px 0;
}

input:focus {
  outline: none;
  border-color: #1976d2;
}

@media (max-width: 375px) {
  .progress-numbers {
    font-size: 1.6rem;
  }
  .progress-numbers .current-amount {
    font-size: 2rem;
  }
  .quick-buttons {
    gap: 4px;
  }
  .quick-btn {
    padding: 5px 8px;
    font-size: 0.75rem;
  }
}
