* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, sans-serif;
}

body {
  background-color: #121212;
  color: #e0e0e0;
  display: flex;
  justify-content: center;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 480px;
}

.card {
  background: #1e1e1e;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hidden {
  display: none !important;
}

h1, h2 {
  margin-bottom: 16px;
  font-size: 1.4rem;
}

input {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 8px;
  border: 1px solid #333;
  background: #2a2a2a;
  color: #fff;
  font-size: 1rem;
}

.btn-group {
  display: flex;
  gap: 10px;
}

button {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

button:hover {
  opacity: 0.9;
}

button.primary { background: #3b82f6; color: #fff; }
button.secondary { background: #374151; color: #fff; }
button.work { background: #10b981; color: #fff; }
button.break { background: #f59e0b; color: #000; }
button.stop { background: #ef4444; color: #fff; }
button.small { flex: none; padding: 6px 12px; font-size: 0.85rem; background: #333; color: #ccc; }

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.timer-card {
  text-align: center;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.badge.idle { background: #374151; color: #9ca3af; }
.badge.WORK { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.badge.BREAK { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }

.timer {
  font-size: 3rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-bottom: 20px;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.summary-card {
  margin-bottom: 0;
  padding: 16px;
  text-align: center;
}

.summary-label {
  display: block;
  font-size: 0.85rem;
  color: #9ca3af;
  margin-bottom: 6px;
}

.summary-value {
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}

.work-text { color: #10b981; }
.break-text { color: #f59e0b; }

.history-list {
  list-style: none;
}

.history-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #2a2a2a;
  font-size: 0.9rem;
}

.history-item:last-child {
  border-bottom: none;
}

.error {
  color: #ef4444;
  margin-top: 10px;
  font-size: 0.9rem;
}