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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f7fa;
  color: #333;
  min-height: 100vh;
}

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

h1 {
  font-size: 1.4rem;
  color: #2a6db5;
  text-align: center;
  padding: 16px 0 24px;
}

h2 {
  font-size: 1rem;
  color: #555;
  margin-bottom: 10px;
}

section {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* Input section */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

input[type="text"],
input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

input[type="text"]:focus,
input[type="number"]:focus {
  border-color: #2a6db5;
}

.time-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.time-row input {
  flex: 1;
}

.unit {
  font-size: 0.95rem;
  color: #666;
  white-space: nowrap;
}

button {
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

#addBtn {
  background: #2a6db5;
  color: #fff;
  width: 100%;
}

#addBtn:hover {
  background: #1d5490;
}

/* Task list */
#taskList {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

#taskList li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f0f4fa;
  border-radius: 6px;
  padding: 10px 12px;
  gap: 8px;
}

.task-info {
  flex: 1;
  font-size: 0.95rem;
}

.task-time {
  color: #2a6db5;
  font-weight: bold;
  white-space: nowrap;
  font-size: 0.9rem;
}

.delete-btn {
  background: none;
  color: #aaa;
  font-size: 1.1rem;
  padding: 2px 6px;
  border-radius: 4px;
}

.delete-btn:hover {
  background: #fde;
  color: #e44;
}

#totalTime {
  font-size: 0.85rem;
  color: #888;
  font-weight: normal;
}

#clearBtn {
  background: #f0f0f0;
  color: #666;
  font-size: 0.9rem;
  width: 100%;
}

#clearBtn:hover {
  background: #e0e0e0;
}

/* Report section */
.report-header {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

input[type="date"] {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  outline: none;
  min-width: 140px;
}

input[type="date"]:focus {
  border-color: #2a6db5;
}

#generateBtn {
  background: #2a9d4a;
  color: #fff;
  white-space: nowrap;
}

#generateBtn:hover {
  background: #1e7a38;
}

#reportOutput {
  width: 100%;
  min-height: 160px;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  background: #fafafa;
  color: #333;
  margin-bottom: 10px;
  outline: none;
}

#copyBtn {
  background: #555;
  color: #fff;
  width: 100%;
}

#copyBtn:hover {
  background: #333;
}

.copy-msg {
  display: block;
  text-align: center;
  font-size: 0.85rem;
  color: #2a9d4a;
  margin-top: 6px;
  min-height: 1.2em;
}

@media (max-width: 400px) {
  h1 {
    font-size: 1.2rem;
  }

  .report-header {
    flex-direction: column;
  }

  input[type="date"] {
    width: 100%;
  }
}
