body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
               Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: #f9f9f9;
  margin: 0;
  padding: 20px;
  text-align: center;
  color: #333;
}

h1, h3 {
  margin-bottom: 10px;
}

#checkin-area {
  margin: 20px auto;
}

input[type="password"] {
  padding: 8px;
  font-size: 16px;
  width: 200px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

button {
  padding: 8px 16px;
  font-size: 16px;
  margin-left: 8px;
  background-color: #2ea44f;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

button:hover {
  background-color: #22863a;
}

#checkin-message {
  margin-top: 10px;
  color: red;
  font-weight: bold;
}

#heatmap-area, #bar-area {
  margin-top: 40px;
}

/* 柱状图自适应宽度，避免纵向拉伸 */
canvas#hour-chart {
  width: 100%;
  max-width: 800px;
  margin: auto;
  display: block;
}

/* 热图样式 */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(53, 12px);
  grid-auto-rows: 12px;
  gap: 2px;
  justify-content: center;
  margin: 20px auto;
  max-width: 100%;
}

.day-box {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background-color: #ebedf0;
  position: relative;
  cursor: pointer;
}

.day-box[data-count="1"] { background-color: #c6e48b; }
.day-box[data-count="2"] { background-color: #7bc96f; }
.day-box[data-count="3"] { background-color: #239a3b; }
.day-box[data-count="4"] { background-color: #196127; }
.day-box[data-count="5"] { background-color: #0e4215; }

.day-box:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  color: white;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 100;
  pointer-events: none;
}
