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

body {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background-color: #f5f5f5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1a1a1a;
}

.card {
  background: white;
  border-radius: 24px;
  padding: 48px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  text-align: center;
  width: 640px;
  position: relative;
}

input[type="number"] {
  width: 50px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 14px;
  text-align: center;
}

.ring {
  width: 320px;
  height: 320px;
  margin-bottom: 32px;
  overflow: visible;
}

.ring-bg {
  fill: none;
  stroke: #ebebeb;
  stroke-width: 6;
}

.ring-progress {
  fill: none;
  stroke: #f97316;
  stroke-width: 6;
  stroke-linecap: round;
  transform: rotate(90deg) scaleX(-1);
  transform-origin: center;
  filter: drop-shadow(0 0 8px rgba(249, 115, 22, 0.5));
}

.ring-time {
  font-size: 56px;
  font-weight: 300;
  text-anchor: middle;
  dominant-baseline: central;
  fill: #1a1a1a;
}

.settings {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 32px;
  font-size: 14px;
  color: #666;
}

button {
  border: none;
  border-radius: 12px;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  color: white;
}

.buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

#start {
  background-color: #f97316;
}

#reset {
  background-color: #e0e0e0;
  color: #444;
}

#debug {
  background-color: #e0e0e0;
  color: #444;
  position: absolute;
  top: 20px;
  left: 24px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
}

#showStats {
  background-color: #e0e0e0;
  color: #444;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
}

.card-actions {
  position: absolute;
  top: 20px;
  right: 24px;
  display: flex;
  gap: 8px;
}

#showSettings {
  background-color: #e0e0e0;
  color: #444;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
}

.settings-form {
  display: flex;
  flex-direction: row;
  gap: 24px;
  margin-top: 24px;
  font-size: 14px;
  color: #666;
}

input[type="checkbox"] {
  appearance: none;
  width: 36px;
  height: 20px;
  background-color: #e0e0e0;
  border-radius: 10px;
  position: relative;
  cursor: pointer;
  vertical-align: middle;
  transition: background-color 0.2s;
}

input[type="checkbox"]::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: left 0.2s;
}

input[type="checkbox"]:checked {
  background-color: #f97316;
}

input[type="checkbox"]:checked::after {
  left: 18px;
}

.session-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.session-count {
  font-size: 16px;
  color: #666;
  margin-left: 8px;
  align-self: center;
  font-weight: 500;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #e0e0e0;
}

.dot.active {
  background-color: #f97316;
}

#todayStats {
  font-size: 13px;
  color: #999;
  margin-top: 12px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  border-radius: 24px;
  padding: 40px;
  width: 480px;
  position: relative;
}

#closeStats {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #e0e0e0;
  color: #444;
  padding: 8px 12px;
  font-size: 14px;
}

#closeSettings {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #e0e0e0;
  color: #444;
  padding: 8px 12px;
  font-size: 14px;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 120px;
  margin-top: 24px;
}

.bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.bar-fill {
  width: 100%;
  background-color: #f97316;
  border-radius: 4px 4px 0 0;
  min-height: 4px;
}

.bar-label {
  font-size: 10px;
  color: #999;
  margin-top: 4px;
}

h3 {
  font-size: 14px;
  color: #666;
  margin-top: 24px;
  margin-bottom: 12px;
  text-align: left;
}

.heatmap {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.heatmap-cell {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background-color: #ebebeb;
}

.heatmap-cell.level-1 {
  background-color: #fdba74;
}

.heatmap-cell.level-2 {
  background-color: #f97316;
}
