*,
*::before,
*::after {
  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;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  color: #1a1a2e;
}

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

.card {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.subtitle {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 1.75rem;
}

.field {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #333;
}

input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

input.invalid {
  border-color: #e53935;
}

.error {
  display: block;
  color: #e53935;
  font-size: 0.8rem;
  margin-top: 0.35rem;
  min-height: 1rem;
}

.submit-btn,
.reset-btn {
  width: 100%;
  padding: 0.85rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.submit-btn {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  margin-top: 0.5rem;
}

.submit-btn:hover {
  opacity: 0.92;
}

.submit-btn:active {
  transform: scale(0.98);
}

.result {
  margin-top: 0.5rem;
}

.hidden {
  display: none;
}

.result h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: #667eea;
}

.result dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
  margin-bottom: 1.5rem;
}

.result dt {
  font-weight: 600;
  color: #666;
}

.result dd {
  font-weight: 500;
}

.reset-btn {
  background: #f0f0f5;
  color: #333;
}

.reset-btn:hover {
  background: #e4e4ec;
}
