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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  color: white;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 30px;
}

.timer-display {
  font-size: 4rem;
  font-weight: bold;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 30px 50px;
  margin-bottom: 30px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.btn {
  font-size: 1.5rem;
  font-weight: bold;
  padding: 20px 60px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.btn:active {
  transform: scale(0.95);
}

.btn-start {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  color: white;
  box-shadow: 0 10px 30px rgba(17, 153, 142, 0.4);
}

.btn-stop {
  background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
  color: white;
  box-shadow: 0 10px 30px rgba(235, 51, 73, 0.4);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.stats {
  display: flex;
  gap: 20px;
  margin: 30px 0;
  flex-wrap: wrap;
  justify-content: center;
}

.stat-box {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 15px;
  padding: 15px 25px;
  text-align: center;
  min-width: 100px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: bold;
}

.stat-label {
  font-size: 0.75rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.history {
  width: 100%;
  max-width: 400px;
  margin-top: 20px;
}

.history h2 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.clear-btn {
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  cursor: pointer;
}

.history-list {
  list-style: none;
  max-height: 300px;
  overflow-y: auto;
}

.history-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px 15px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-date {
  font-size: 0.85rem;
  opacity: 0.8;
}

.history-duration {
  font-weight: bold;
  font-size: 1.1rem;
}

.empty-state {
  text-align: center;
  opacity: 0.7;
  padding: 30px;
  font-style: italic;
}

.emoji-rain {
  position: fixed;
  font-size: 2rem;
  animation: fall 3s linear forwards;
  pointer-events: none;
  z-index: 1000;
}

@keyframes fall {
  to {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}
