* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1f2937, #111827);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  color: #f3f4f6;
}

.app {
  background: #1e293b;
  border-radius: 20px;
  padding: 40px 32px;
  width: 340px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  text-align: center;
}

h1 {
  margin: 0 0 24px;
  font-size: 20px;
  font-weight: 600;
  color: #cbd5e1;
}

.time-display {
  font-size: 64px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
  margin-bottom: 24px;
  transition: color 0.2s;
}

.time-display.warning {
  color: #f87171;
}

.time-display.finished {
  color: #ef4444;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.inputs {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 16px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 12px;
  color: #94a3b8;
}

.input-group input {
  width: 72px;
  padding: 10px;
  font-size: 18px;
  text-align: center;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #f3f4f6;
}

.input-group input:focus {
  outline: none;
  border-color: #6366f1;
}

.presets {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.preset-btn {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 999px;
  border: 1px solid #334155;
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.preset-btn:hover {
  background: #334155;
  border-color: #475569;
}

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

.btn {
  flex: 1;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  background: #334155;
  color: #f3f4f6;
  transition: background 0.15s, opacity 0.15s;
}

.btn:hover:not(:disabled) {
  background: #475569;
}

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

.btn-primary {
  background: #6366f1;
}

.btn-primary:hover:not(:disabled) {
  background: #4f46e5;
}
