/* General Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #333;
}

/* Main Container Card */
#main {
  background: #ffffff;
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 600px;
  text-align: center;
}

/* Header styling */
h1 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: #2c3e50;
}

#username {
  display: inline-block;
  margin-right: 6px;
}

/* Main Category Dropdown */
#select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background-color: #f8fafc;
  color: #1e293b;
  margin-bottom: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

#select:focus,
input[type="number"]:focus,
select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Input Section Layout */
#input-div {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

@media (min-width: 500px) {
  #input-div {
    flex-direction: row;
    justify-content: space-between;
  }
}

#wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

@media (min-width: 500px) {
  #wrap {
    width: 44%;
  }
}

/* Number Inputs */
input[type="number"] {
  height: 15vh;
  text-align: center;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1.1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background-color: #f8fafc;
  color: #1e293b;
}

/* Remove number input spin arrows */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Unit Selection Dropdowns */
#from_select select,
#to_select select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background-color: #ffffff;
  color: #475569;
  cursor: pointer;
}

/* Equal Sign Divider */
#equal {
  font-size: 1.5rem;
  font-weight: bold;
  color: #94a3b8;
  margin: 0.2rem 0;
}

@media (min-width: 500px) {
  #equal {
    margin-top: 2rem;
  }
}

/* Formula Display Container */
#show-formula {
  margin-top: 1rem;
  padding: 0.75rem;
  font-size: 0.95rem;
  color: #64748b;
  background-color: #f1f5f9;
  border-radius: 6px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
