:root {
  --background-color: #eae2b7;
  --sunflower-gold: #fcbf49;
  --princeton-orange: #f77f00;
  --flag-red: #d62828;
  --deep-space_blue: #003049;
}

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

body {
  background: linear-gradient(135deg, var(--flag-red) 0%, var(--princeton-orange) 50%, var(--sunflower-gold) 100%);
  color: var(--deep-space_blue);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding: 20px;
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  max-width: 600px;
  margin: 0 auto;
}

.header {
  text-align: center;
  margin-bottom: 40px;
  animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h1 {
  color: white;
  font-size: clamp(28px, 8vw, 44px);
  margin-bottom: 12px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  font-weight: 700;
}

h2 {
  color: rgba(255, 255, 255, 0.95);
  font-size: clamp(16px, 5vw, 20px);
  margin-bottom: 0;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.form-card {
  background: white;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 25px;
}

.form-group:last-of-type {
  margin-bottom: 0;
}

label {
  display: block;
  color: var(--deep-space_blue);
  font-weight: 600;
  margin-bottom: 10px;
  font-size: clamp(14px, 4vw, 15px);
  letter-spacing: 0.2px;
}

select,
input[type="number"] {
  width: 100%;
  padding: 14px;
  border: 2px solid var(--flag-red);
  border-radius: 10px;
  font-size: 16px;
  background-color: #fafafa;
  color: var(--deep-space_blue);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23d62828' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

input[type="number"] {
  font-weight: 500;
}

input[type="number"]:focus,
select:focus {
  outline: none;
  border-color: var(--princeton-orange);
  background-color: white;
  box-shadow: 0 0 0 4px rgba(214, 40, 40, 0.15);
}

.input-with-unit {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-unit input {
  margin-bottom: 0;
}

.unit {
  position: absolute;
  right: 14px;
  color: var(--deep-space_blue);
  font-weight: 600;
  pointer-events: none;
}

.result-container {
  margin-top: 30px;
  padding-top: 25px;
  border-top: 2px solid var(--flag-red);
}

#res {
  display: block;
  padding: 18px 22px;
  background: linear-gradient(135deg, var(--flag-red) 0%, var(--princeton-orange) 100%);
  color: white;
  border-radius: 10px;
  font-size: clamp(16px, 4vw, 18px);
  font-weight: 600;
  min-height: 50px;
  display: flex;
  align-items: center;
  box-shadow: 0 4px 15px rgba(214, 40, 40, 0.3);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.footer {
  text-align: center;
  margin-top: 40px;
  animation: fadeIn 0.8s ease-in 0.3s both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

h4 {
  color: white;
  font-size: 14px;
  font-weight: 500;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

h4 a {
  color: white;
  text-decoration: none;
  font-weight: 700;
  border-bottom: 2px solid var(--sunflower-gold);
  transition: all 0.3s ease;
  padding-bottom: 2px;
}

h4 a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-bottom-color: white;
  padding: 0 4px 2px 4px;
}

@media (max-width: 600px) {
  body {
    padding: 15px;
  }

  .form-card {
    padding: 20px;
    border-radius: 12px;
  }

  .form-group {
    margin-bottom: 20px;
  }
}

br {
  display: none;
}
