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

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f0f4f8;
  font-family: Arial, sans-serif;
}

.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

h1 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: #1a202c;
}

.field {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
  font-weight: bold;
  color: #4a5568;
}

input[type="number"] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  font-size: 1rem;
  color: #1a202c;
  outline: none;
  transition: border-color 0.2s;
}

input[type="number"]:focus {
  border-color: #3b82f6;
}

.tip-buttons {
  display: flex;
  gap: 0.5rem;
}

.tip-btn {
  flex: 1;
  padding: 0.6rem 0;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  background: #f7fafc;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.tip-btn:hover {
  background: #ebf4ff;
  border-color: #3b82f6;
}

.tip-btn.active {
  background: #3b82f6;
  color: #ffffff;
  border-color: #3b82f6;
}

.tip-buttons input[type="number"] {
  flex: 1;
  text-align: center;
}

.results {
  background: #edf2f7;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #4a5568;
  font-size: 0.9rem;
}

.result-row span:last-child {
  font-size: 1.1rem;
  font-weight: bold;
  color: #1a202c;
}

.result-row.highlight span:last-child {
  font-size: 1.4rem;
  color: #2b6cb0;
}

#reset-btn {
  width: 100%;
  padding: 0.75rem;
  background: #e53e3e;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

#reset-btn:hover {
  background: #c53030;
}
