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

body {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

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

header {
  padding: 20px 0;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 600;
}

section {
  background: #fff;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid #ddd;
}

h2 {
  font-size: 1rem;
  margin-bottom: 16px;
  font-weight: 600;
}

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

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

.time-group {
  flex: 2;
}

.rating-group {
  flex: 1;
}

label {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 4px;
}

input, textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ccc;
  font-size: 0.9rem;
}

input:focus, textarea:focus {
  outline: none;
  border-color: #666;
}

textarea {
  resize: vertical;
  min-height: 60px;
}

.btn-submit {
  width: 100%;
  padding: 10px;
  background: #333;
  color: #fff;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
}

.btn-submit:hover {
  background: #555;
}

.btn-submit:disabled {
  background: #999;
}

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

#recordCount {
  font-size: 0.875rem;
  color: #666;
}

.empty {
  text-align: center;
  padding: 40px;
  color: #666;
}

.log-item {
  border-bottom: 1px solid #eee;
  padding: 16px 0;
  position: relative;
}

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

.log-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: #666;
}

.log-rating {
  font-weight: 600;
}

.log-content {
  font-weight: 500;
  margin-bottom: 4px;
}

.log-trigger, .log-harvest {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 2px;
}

.log-actions {
  margin-top: 8px;
}

.btn-delete {
  font-size: 0.8rem;
  color: #c00;
  background: none;
  border: none;
  cursor: pointer;
}

.btn-delete:hover {
  text-decoration: underline;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: #fff;
  padding: 20px;
  max-width: 300px;
  width: 100%;
  text-align: center;
}

.modal-content p {
  margin-bottom: 16px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.modal-actions button {
  padding: 8px 20px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
}

.modal-actions button:hover {
  background: #f5f5f5;
}

.btn-danger {
  color: #c00;
  border-color: #c00 !important;
}

.error, .success {
  padding: 10px;
  margin-bottom: 16px;
  font-size: 0.85rem;
}

.error {
  background: #fee;
  color: #c00;
}

.success {
  background: #efe;
  color: #060;
}

@media (max-width: 640px) {
  .container {
    padding: 10px;
  }

  section {
    padding: 16px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }
}
