/* Colorful, Vibrant Root Setup */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  /* Deep, colorful sunset background gradient */
  background: linear-gradient(135deg, #fceade 0%, #f3e7fc 50%, #e1f5fe 100%);
  margin: 0;
  padding: 30px 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  color: #2e263d;
}

/* Strategic Ad Spaces */
.ad-container {
  width: 100%;
  max-width: 480px;
  margin: 15px 0;
  text-align: center;
}
.ad-label {
  font-size: 10px;
  color: #786e85;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 6px 0;
}
.ad-mock {
  background-color: rgba(255, 255, 255, 0.4);
  color: #554a63;
  border: 1px dashed #a393b5;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 13px;
  backdrop-filter: blur(4px);
}
.top-ad .ad-mock { height: 90px; }
.bottom-ad .ad-mock { height: 200px; max-width: 300px; margin: 0 auto; }

/* Warm Vanilla Colored Card Dashboard */
.calculator-card {
  background: #fffcf7; /* Warm bakery vanilla cream tint */
  padding: 35px 30px;
  border-radius: 24px;
  /* Double colored drop shadow for a modern pop effect */
  box-shadow: 0 20px 40px rgba(139, 92, 26, 0.06), 
              0 1px 10px rgba(123, 97, 162, 0.05);
  width: 100%;
  max-width: 480px;
  box-sizing: border-box;
  border: 2px solid #f7f1e3;
}

/* High-Impact Gradient Header Text */
h1 {
  margin: 0 0 4px 0;
  font-size: 28px;
  font-weight: 900;
  /* Vibrant Deep Purple to Warm Coral gradient */
  background: linear-gradient(135deg, #512da8 0%, #d81b60 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
}
.subtitle {
  margin: 0 0 30px 0;
  font-size: 14px;
  color: #7b6894;
  text-align: center;
  font-weight: 600;
}

/* Side-by-Side Flex Layout for Units */
.unit-row {
  display: flex;
  gap: 16px;
  width: 100%;
}
.unit-row .input-group {
  flex: 1;
}

/* Polished Input Form Layouts */
.input-group {
  margin-bottom: 22px;
}
label {
  display: block;
  font-weight: 700;
  font-size: 12px;
  color: #b15d14; /* Warm burnt caramel label text */
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
/* Colorful Input Box Adjustments */
select, input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #eedec9; /* Soft pastel cream border */
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  box-sizing: border-box;
  background-color: #ffffff;
  color: #382c1e;
  transition: all 0.25s ease;
  outline: none;
}
/* Glow borders with distinct custom colors when focused */
select:focus, input:focus {
  border-color: #d81b60;
  box-shadow: 0 0 0 4px rgba(216, 27, 96, 0.15);
  background-color: #fff;
}

/* Vivid High-Contrast Mint & Emerald Result Container */
.result-box {
  background: linear-gradient(135deg, #d4f7e1 0%, #a1edd0 100%);
  border: 2px solid #76dbae;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  margin-top: 25px;
  box-shadow: 0 8px 20px rgba(15, 105, 54, 0.08);
}
#output-value {
  font-size: 52px;
  font-weight: 900;
  color: #064e24; /* Deep forest green numeric values */
  display: block;
  line-height: 1;
  letter-spacing: -1px;
}
.unit {
  font-size: 15px;
  color: #065427;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 6px;
  display: inline-block;
}
