.binary_to_decimal {
  width: 100%;
  max-width: 520px;
  margin: auto;
  padding: 25px;
  background: #0f172a;
  border-radius: 14px;
  box-shadow: 0 10px 35px rgba(0,0,0,0.4);
}

.binary_to_decimal h2 {
  margin-bottom: 20px;
  font-size: 24px;
  color: #8b5cf6;
  text-align: center;
}

.field {
  margin-bottom: 15px;
}

.binary_to_decimal .field label {
  position: relative;
  display: block;
}


/* DROPDOWN OPEN OPTIONS (FOR VISIBILITY) */
.binary_to_decimal select option {
  background-color: #ffffff;
  color: #000000;
}
.field input,
.field select {
  font-size: 1rem;
  color: white;
  background: transparent;
  padding: 14px;
  width: 100%;
  border: 2px solid #334155;
  border-radius: 10px;
  transition: 0.2s;
}

.field input:focus,
.field select:focus {
  border-color: #8b5cf6;
}

.field label p {
  position: absolute;
  top: -10px;
  left: 12px;
  background: #0f172a;
  color: #8b5cf6;
  font-size: 0.8rem;
  padding: 0 6px;
}

.binary_to_decimal .btn-field {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.binary_to_decimal button {
  flex: 1;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  border: none;
}

#convert-btn {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: #fff;
}

.reset-btn {
  background: #ef4444;
  color: #fff;
}

.swap-btn {
  background: #06b6d4;
  color: #fff;
}

.copy-btn {
  background: #22c55e;
  color: #fff;
}

button:hover {
  opacity: 0.9;
}

#error-msg {
  color: #ef4444;
  display: none;
  text-align: center;
  margin-top: 10px;
}


/* ✅ RESPONSIVE */
@media (max-width: 600px) {
  .binary_to_decimal {
    padding: 20px;
  }

  .btn-field {
    flex-direction: column;
  }

  button {
    width: 100%;
  }

  .binary_to_decimal h2 {
    font-size: 20px;
  }
}