* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1f1c2c, #928dab);
  font-family: "Segoe UI", "Hiragino Sans", sans-serif;
}

.card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 32px 40px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  text-align: center;
  width: 340px;
}

h1 {
  margin: 0 0 16px;
  font-size: 20px;
  color: #333;
}

.display {
  font-size: 52px;
  font-weight: bold;
  letter-spacing: 2px;
  color: #222;
  margin-bottom: 20px;
  font-variant-numeric: tabular-nums;
}

.display .ms {
  font-size: 28px;
  color: #6c5ce7;
}

.display.running {
  color: #2d3436;
}

.controls {
  display: flex;
  gap: 8px;
  justify-content: center;
}

button {
  flex: 1;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  background: #6c5ce7;
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

button:hover {
  background: #5a4bd1;
}

button:active {
  transform: scale(0.96);
}

button:disabled {
  background: #b2b2b2;
  cursor: not-allowed;
}

#startBtn.running {
  background: #e17055;
}

#startBtn.running:hover {
  background: #c85f45;
}

#resetBtn {
  background: #d63031;
}

#resetBtn:hover {
  background: #b52a2b;
}

.laps {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  max-height: 160px;
  overflow-y: auto;
  text-align: left;
}

.laps li {
  display: flex;
  justify-content: space-between;
  padding: 6px 4px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  color: #444;
  font-variant-numeric: tabular-nums;
}

.laps li .index {
  color: #888;
}

.hint {
  margin: 20px 0 0;
  font-size: 11px;
  color: #999;
  line-height: 1.6;
}
